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
idstringrequiredThe VPS ID (
vps_…).Example
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.
{ "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 nullThe schedule. Null when none is set.
limitsobjectSnapshot slots on the VPS.
totalSnapshotsintegerNumber of snapshots the VPS can hold at once.
0 means the plan has no snapshot slots.availablebooleanTrue when the VPS has at least one snapshot slot.
reasonstring or nullWhy snapshots are not available. Null when they are.
actionsobjectWhat the caller can do now.
canEnableobjectWhether
POST with enabled: true is allowed now. False without snapshot slots or without permission to change the schedule.allowedbooleanreasonstring or nullcodestring or nullA 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.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not 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. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |