Simple VPS API
Create and manage Simple VPS 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/v1Authentication
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/vps" \
-H "Authorization: Bearer $API_TOKEN"Requests and answers
Bodies are JSON with Content-Type: application/json, and every answer is JSON. A VPS changes in the background: create, restore, reinstall and delete answer at once with the new status, and Get a VPS shows when the work is done.
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": "This plan is out of stock right now, try a smaller one"}| Status | Meaning |
|---|---|
400 | A value that is not accepted; detail says which |
401 | No token, or a token that is not valid |
402 | The balance does not cover what was asked |
403 | A limit of the account is reached; request more on the Limits page |
404 | No such thing in your account |
409 | Not possible right now: out of stock, or the server is busy |
422 | The body is not what the operation takes |
429 | Too many of these in a short time |
Operations
Plans and images
Servers
- POSTCreate a VPS/vps
- GETList VPS/vps
- GETGet a VPS/vps/{vps_uuid}
- DELDelete a VPS/vps/{vps_uuid}
- GETAccount summary/vps/summary
Power
Backups
- GETList backups/vps/{vps_uuid}/backups
- POSTBackups on or off/vps/{vps_uuid}/backups
- POSTBack up now/vps/{vps_uuid}/backup
- POSTRestore a backup/vps/{vps_uuid}/restore
- POSTDelete a backup/vps/{vps_uuid}/backups/delete