List backups
GET/api/v1/vps/{vps_uuid}/backups
The backups of a VPS, newest first, with the next daily start and the backup or restore running now.
Parameters
| Name | In | Description |
|---|---|---|
| vps_uuid | path, stringrequired | VPS id, from Create a VPS or List VPS |
Example request
curl -X GET "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/backups" \
-H "Authorization: Bearer $API_TOKEN"import os, requests
token = os.environ["API_TOKEN"]
vps_uuid = "12d46f8c-d66e-4163-99aa-1245d5b06e5b"
r = requests.get(
f"https://platform.serverscamp.com/api/v1/vps/{vps_uuid}/backups",
headers={"Authorization": f"Bearer {token}"},
)
r.raise_for_status()
print(r.json())const vpsUuid = '12d46f8c-d66e-4163-99aa-1245d5b06e5b';
const r = await fetch(`https://platform.serverscamp.com/api/v1/vps/${vpsUuid}/backups`, {
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 |
|---|---|---|
| enabled | booleanrequired | Daily backups on |
| keep | integer, optional | How many backups are kept, manual ones included |
| schedule | string, optional | Daily start, HH:MM in the host's time |
| next | integer, optional | Unix time of the next daily backup |
| job | VpsBackupJob, optional | The backup or restore running now |
| job.kind | one of backup, restorerequired | |
| job.started | integer, optional | Unix time it started |
| job.pct | integer, optional | How far it got, percent; null before its first progress line |
| items | list of VpsBackuprequired | |
| items[].id | stringrequired | Backup id, for restore and delete |
| items[].created | integer, optional | Unix time it was taken |
| items[].size | integer, optional | Size, bytes |
| items[].manual | booleanrequired | Taken with Back up now, not the daily one |
{
"enabled": true,
"keep": 5,
"schedule": "03:17",
"next": 1792628220,
"job": {
"kind": "backup",
"started": 1792656120,
"pct": 45
},
"items": [
{
"id": "bk-3f9a1c0d2e4b5a69",
"created": 1792541820,
"size": 1287651328,
"manual": false
}
]
}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