Cloud Panel

Cloud VM API

Create and manage cloud servers over HTTP with an API token. Every operation has its own page with its fields, examples, an example answer and the errors it gives.

OpenAPI file

Everything in this reference as one OpenAPI 3.1 file: operations, fields, examples and errors. Import it into Postman or Insomnia, generate a client from it, or give it to an LLM to write code against the API.

Download openapi.json

Base URL

https://platform.serverscamp.com/api/v1

Authentication

Make a token in the Cloud Panel under Settings, API tokens and send it with every request. A token acts for its account in full, so keep it as you would a password.

curl "https://platform.serverscamp.com/api/v1/vms" \
  -H "Authorization: Bearer $API_TOKEN"

A server from scratch

Create a VM takes ids: a plan from List plans, a disk from List disks, an image from List images, a network from List networks and a key from List SSH keys. Ask for plans and disks with line=v2 to get the ones on sale. Then Create a VM and poll Get a VM until its status is active.

Requests and answers

Bodies are JSON with Content-Type: application/json, and every answer is JSON. A server changes in the background: create, delete, power, a plan change, a reinstall and disk changes answer at once, and Get a VM or the job's status shows when the work is done. Prices are in millicents: 10,000 make 1 EUR, and a month is 720 hours.

Errors

An error has an HTTP status and a detail that says what went wrong in words you can show to a person. On a 422 it is a list instead, one entry for each field that is not right.

{"detail": "The server is busy with another operation"}
StatusMeaning
400A value that is not accepted; detail says which
401No token, or a token that is not valid
402The balance does not cover what was asked
403A limit of the account is reached; request more on the Limits page
404No such thing in your account
409Not possible right now: no free capacity, or the server is busy
422The body is not what the operation takes
429Too many of these in a short time

Operations

Plans, disks and images

Servers

Power

Plan, disk and reinstall

Addresses

Metrics

SSH keys