Skip to content

List the snapshots of a VPS

GET /api/v2/vps/{id}/snapshots

Lists the snapshots of a VPS, its snapshot slots and whether a snapshot can be taken or restored now. 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 (expiresAt). A snapshot has no ID of its own: use its name as {snapshotId} to restore or delete it. When limits.totalSnapshots is 0, the plan has no snapshot slots. Add slots with snapshotSlots on POST /api/v2/vps/{id}/actions/config. Use backups (POST /api/v2/vps/{id}/backups) for an offsite, longer-term copy. They can take longer to create and restore.

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

Request

Path parameters

idstringrequired
The VPS ID (vps_…).

Example

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

Responses

200 The snapshots, the slot limits and the action gates.

Response 200
{
"data": [
{
"displayId": "before-upgrade",
"name": "before-upgrade",
"description": "Before package upgrade",
"createdAt": "2026-04-27T10:00:00.000Z",
"expiresAt": "2026-04-28T10:00:00.000Z",
"includesMemoryState": false,
"parentName": null
}
],
"available": true,
"reason": null,
"limits": {
"totalSnapshots": 2,
"usedSnapshots": 1
},
"actions": {
"canCreate": {
"allowed": true,
"reason": null
},
"canRestore": {
"allowed": true,
"reason": null
}
}
}
Response fields
dataarray of object
Snapshots on the VPS. When the list cannot be read right now, it comes back empty and limits.usedSnapshots is 0. Read it again before you treat a snapshot as gone.
displayIdstring
Same value as name. Kept for older clients. Use name.
namestring
Snapshot name. Use it as {snapshotId}.
descriptionstring or null
Note given when the snapshot was taken.
createdAtstring or null
When the snapshot was taken.
expiresAtstring or null
When the snapshot is deleted, 24 hours after createdAt.
includesMemoryStateboolean
True when the snapshot also holds the memory state of the running VPS.
parentNamestring or null
Name of the snapshot taken before this one. Null for the oldest.
availableboolean
True when the VPS has at least one snapshot slot.
reasonstring or null
Why snapshots are not available. Null when they are.
limitsobject
Snapshot slots on the VPS.
totalSnapshotsinteger
Number of snapshots the VPS can hold at once. 0 means the plan has no snapshot slots.
usedSnapshotsinteger
Number of snapshots the VPS holds now.
actionsobject
What the caller can do now.
canCreateobject
Whether POST /api/v2/vps/{id}/snapshots is allowed now. False without free slots, while another snapshot job runs or its state could not be checked, when the VPS service is not active, or when the key lacks backup:vm.
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canRestoreobject
Whether a snapshot can be restored now. False without snapshot slots, while another snapshot job runs or its state could not be checked, when the VPS service is not active, or when the key lacks backup:vm.
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 is vps_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.