Skip to content

Get the snapshot schedule of a VPS

GET /api/v2/vps/{id}/snapshot-schedules

Returns the automatic snapshot schedule of a VPS and whether the VPS has snapshot slots. A VPS has at most one schedule. The schedule has no ID of its own. schedule is null when none is set. A snapshot is a quick restore point on the VPS’s own storage, not an offsite backup. Snapshots are deleted 24 hours after they are taken. When limits.totalSnapshots is 0, add slots with snapshotSlots on POST /api/v2/vps/{id}/actions/config. Use backups for an offsite, longer-term copy. They can take longer to create and restore.

Authentication: An API key with the scope read:vm. About keys and scopes

Request

Path parameters

idstringrequired
The VPS ID (vps_…).

Example

GET /api/v2/vps/{id}/snapshot-schedules
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/snapshot-schedules" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The schedule, the slot limit and whether a schedule can be turned on.

Response 200
{
"schedule": null,
"limits": {
"totalSnapshots": 0
},
"available": false,
"reason": "Snapshots are not available on your current plan.",
"actions": {
"canEnable": {
"allowed": false,
"reason": "Snapshots are not available on your current plan."
}
}
}
Response fields
scheduleobject or null
The schedule. Null when none is set.
limitsobject
Snapshot slots on the VPS.
totalSnapshotsinteger
Number of snapshots the VPS can hold at once. 0 means the plan has no snapshot slots.
availableboolean
True when the VPS has at least one snapshot slot.
reasonstring or null
Why snapshots are not available. Null when they are.
actionsobject
What the caller can do now.
canEnableobject
Whether POST with enabled: true is allowed now. False without snapshot slots or without permission to change the schedule.
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code names the missing resource: vps_not_found, snapshot_schedule_not_found.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.