Skip to content
Coritan Docs

Client API: Cloud Compute: Vps

The 27 Client API operations for vps.

View as Markdown

Part of Cloud Compute.

Method Path Summary
GET /api/v1/client/vps List all VPS instances owned by the current user
GET /api/v1/client/vps/address-options What an order can choose for an instance's IPv4, location by location
GET /api/v1/client/vps/templates OS templates ready for order/rebuild: enabled and ready on at least one active node
GET /api/v1/client/vps/{uuid} Get VPS instance details including template metadata
GET /api/v1/client/vps/{uuid}/bandwidth Get current billing period bandwidth usage vs plan traffic allotment (TB)
POST /api/v1/client/vps/{uuid}/cloud-init/regenerate Regenerate cloud init
GET /api/v1/client/vps/{uuid}/config Get instance config
GET /api/v1/client/vps/{uuid}/console Start a display console session on the instance's host
GET /api/v1/client/vps/{uuid}/credentials The instance's user account, without its password
POST /api/v1/client/vps/{uuid}/credentials/reveal The instance's username and password, for its owner
GET /api/v1/client/vps/{uuid}/graphs Get RRD graph data from Proxmox
GET /api/v1/client/vps/{uuid}/guest Get guest info
PATCH /api/v1/client/vps/{uuid}/hostname Patch hostname
POST /api/v1/client/vps/{uuid}/images Turn this stopped instance into a disk image (app/modules/vps/customimages/capture.py)
GET /api/v1/client/vps/{uuid}/ips The addresses attached to the instance, primary first
POST /api/v1/client/vps/{uuid}/ipv6 Give the instance its IPv6: a /64 routed to it, at no charge
POST /api/v1/client/vps/{uuid}/name Name instance
POST /api/v1/client/vps/{uuid}/power Execute a power action on the VPS
GET /api/v1/client/vps/{uuid}/ptr Reverse DNS of every address attached to the instance
PATCH /api/v1/client/vps/{uuid}/ptr Set the reverse DNS of one attached address (the primary by default)
POST /api/v1/client/vps/{uuid}/rebuild Rebuild the VPS with a new OS template
POST /api/v1/client/vps/{uuid}/reset-password Set a new random password for the instance's user account
POST /api/v1/client/vps/{uuid}/resize-preview Capacity/mode preview for a plan change resize (billing via /services change-plan)
GET /api/v1/client/vps/{uuid}/ssh-keys The public keys on the instance, so a PUT can start from them: the PUT replaces them all
PUT /api/v1/client/vps/{uuid}/ssh-keys Put SSH keys
GET /api/v1/client/vps/{uuid}/status Get real-time VM status from Proxmox (enriched)
GET /api/v1/client/vps/{uuid}/tasks Get instance tasks

List all VPS instances owned by the current user

Section titled List all VPS instances owned by the current user

GET /api/v1/client/vps

List all VPS instances owned by the current user.

Each row carries ipv6_address and ipv6_prefix, null until the instance has IPv6, and outbound, which says how the instance's IPv4 traffic reaches the internet (see GET /client/vps/{uuid}).

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
tag query string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

What an order can choose for an instance's IPv4, location by location

Section titled What an order can choose for an instance's IPv4, location by location

GET /api/v1/client/vps/address-options

What an order can choose for an instance's IPv4, location by location.

Answers {locations: [{id, code, name, country_code, public_ipv4, shared_ipv4}]}, one row for each location a server can be ordered in. public_ipv4 is true when an order with config.order_ipv4 finds an address there now. shared_ipv4 is true when an instance ordered there without a public IPv4 reaches the internet through a shared address and is reached through port forwards; where it is false, such an instance has no IPv4 network until a floating IP is attached. An order page shows the public address as unavailable where public_ipv4 is false. The order itself still decides: it answers 422 when the address it asked for is gone.

Authentication: an access token, sent as Authorization: Bearer <token>.

Status Meaning
200 Success.

OS templates ready for order/rebuild: enabled and ready on at least one active node

Section titled OS templates ready for order/rebuild: enabled and ready on at least one active node

GET /api/v1/client/vps/templates

OS templates ready for order/rebuild: enabled and ready on at least one active node.

ready_nodes counts those hosts across the fleet. Pass uuid to learn which templates a rebuild of that instance accepts.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required Description
uuid query string or null no One of your instances. Each template then carries fits, whether a rebuild can install it there, and unfit_reason, the sentence a rebuild with it would answer, or null.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Get VPS instance details including template metadata

Section titled Get VPS instance details including template metadata

GET /api/v1/client/vps/{uuid}

Get VPS instance details including template metadata.

ipv6_address is the address the guest holds in its IPv6 /64 and ipv6_prefix the /64 itself; both are null until the instance has IPv6.

ip_address is the instance's public IPv4 address, or null. outbound says how its IPv4 traffic reaches the internet, as {mode, private_ipv4, gateway, shared_ipv4}. mode is one of:

  • public: the instance has a public IPv4 address of its own.
  • nat: it has none and reaches the internet through shared_ipv4, an address it shares with other customers. Only the ports it forwards reach it (GET /{uuid}/port-forwards), and it cannot send mail on port 25. The instance is set up with private_ipv4 as a /32 behind gateway.
  • none: it has none and no IPv4 network.

private_ipv4, gateway and shared_ipv4 are null unless mode is nat. A running instance takes a change of mode at its next start.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Get current billing period bandwidth usage vs plan traffic allotment (TB)

Section titled Get current billing period bandwidth usage vs plan traffic allotment (TB)

GET /api/v1/client/vps/{uuid}/bandwidth

Get current billing period bandwidth usage vs plan traffic allotment (TB).

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/client/vps/{uuid}/cloud-init/regenerate

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/client/vps/{uuid}/config

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Start a display console session on the instance's host

Section titled Start a display console session on the instance's host

GET /api/v1/client/vps/{uuid}/console

Start a display console session on the instance's host.

Answers vnc_ws (the websocket path), vnc_session (its session query parameter), vnc_password (the VNC password) and expires_in, the seconds left to connect; ask again for every connection. display is vga when the console shows the instance's screen, serial while the instance still uses its serial port as its screen, and pending while it waits for the display adapter its image now uses. One restart with the reboot power action ends either of the last two; a reboot inside the instance does not. Another account's instance answers 404, and a host that cannot start a console answers 400 with a message that starts Console unavailable.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

The instance's user account, without its password

Section titled The instance's user account, without its password

GET /api/v1/client/vps/{uuid}/credentials

The instance's user account, without its password.

username, password_stored (whether we hold a password), restart_required (the instance takes the password we hold at its next start or restart with POST /power) and updated_at. Read the password with POST /credentials/reveal.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

The instance's username and password, for its owner

Section titled The instance's username and password, for its owner

POST /api/v1/client/vps/{uuid}/credentials/reveal

The instance's username and password, for its owner.

A POST, so the password is never cached, a read-only support session cannot read it and a full one is recorded doing so. 404 when we hold no password (an image that takes none from us) and 429 after thirty reads in ten minutes.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Get RRD graph data from Proxmox

Section titled Get RRD graph data from Proxmox

GET /api/v1/client/vps/{uuid}/graphs

Get RRD graph data from Proxmox.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required Description
uuid path string yes
timeframe query string no Default: hour.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/client/vps/{uuid}/guest

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

PATCH /api/v1/client/vps/{uuid}/hostname

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes

application/json (required)

Field Type Required
hostname string yes
reboot boolean no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Turn this stopped instance into a disk image (app/modules/vps/customimages/capture.py)

Section titled Turn this stopped instance into a disk image (app/modules/vps/customimages/capture.py)

POST /api/v1/client/vps/{uuid}/images

Turn this stopped instance into a disk image (app/modules/vps/custom_images/capture.py).

409 while the instance runs, and on a host that cannot export a disk. The image is pending until its disk is copied and checked.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes

application/json (required)

Field Type Required Description
name string yes The new image's name, 1 to 100 characters.
description string or null no
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

The addresses attached to the instance, primary first

Section titled The addresses attached to the instance, primary first

GET /api/v1/client/vps/{uuid}/ips

The addresses attached to the instance, primary first.

Each row has version (ipv4 or ipv6) and kind: routed for the instance's own IPv6 /64 (address is the network, prefix_len 64), block for a subnet or one of its hosts, else standalone for a floating address.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Give the instance its IPv6: a /64 routed to it, at no charge

Section titled Give the instance its IPv6: a /64 routed to it, at no charge

POST /api/v1/client/vps/{uuid}/ipv6

Give the instance its IPv6: a /64 routed to it, at no charge.

Answers {prefix, address, reboot_required}: the /64, the address the guest takes in it (the network's ::1, with fe80::1 as its gateway), and whether you need to restart the instance for the guest to take it. Asking again answers the /64 the instance already has, with reboot_required false. A new instance gets its /64 when it is created in a location with IPv6; this adds one to an instance that has none.

Answers 409 when the location has no IPv6 yet or none left, or while the instance is migrating; 404 when the instance is not yours; 429 when you ask too often.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/client/vps/{uuid}/name

Give the instance a name in a zone the customer holds: A and AAAA records for its addresses, optionally the same name as reverse DNS and as the guest hostname.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes

application/json (required)

Field Type Required
hostname string yes
set_ptr boolean no
set_hostname boolean no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Execute a power action on the VPS

Section titled Execute a power action on the VPS

POST /api/v1/client/vps/{uuid}/power

Execute a power action on the VPS.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes

application/json (required)

Field Type Required
action string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Reverse DNS of every address attached to the instance

Section titled Reverse DNS of every address attached to the instance

GET /api/v1/client/vps/{uuid}/ptr

Reverse DNS of every address attached to the instance.

The instance's IPv6 /64 is listed as the address its guest holds.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Set the reverse DNS of one attached address (the primary by default)

Section titled Set the reverse DNS of one attached address (the primary by default)

PATCH /api/v1/client/vps/{uuid}/ptr

Set the reverse DNS of one attached address (the primary by default).

address may be any address inside the instance's IPv6 /64.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes

application/json (required)

Field Type Required
hostname string yes
address string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Rebuild the VPS with a new OS template

Section titled Rebuild the VPS with a new OS template

POST /api/v1/client/vps/{uuid}/rebuild

Rebuild the VPS with a new OS template. This destroys all data.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes

application/json (required)

Field Type Required
template_id integer or null no
custom_image_uuid string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Set a new random password for the instance's user account

Section titled Set a new random password for the instance's user account

POST /api/v1/client/vps/{uuid}/reset-password

Set a new random password for the instance's user account.

Answers password, applied and restart_required. applied is true when the guest agent set the password inside the running instance, so it works at once. Without the agent, or on a stopped instance, we write the password to cloud-init instead: restart_required is true and the instance takes it at its next start or restart with POST /power. A restart from inside the instance does not apply it.

403 for a suspended instance, 409 while it is moving to another host or when it runs your own image without cloud-init and its agent does not answer, 502 when the host refused (the password is unchanged), and 429 after six resets in ten minutes.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Capacity/mode preview for a plan change resize (billing via /services change-plan)

Section titled Capacity/mode preview for a plan change resize (billing via /services change-plan)

POST /api/v1/client/vps/{uuid}/resize-preview

Capacity/mode preview for a plan change resize (billing via /services change-plan).

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes

application/json (required)

Field Type Required
cpu_cores integer or null no
memory_mb integer or null no
disk_gb integer or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

The public keys on the instance, so a PUT can start from them: the PUT replaces them all

Section titled The public keys on the instance, so a PUT can start from them: the PUT replaces them all

GET /api/v1/client/vps/{uuid}/ssh-keys

The public keys on the instance, so a PUT can start from them: the PUT replaces them all.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

PUT /api/v1/client/vps/{uuid}/ssh-keys

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes

application/json (required)

Field Type Required
ssh_keys string no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Get real-time VM status from Proxmox (enriched)

Section titled Get real-time VM status from Proxmox (enriched)

GET /api/v1/client/vps/{uuid}/status

Get real-time VM status from Proxmox (enriched).

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
uuid path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/client/vps/{uuid}/tasks

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required Description
uuid path string yes
limit query integer no Default: 50.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.