API

Endpoint reference

The one hundred and six endpoints of API v1, generated from the OpenAPI contract.

This page is generated from the OpenAPI contract. Where it disagrees with the API, the contract is right: tell us.

Base URL https://api.ffxf.net/v1
OpenAPI contract openapi.v1.json (The file this reference renders, as published.)

Contents

Catalog

get /regions No key

List regions. Where machines can run. A plan or an image may not be offered everywhere.

Parameters

No parameters.

Responses

HTTPDescription
200OK
get /plans No key

List plans

Parameters

NameInType RequiredDescription
regionquerystringnoKeep only the plans offered in this region.

Responses

HTTPDescription
200OK
get /plans/{plan} No key

Get a plan

Parameters

NameInType RequiredDescription
planpathstringyes

Responses

HTTPDescription
200OK
404No such resource, or it does not belong to this account.
get /images No key

List images. The image referential. `slug` is the stable identifier to pass at

Parameters

NameInType RequiredDescription
regionquerystringnoKeep only the images available in this region.
planquerystringnoKeep only the images that fit this plan.
categoryquerylinux | windows | bsd | app | …no

Responses

HTTPDescription
200OK
get /images/{image} No key

Get an image

Parameters

NameInType RequiredDescription
imagepathstringyes

Responses

HTTPDescription
200OK
404No such resource, or it does not belong to this account.

Machines

get /vms

List machines

Parameters

NameInType RequiredDescription
cursorquerystringnoThe `next_cursor` from the previous page.
limitqueryintegerno
statusqueryVmStatusno
regionquerystringno
billingqueryhourly | monthlyno

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
post /vms

Create a machine. Runs the same checks as the console, in this order: account standing,

Parameters

NameInType RequiredDescription
Idempotency-KeyheaderstringyesUnique per order, your own value. Kept 24 hours.

Request body

NameTypeRequired Description
planstringyes
regionstringyes
imagestringyes
hostnameHostnameyes
billinghourly | monthlyyes
paymentcredit | manualnoMonthly only. `credit` settles the invoice from the balance when it
ssh_keysstring[]noFingerprints or ids of keys on the account. Ignored by images without cloud-init key support, and by `netboot` (nothing is injected; the network settings are mailed instead).
password_deliveryemail | noneno`email` generates a password and mails it. `none` requires at least
optionsobjectnoPaid options declared by the plan, by name. Unknown keys are refused.
ipv4booleanno`false` orders an IPv6-only machine, at a lower price: no public
vpcintegernoPrivate network to connect the machine to, in the same region. Its
private_onlybooleannoNo public address at all (requires `vpc`): the machine is reachable
dry_runbooleannoRun every check and price the order without creating anything.

Responses

HTTPDescription
202Order accepted. `action` follows the provisioning; it is null when
200Estimate returned (`dry_run: true`). Nothing was created.
400Malformed request.
402Not enough credit, or a budget cap reached. An hourly order needs the
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
409The resource is not in a state that allows this: machine suspended,
422The request is well formed but the catalogue refuses it: image below the
429Too many requests.
get /vms/{vm}

Get a machine

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists

Responses

HTTPDescription
200OK
404No such resource, or it does not belong to this account.
patch /vms/{vm}

Update a machine. Only the hostname is editable. It is applied inside the guest and to the

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists

Request body

NameTypeRequired Description
hostnameHostnameno

Responses

HTTPDescription
200OK
409The resource is not in a state that allows this: machine suspended,
delete /vms/{vm}

Destroy a machine. Destroys the machine and its disk. There is no undo and no backup is

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists
confirmquerystringyesThe machine's exact hostname.
whenqueryperiod_end | nownoMonthly machines only.

Responses

HTTPDescription
202Accepted
400Malformed request.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /vms/{vm}/metrics

Get machine metrics. CPU, memory, disk and network, as measured from outside the machine.

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists
timeframequeryhour | day | week | month | …no

Responses

HTTPDescription
200OK
503The infrastructure did not answer in time. Nothing was changed; retry.
post /vms/{vm}/console

Open a console session. Returns a single-use URL to the VNC console, valid for a few minutes.

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists

Responses

HTTPDescription
201Created
409The resource is not in a state that allows this: machine suspended,

Actions

get /vms/{vm}/actions

List a machine's actions

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists
cursorquerystringnoThe `next_cursor` from the previous page.
limitqueryintegerno

Responses

HTTPDescription
200OK
post /vms/{vm}/actions

Act on a machine. `start`, `shutdown`, `reboot` ask the guest politely. `stop` cuts the

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists
Idempotency-Keyheaderstringno

Request body

NameTypeRequired Description
typestart | shutdown | reboot | stopyes

Responses

HTTPDescription
202Accepted
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
409The resource is not in a state that allows this: machine suspended,
422The request is well formed but the catalogue refuses it: image below the
503The infrastructure did not answer in time. Nothing was changed; retry.
get /actions

List actions

Parameters

NameInType RequiredDescription
cursorquerystringnoThe `next_cursor` from the previous page.
limitqueryintegerno
statusqueryActionStatusno

Responses

HTTPDescription
200OK
get /actions/{action}

Get an action. Poll this until `status` leaves `running`. A completed action is kept 30 days.

Parameters

NameInType RequiredDescription
actionpathintegeryes

Responses

HTTPDescription
200OK
404No such resource, or it does not belong to this account.

Networking

get /vms/{vm}/network

Get a machine's addresses

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists

Responses

HTTPDescription
200OK
post /vms/{vm}/network/ipv6

Add an address from the machine's IPv6 prefix. Each machine carries a routed /64. An address taken here is registered

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists

Request body

NameTypeRequired Description
addressstringyesFull address inside the machine's prefix.

Responses

HTTPDescription
201Created
409The resource is not in a state that allows this: machine suspended,
422The request is well formed but the catalogue refuses it: image below the
delete /vms/{vm}/network/ipv6/{address}

Release an IPv6 address

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists
addresspathstringyes

Responses

HTTPDescription
204Released
404No such resource, or it does not belong to this account.
put /vms/{vm}/network/rdns

Set reverse DNS on an address

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists

Request body

NameTypeRequired Description
addressstringyes
hostnamestringnoNull clears the record and restores the default.

Responses

HTTPDescription
200OK
422The request is well formed but the catalogue refuses it: image below the

Backups

get /vms/{vm}/backups

List backups

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists

Responses

HTTPDescription
200OK
post /vms/{vm}/backups/{backup}/restore

Restore a backup. Overwrites the current disk. The machine is stopped for the duration.

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists
backuppathstringyes

Responses

HTTPDescription
202Accepted
409The resource is not in a state that allows this: machine suspended,
delete /vms/{vm}/backups/{backup}

Delete a backup

Parameters

NameInType RequiredDescription
vmpathintegeryesThe machine id. A machine is identified by its service: the id exists
backuppathstringyes

Responses

HTTPDescription
204Deleted
404No such resource, or it does not belong to this account.

Auth

post /auth/token

Exchange a credential for a temporary access token. Authenticate with an API key or an OIDC token that may assume the

Parameters

No parameters.

Request body

NameTypeRequired Description
roleanyyesId or name of a role the credential may assume.
duration_secondsintegernoLifetime. Values outside 900–3600 are clamped.

Responses

HTTPDescription
201Token issued.
401Missing, unknown, disabled or expired key.
403`role_not_assumable`, `exchange_forbidden` or `ip_not_allowed`.

Access management

get /policies

List policys

Parameters

No parameters.

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
post /policies

Create a policy

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringyes
descriptionstringno
documentanyyesA policy document (object or JSON string), see the security scheme.

Responses

HTTPDescription
201OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
400Malformed request.
get /policies/{policy}

Get a policy

Parameters

NameInType RequiredDescription
policypathintegeryes

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
put /policies/{policy}

Replace a policy

Parameters

NameInType RequiredDescription
policypathintegeryes

Request body

NameTypeRequired Description
namestringyes
descriptionstringno
documentanyyesA policy document (object or JSON string), see the security scheme.

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
400Malformed request.
delete /policies/{policy}

Delete a policy

Parameters

NameInType RequiredDescription
policypathintegeryes

Responses

HTTPDescription
204Deleted.
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /roles

List roles

Parameters

No parameters.

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
post /roles

Create a role

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringyes
descriptionstringno
policy_idsinteger[]yesIds from `GET /policies`, yours or provided (`vms.read`…).

Responses

HTTPDescription
201OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
400Malformed request.
get /roles/{role}

Get a role

Parameters

NameInType RequiredDescription
rolepathintegeryes

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
put /roles/{role}

Replace a role

Parameters

NameInType RequiredDescription
rolepathintegeryes

Request body

NameTypeRequired Description
namestringyes
descriptionstringno
policy_idsinteger[]yesIds from `GET /policies`, yours or provided (`vms.read`…).

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
400Malformed request.
delete /roles/{role}

Delete a role

Parameters

NameInType RequiredDescription
rolepathintegeryes

Responses

HTTPDescription
204Deleted.
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /api-keys

List API keys

Parameters

No parameters.

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
post /api-keys

Create an API key (the token is returned once)

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringyes
roleanynoId or name of the role the key has the rights of. Required unless `exchange_only`.
exchange_onlybooleanno
assumable_rolesany[]noRoles obtainable through `POST /auth/token`. Required when `exchange_only`.
ip_addressesstring[]no
expires_atstringno

Responses

HTTPDescription
201OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
400Malformed request.
get /api-keys/{apiKey}

Get an API key

Parameters

NameInType RequiredDescription
apiKeypathintegeryes

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /api-keys/{apiKey}

Revoke an API key

Parameters

NameInType RequiredDescription
apiKeypathintegeryes

Responses

HTTPDescription
204Deleted.
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /oidc/providers

List OIDC providers

Parameters

No parameters.

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
get /oidc/bindings

List OIDC bindings

Parameters

No parameters.

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
post /oidc/bindings

Create a OIDC binding

Parameters

No parameters.

Request body

NameTypeRequired Description
provider_idintegeryes
namestringyes
claim_conditionsobject[]yesMust include a `sub` condition naming the owner.
roleanyno
exchange_onlybooleanno
assumable_rolesany[]no
expires_atstringno

Responses

HTTPDescription
201OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
400Malformed request.
get /oidc/bindings/{binding}

Get a OIDC binding

Parameters

NameInType RequiredDescription
bindingpathintegeryes

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
put /oidc/bindings/{binding}

Replace a OIDC binding

Parameters

NameInType RequiredDescription
bindingpathintegeryes

Request body

NameTypeRequired Description
provider_idintegeryes
namestringyes
claim_conditionsobject[]yesMust include a `sub` condition naming the owner.
roleanyno
exchange_onlybooleanno
assumable_rolesany[]no
expires_atstringno

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
400Malformed request.
delete /oidc/bindings/{binding}

Delete a OIDC binding

Parameters

NameInType RequiredDescription
bindingpathintegeryes

Responses

HTTPDescription
204Deleted.
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,

Account

get /account

Get account standing. Everything an automated fleet needs to decide on its own: balance, what

Parameters

No parameters.

Responses

HTTPDescription
200OK
put /account/budget

Set the monthly budget. The same budget as the console's Usage page. Warnings are sent at 50, 80

Parameters

NameInType RequiredDescription
Idempotency-Keyheaderstringno

Request body

NameTypeRequired Description
monthlyanyyesAmount in the account currency, 0 to 1,000,000, rounded to the cent. Null removes the budget.

Responses

HTTPDescription
200The budget as it now stands, in the same shape as `budget` in `GET /account`.
400Malformed request.
get /usage

List hourly usage. One record per hour charged, per machine. This is the ledger the

Parameters

NameInType RequiredDescription
fromquerystringno
toquerystringno
vm_idqueryintegerno
group_byqueryhour | vmnoReturn one line per machine instead of one per hour.
cursorquerystringnoThe `next_cursor` from the previous page.
limitqueryintegerno

Responses

HTTPDescription
200OK

SSH keys

get /ssh-keys

List SSH keys

Parameters

No parameters.

Responses

HTTPDescription
200OK
post /ssh-keys

Add an SSH key. Up to 20 keys per account. Re-adding a known fingerprint returns the existing key.

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringyes
public_keystringyes

Responses

HTTPDescription
201Created
400Malformed request.
delete /ssh-keys/{key}

Delete an SSH key. Machines already deployed with this key keep it; only future deployments change.

Parameters

NameInType RequiredDescription
keypathintegeryes

Responses

HTTPDescription
204Deleted
404No such resource, or it does not belong to this account.

Private networks

get /vpcs

List private networks. Scope `vms.read`.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
post /vpcs

Create a private network. Scope `network.write`. The network is ready when the call returns (a

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringyes
cidrstringyesA private IPv4 range, from /16 to /29, within 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16.
regionstringyes

Responses

HTTPDescription
201Created
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /vpcs/{vpc}

Get a private network. Scope `vms.read`.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /vpcs/{vpc}

Delete a private network. Scope `network.write`. Refused with `action_conflict` while a machine is still on it.

Parameters

No parameters.

Responses

HTTPDescription
204Deleted
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
post /vpcs/{vpc}/members

Connect a machine. Scope `network.write`. A network card is hot-added and its address set

Parameters

No parameters.

Request body

NameTypeRequired Description
vmintegeryesMachine id, as in `GET /vms`.
ipstringnoAddress wanted in the range. Default: the next free one.

Responses

HTTPDescription
200Already connected
201Connected
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
delete /vpcs/{vpc}/members/{vm}

Disconnect a machine. Scope `network.write`. The address is removed from the system and the

Parameters

No parameters.

Responses

HTTPDescription
204Disconnected
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
post /vpcs/{vpc}/members/{vm}/move

Move a machine to another private network. Scope `network.write`. The machine joins the target network, then

Parameters

No parameters.

Request body

NameTypeRequired Description
tointegeryesTarget private network id.

Responses

HTTPDescription
200Moved
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,

Firewalls

get /firewalls

List firewalls. Scope `vms.read`.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
post /firewalls

Create a firewall. Scope `network.write`. Without `rules`, the firewall starts with SSH

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringyes
rulesFirewallRule[]no

Responses

HTTPDescription
201Created
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
409The resource is not in a state that allows this: machine suspended,
get /firewalls/{firewall}

Get a firewall. Scope `vms.read`.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
put /firewalls/{firewall}

Rename a firewall or replace its rules. Scope `network.write`. `rules` replaces the whole list: describe the

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringno
rulesFirewallRule[]no

Responses

HTTPDescription
200Updated
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /firewalls/{firewall}

Delete a firewall. Scope `network.write`. Refused with `action_conflict` while it is attached to a machine.

Parameters

No parameters.

Responses

HTTPDescription
204Deleted
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
post /firewalls/{firewall}/members

Attach a firewall to a machine. Scope `network.write`. The rules are written when the call returns and

Parameters

No parameters.

Request body

NameTypeRequired Description
vmintegeryesMachine id, as in `GET /vms`.

Responses

HTTPDescription
200Already attached
201Attached
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
delete /firewalls/{firewall}/members/{vm}

Detach a firewall from a machine. Scope `network.write`. Its rules are removed from the machine; with no

Parameters

No parameters.

Responses

HTTPDescription
204Detached
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.

Load balancers

get /load-balancers

List load balancers. Scope `vms.read`.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
post /load-balancers

Create a load balancer. Scope `vms.create`; `Idempotency-Key` required. Billed by the hour from

Parameters

NameInType RequiredDescription
Idempotency-KeyheaderstringyesUnique per order, your own value. Kept 24 hours.

Request body

NameTypeRequired Description
namestringyes
vpcintegeryesPrivate network id, as in `GET /vpcs`. Its machines are the possible targets.
billinghourly | monthly | yearlynohourly (default), monthly (the price of 730 hours: 7.30 CAD) or yearly (ten months: 73 CAD). A monthly or yearly period comes out of credit if it covers it; otherwise `billing.pending_invoice` holds the invoice to pay and the resource stays hourly until it is paid.

Responses

HTTPDescription
202Ordered
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /load-balancers/{lb}

Get a load balancer. Scope `vms.read`. Everything at once; pools with their targets and health, listeners with their rules, certificates.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
patch /load-balancers/{lb}

Rename a load balancer. Scope `network.write`.

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringyes

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /load-balancers/{lb}

Delete a load balancer. Scope `vms.destroy`. The load balancer, its address and its

Parameters

No parameters.

Responses

HTTPDescription
202Deletion started
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
get /load-balancers/{lb}/metrics

Load balancer statistics. Scope `vms.read`. Per-minute counters kept 7 days, grouped by 1 minute

Parameters

NameInType RequiredDescription
rangequery1h | 24h | 7dno

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
post /load-balancers/{lb}/pools

Create a pool. Scope `network.write`. Up to 10 pools. An `http` pool serves `http`/`https` listeners, a `tcp` pool `tcp` listeners.

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringno
protocolhttp | tcpno
algorithmroundrobin | leastconnno
health_typetcp | httpno`http` pools only: GET `health_path`, 2xx or 3xx is healthy.
health_pathstringno
health_intervalintegernoSeconds; 3 failures mark a target down, 2 successes up.
send_proxybooleanno`tcp` pools only: PROXY protocol v2 towards the targets.

Responses

HTTPDescription
201Created
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
patch /load-balancers/{lb}/pools/{pool}

Update a pool. Scope `network.write`. Only the fields sent change. The protocol of a pool already used by a listener or rule cannot change.

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringno
protocolhttp | tcpno
algorithmroundrobin | leastconnno
health_typetcp | httpno`http` pools only: GET `health_path`, 2xx or 3xx is healthy.
health_pathstringno
health_intervalintegernoSeconds; 3 failures mark a target down, 2 successes up.
send_proxybooleanno`tcp` pools only: PROXY protocol v2 towards the targets.

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /load-balancers/{lb}/pools/{pool}

Delete a pool. Scope `network.write`. Its targets and the rules leading to it go too; a listener using it as default answers 503 until given another.

Parameters

No parameters.

Responses

HTTPDescription
204Deleted
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
put /load-balancers/{lb}/pools/{pool}/targets

Replace the targets of a pool. Scope `network.write`. The pool ends up with exactly these targets

Parameters

No parameters.

Request body

NameTypeRequired Description
targetsobject[]yes

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
patch /load-balancers/{lb}/pools/{pool}/targets/{target}

Weight or drain a target. Scope `network.write`. `drain: true` stops new connections to it; current ones finish.

Parameters

No parameters.

Request body

NameTypeRequired Description
weightintegerno
drainbooleanno

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /load-balancers/{lb}/pools/{pool}/targets/{target}

Remove a target. Scope `network.write`.

Parameters

No parameters.

Responses

HTTPDescription
204Removed
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
post /load-balancers/{lb}/listeners

Open a listener. Scope `network.write`. Up to 5. Ports 22 and 8402 are reserved. A

Parameters

No parameters.

Request body

NameTypeRequired Description
portintegerno
protocolhttp | https | tcpno
default_poolintegernoWhere traffic no rule matches goes; none answers 503 (HTTP). Required for `tcp`.
redirect_httpsbooleanno`https` only: port 80 redirects to this listener.
sourcesstring[]noIPv4/IPv6 addresses or ranges allowed in; null or empty: everyone.

Responses

HTTPDescription
201Created
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
patch /load-balancers/{lb}/listeners/{listener}

Update a listener. Scope `network.write`. Only the fields sent change. Switching to `tcp` drops its rules.

Parameters

No parameters.

Request body

NameTypeRequired Description
portintegerno
protocolhttp | https | tcpno
default_poolintegernoWhere traffic no rule matches goes; none answers 503 (HTTP). Required for `tcp`.
redirect_httpsbooleanno`https` only: port 80 redirects to this listener.
sourcesstring[]noIPv4/IPv6 addresses or ranges allowed in; null or empty: everyone.

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /load-balancers/{lb}/listeners/{listener}

Close a listener. Scope `network.write`. Its rules go too, and its port closes.

Parameters

No parameters.

Responses

HTTPDescription
204Closed
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
put /load-balancers/{lb}/listeners/{listener}/rules

Replace the rules of a listener. Scope `network.write`. HTTP(S) listeners only; all or nothing, up to

Parameters

No parameters.

Request body

NameTypeRequired Description
rulesLoadBalancerRule[]yes

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.

Databases

get /databases

List databases. Scope `vms.read`. No passwords here; see `GET /databases/{database}/credentials`.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
post /databases

Create a database. Scope `vms.create`; `Idempotency-Key` required. Billed by the hour from

Parameters

NameInType RequiredDescription
Idempotency-KeyheaderstringyesUnique per order, your own value. Kept 24 hours.

Request body

NameTypeRequired Description
namestringyes
vpcintegeryesPrivate network id, as in `GET /vpcs`. The database gets an address in it.
enginepostgresql | mysql | mariadb | valkeyno`mysql` is Percona Server; `valkey` is Redis-compatible.
versionstringnoMajor version from `GET /databases/options`; the newest when omitted.
size_gbintegernoMemory in GB, one of the sizes of `GET /databases/options` for the region.
billinghourly | monthly | yearlynohourly (default), monthly (the price of 730 hours) or yearly (ten months). A monthly or yearly period comes out of credit if it covers it; otherwise `billing.pending_invoice` holds the invoice to pay and the resource stays hourly until it is paid.

Responses

HTTPDescription
202Ordered
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /databases/options

What can be ordered. Scope `vms.read`. Engines and versions, available extensions (PostgreSQL), eviction policies (Valkey), sizes with their hourly, monthly and yearly prices in the account's currency, and the price of disk beyond what a size includes.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
get /databases/{database}

Get a database. Scope `vms.read`.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
patch /databases/{database}

Update a database. Scope `databases.write`. Any of: the name; the weekly maintenance

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringno
maintenance_dayintegerno
maintenance_hourintegerno
disk_cap_gbintegerno
eviction_policynoeviction | allkeys-lru | allkeys-lfu | allkeys-random | …noValkey only.

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /databases/{database}

Delete a database. Scope `vms.destroy`. The database and its data go away; billing stops.

Parameters

No parameters.

Responses

HTTPDescription
202Deletion started
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /databases/{database}/credentials

Users, passwords and connection strings. Scope `databases.write`: reading a password is enough to connect, so

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
post /databases/{database}/users

Add a user. Scope `databases.write`. Lowercase letters, digits and `_`, starting

Parameters

No parameters.

Request body

NameTypeRequired Description
usernamestringyes
databasesDatabaseUserDatabasesnoThe logical databases the user connects to; null: all of them, future ones included. Always null for the admin and on Valkey.
read_onlybooleannoSELECT only (MySQL, MariaDB: SELECT and SHOW VIEW).

Responses

HTTPDescription
201Created; live within seconds.
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
patch /databases/{database}/users/{username}

Change a user's access. Scope `databases.write`. The logical databases the user connects to

Parameters

NameInType RequiredDescription
Idempotency-Keyheaderstringno

Request body

NameTypeRequired Description
databasesDatabaseUserDatabasesnoThe logical databases the user connects to; null: all of them, future ones included. Always null for the admin and on Valkey.
read_onlybooleanno

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /databases/{database}/users/{username}

Delete a user. Scope `databases.write`. Its objects are handed to the admin, then the role is dropped. The admin cannot be deleted.

Parameters

No parameters.

Responses

HTTPDescription
204Deleted
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
post /databases/{database}/users/{username}/reset-password

Reset a password. Scope `databases.write`. A new password, returned here; the old one stops working within seconds. No `Idempotency-Key` (see adding a user).

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
post /databases/{database}/databases

Add a logical database. Scope `databases.write`. Same naming rules as users; 30 at most. Owned by the admin.

Parameters

No parameters.

Request body

NameTypeRequired Description
namestringyes

Responses

HTTPDescription
201Created; live within seconds.
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /databases/{database}/databases/{name}

Delete a logical database. Scope `databases.write`. Dropped with everything in it; the backups keep it 7 days.

Parameters

No parameters.

Responses

HTTPDescription
204Deleted
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
post /databases/{database}/databases/{name}/extensions

Enable an extension. Scope `databases.write`. PostgreSQL only. One of the extensions of `GET /databases/options`; installed on demand when needed (a few seconds to a minute).

Parameters

No parameters.

Request body

NameTypeRequired Description
extensionstringyes

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
delete /databases/{database}/databases/{name}/extensions/{extension}

Remove an extension. Scope `databases.write`. Dropped without `CASCADE`: if objects depend

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
put /databases/{database}/public-access

Set public access. Scope `network.write`. Off at creation. On, the database answers at

Parameters

No parameters.

Request body

NameTypeRequired Description
enabledbooleanyes
sourcesstring[]no

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /databases/{database}/backups

List backups. Scope `vms.read`. A full backup weekly, differentials daily, and the

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
post /databases/{database}/backups

Back up now. Scope `backups.write`. A differential backup starts within a minute; not available on a linked fork.

Parameters

No parameters.

Responses

HTTPDescription
202Requested
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
post /databases/{database}/restore

Restore into a new database. Scope `vms.create`; `Idempotency-Key` required. A new database, billed

Parameters

NameInType RequiredDescription
Idempotency-KeyheaderstringyesUnique per order, your own value. Kept 24 hours.

Request body

NameTypeRequired Description
atstringyesUTC unless an offset is given.
namestringyes
vpcintegerno
size_gbintegerno

Responses

HTTPDescription
202Ordered (`status` is `restoring`, then `active`).
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
post /databases/{database}/forks

Fork a database. Scope `vms.create`; `Idempotency-Key` required. A new database whose

Parameters

NameInType RequiredDescription
Idempotency-KeyheaderstringyesUnique per order, your own value. Kept 24 hours.

Request body

NameTypeRequired Description
namestringyes
vpcintegerno
size_gbintegerno

Responses

HTTPDescription
202Ordered
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
post /databases/{database}/resize

Upgrade to a larger size. Scope `vms.create`; `Idempotency-Key` required. More CPU, memory and

Parameters

NameInType RequiredDescription
Idempotency-KeyheaderstringyesUnique per order, your own value. Kept 24 hours.

Request body

NameTypeRequired Description
size_gbintegeryesMemory in GB, larger than the current size.

Responses

HTTPDescription
202Started (`resize.to_gb` set; `status` turns `maintenance`, then `active` with the new `size_gb`).
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
post /databases/{database}/detach

Make a fork independent. Scope `vms.action`. Its data gets its own copy; the database is unavailable for about 30 seconds, then its backups start.

Parameters

No parameters.

Responses

HTTPDescription
202Started
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
409The resource is not in a state that allows this: machine suspended,
get /databases/{database}/metrics

Database statistics. Scope `vms.read`. Per-minute samples kept 7 days, grouped by 1 minute

Parameters

NameInType RequiredDescription
rangequery1h | 24h | 7dno

Responses

HTTPDescription
200OK
400Malformed request.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.
get /databases/{database}/queries

Most expensive queries. Scope `vms.read`. The 20 queries with the most total time, as counted by `pg_stat_statements` (PostgreSQL) or `performance_schema` (MySQL, MariaDB, without the user), normalized (values replaced by `$1`, `$2`… or `?`). On Valkey, per command since the engine last started (`INFO commandstats`), without database or user. Refreshed every few minutes.

Parameters

No parameters.

Responses

HTTPDescription
200OK
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
404No such resource, or it does not belong to this account.

GitHub runners

get /runners

Runner sizes, linked GitHub accounts and this month. Scope `billing.read`. The labels to put in `runs-on`, their price,

Parameters

No parameters.

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.
get /runners/jobs

List runner jobs. Scope `billing.read`. Most recent first. Jobs of unlinked installations are not kept.

Parameters

NameInType RequiredDescription
repositoryquerystringno`owner/name`
statusqueryqueued | running | succeeded | failed | …no
cursorquerystringnoThe `next_cursor` from the previous page.
limitqueryintegerno

Responses

HTTPDescription
200OK
401Missing, unknown, disabled or expired key.
403Key out of scope, IP not allowed, e-mail unverified or account suspended.

Support & discussions

Technical questions, incident reports, or infrastructure discussions, the team is reachable on Discord, Telegram, X, Instagram, Reddit, and IRC.