List plans
GET/api/v1/vps/plans
The plans on sale. Their ids go into Create a VPS and Change the plan.
Example request
curl -X GET "https://platform.serverscamp.com/api/v1/vps/plans" \
-H "Authorization: Bearer $API_TOKEN"import os, requests
token = os.environ["API_TOKEN"]
r = requests.get(
f"https://platform.serverscamp.com/api/v1/vps/plans",
headers={"Authorization": f"Bearer {token}"},
)
r.raise_for_status()
print(r.json())const r = await fetch(`https://platform.serverscamp.com/api/v1/vps/plans`, {
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 VpsPlanrequired | |
| items[].id | stringrequired | Plan id, for create and plan changes |
| items[].name | stringrequired | Name shown in the Cloud Panel |
| items[].vcpu | integerrequired | vCPU cores |
| items[].cpu_limit | number, optional | Share of the cores the server may use, set on plans below one full core |
| items[].ram_gb | numberrequired | Memory, GB |
| items[].disk_gb | integerrequired | Disk, GB |
| items[].traffic_gb | integerrequired | Outbound traffic a month, GB; after it the port runs at 100 Mbit/s |
| items[].net_mbit | integerrequired | Port speed, Mbit/s |
| items[].disk_iops | integerrequired | Disk operations a second |
| items[].disk_mbps | integerrequired | Disk throughput, MB/s |
| items[].price_monthly | numberrequired | Price a month, EUR, billed by the hour |
| items[].backup_share | numberrequired | Daily backups add this share of the plan price |
{
"items": [
{
"id": "vps2-1",
"name": "VPS 1",
"vcpu": 1,
"cpu_limit": null,
"ram_gb": 1,
"disk_gb": 20,
"traffic_gb": 1000,
"net_mbit": 1000,
"disk_iops": 10000,
"disk_mbps": 250,
"price_monthly": 1.5,
"backup_share": 0.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