VPS Instance commands

/vps-intance/{id}/command

GET

Returns list of instance commands with execution details.

JSON request

limit integer Number of latest commands to show. (optional)

JSON response

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/vps-instance/8ab5599f-aea6-493c-aca9-a070e5cf5257/command" | python -m json.tool

POST

Create new VPS instance command.

JSON request

type string Command to execute, possible options: +—————————————————————————–+ | start | Start instance. | +—————————————————————————–+ | stop | Stop instance. | +—————————————————————————–+ | shutdown | Shutdown instance. | +—————————————————————————–+ | rescue | Reload instance in rescue mode. | +—————————————————————————–+

JSON response

empty list.

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "type": "start",
    }
' \
"{{api_base_url}}/vps-instance/8ab5599f-aea6-493c-aca9-a070e5cf5257/command" | python -m json.tool

VPS Instance access URL

/vps-instance/{id}/access

POST

Generate new VNC Console URL for specified instance.

JSON request

No possible request options.

JSON response

string: VNC Console HTTP URL.

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
    }
' \
"{{api_base_url}}/vps-instance/8ab5599f-aea6-493c-aca9-a070e5cf5257/access" | python -m json.tool

VPS Instance Installation

/vps-intance/{id}/install

POST

Install new image on VPS instance

JSON request

image integer VPS Image id.

JSON response

empty list.

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "image": "148",
    }
' \
"{{api_base_url}}/vps-instance/8ab5599f-aea6-493c-aca9-a070e5cf5257/install" | python -m json.tool

VPS Instance manual renew.

/vps-intance/{id}/renew

POST

Renew VPS Instance for same period of time as specified during instance creation.

JSON request

current_expiration_date date Current expiration data saved in RP API. Required to avoid un wanted renews.

JSON response

empty list.

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "date": "2016-03-23T19:14:48.957985+00:00",
    }
' \
"{{api_base_url}}/vps-instance/8ab5599f-aea6-493c-aca9-a070e5cf5257/renew" | python -m json.tool

VPS Instance restore.

/vps-intance/{id}/restore

POST

Restore VPS Instance.

JSON request

start boolean Start instance after restoration. (Optional, default: False)

JSON response

empty list.

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "start": true,
    }
' \
"{{api_base_url}}/vps-instance/8ab5599f-aea6-493c-aca9-a070e5cf5257/restore" | python -m json.tool

VPS Instance suspension.

/vps-intance/{id}/suspend

POST

Suspend abused VPS Instance.

JSON request

No possible request options.

JSON response

array: empty array.

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/vps-instance/8ab5599f-aea6-493c-aca9-a070e5cf5257/suspend" | python -m json.tool