List plans
GET/api/v1/vm-classes
The plans. Ask with line=v2 for the ones on sale: basic-1g to basic-64g on Basic hardware and hf-1g to hf-64g on High Frequency, each with a -dedicated twin of the same size. Their ids go into Create a VM and Change the plan.
Parameters
| Name | In | Description |
|---|---|---|
| line | query, string | legacy: the plans sold until November 2026 (the default, for scripts written then); v2: basic-4g, hf-4g-dedicated and the like; all: both. |
Example request
curl -X GET "https://platform.serverscamp.com/api/v1/vm-classes?line=v2" \
-H "Authorization: Bearer $API_TOKEN"import os, requests
token = os.environ["API_TOKEN"]
r = requests.get(
f"https://platform.serverscamp.com/api/v1/vm-classes?line=v2",
headers={"Authorization": f"Bearer {token}"},
)
r.raise_for_status()
print(r.json())const r = await fetch(`https://platform.serverscamp.com/api/v1/vm-classes?line=v2`, {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.API_TOKEN}` },
});
console.log(r.status, await r.json());Answer
Status 200 with this body.
| Field | Type | Description |
|---|---|---|
| items | list of VmPlanrequired | |
| items[].id | integerrequired | Plan id, for vm_class_id in Create a VM and Change the plan |
| items[].name | stringrequired | Plan name, for example basic-4g or hf-4g-dedicated |
| items[].cpu_cores | integerrequired | vCPU cores |
| items[].memory_mb | integerrequired | Memory, MB |
| items[].cpu_mode | one of burst, dedicatedrequired | burst for a shared plan, dedicated for a -dedicated one |
| items[].cpu_min_usage | integerrequired | Guaranteed CPU share of a shared plan, percent; 100 on a dedicated one |
| items[].price_per_hour_millicents | numberrequired | Price an hour in millicents: 10,000 make 1 EUR. A month is 720 hours |
| items[].hardware_class_id | integerrequired | Hardware the plan runs on |
| items[].hardware_class_slug | stringrequired | legacy for Basic (Intel Xeon), scalpel for High Frequency (AMD EPYC) |
| items[].hardware_class_name | stringrequired | Hardware name |
| items[].line | one of legacy, v2required | v2 for the plans on sale, legacy for the plans sold before November 2026 |
| items[].locked | booleanrequired | Above what the account may create now; a top-up or a limit request opens it |
| items[].sold_out | booleanrequired | No free capacity for this plan right now; a create gets 409 |
| total | integerrequired |
{
"items": [
{
"id": 49,
"name": "basic-4g",
"cpu_cores": 2,
"memory_mb": 4096,
"cpu_mode": "burst",
"cpu_min_usage": 35,
"price_per_hour_millicents": 104.17,
"hardware_class_id": 1,
"hardware_class_slug": "legacy",
"hardware_class_name": "Basic",
"line": "v2",
"locked": false,
"sold_out": false
},
{
"id": 50,
"name": "basic-4g-dedicated",
"cpu_cores": 2,
"memory_mb": 4096,
"cpu_mode": "dedicated",
"cpu_min_usage": 100,
"price_per_hour_millicents": 152.78,
"hardware_class_id": 1,
"hardware_class_slug": "legacy",
"hardware_class_name": "Basic",
"line": "v2",
"locked": false,
"sold_out": false
}
],
"total": 2
}Errors
| Status | When |
|---|---|
401 | No token, or a token that is not valid |
422 | The body or a parameter is not what the operation takes |
Every operation can also answer 401 without a valid token. All errors