Account summary
GET/api/v1/vps/summary
What all your VPS cost together and how long the balance lasts at that rate.
Example request
curl -X GET "https://platform.serverscamp.com/api/v1/vps/summary" \
-H "Authorization: Bearer $API_TOKEN"import os, requests
token = os.environ["API_TOKEN"]
r = requests.get(
f"https://platform.serverscamp.com/api/v1/vps/summary",
headers={"Authorization": f"Bearer {token}"},
)
r.raise_for_status()
print(r.json())const r = await fetch(`https://platform.serverscamp.com/api/v1/vps/summary`, {
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 |
|---|---|---|
| paid_balance_eur | numberrequired | Balance the VPS draw from, EUR |
| runway_days | integer, optional | Days the balance lasts at the current rate; null with no VPS |
| hourly_eur | numberrequired | What all VPS cost together an hour, EUR |
| monthly_eur | numberrequired | The same a month, EUR |
| backups_on | integerrequired | VPS with daily backups on |
| vcpu | integerrequired | vCPU of all VPS |
| ram_gb | numberrequired | Memory of all VPS, GB |
| disk_gb | integerrequired | Disk of all VPS, GB |
{
"paid_balance_eur": 42.5,
"runway_days": 283,
"hourly_eur": 0.0063,
"monthly_eur": 4.5,
"backups_on": 1,
"vcpu": 3,
"ram_gb": 3,
"disk_gb": 60
}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