Skip to documentation
DocumentationAPI referenceManage a snapshot
POSTBearer token

Manage a snapshot

/api/v1/servers/:id/snapshots/action

Create, rename, delete or restore an owned server snapshot. The response describes the operation, not the snapshot.

Before you call

Delete and restore require confirm=true. Restore replaces server data. Repeated requestKey returns the original operation. Query its taskKey rather than blindly retrying.

Request example

cURL
curl "https://tovahub.com/api/v1/servers/507f1f77bcf86cd799439012/snapshots/action" -X POST \
  -H "Authorization: Bearer $TOVAHUB_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
  "action": "create",
  "requestKey": "docs_example_001",
  "name": "before-update"
}'

Examples only. No requests are sent from this page.

Parameters

idPath · Required

string

Resource ID: 24 hexadecimal characters. Use the platform ID returned by the matching list endpoint, not a supplier instance ID.

actionJSON body · Required

"create" | "update" | "delete" | "restore"

Snapshot operation.

requestKeyJSON body · Required

string

8–100 characters: A–Z, a–z, 0–9, underscore or hyphen. Keep the same key and identical input when retrying the same operation.

snapshotIdJSON body · Optional

string

Supplier snapshot ID, 1–80 characters. Needed for update, delete and restore.

nameJSON body · Optional

string

Trimmed name, 1–30 characters. Required for create and update.

descriptionJSON body · Optional

string

Trimmed description, at most 255 characters.

confirmJSON body · Optional

boolean

Explicit confirmation for the operation. Set true only after reviewing its effect. Required for stop (forced power-off), terminate, reinstall and changepass server actions; delete/restore snapshot actions.

Response

HTTP status 200 / 202

Return the durable task status after creating, updating, deleting, or restoring a snapshot.

taskKeystring

Stable platform operation key.

actionstring

Recorded action name.

statestring ('started' | 'succeeded' | 'failed')

Local operation state, distinct from the provider task status.

pendingboolean

HTTP status is 202 when true, otherwise 200.

localFinishPendingboolean

True when a succeeded snapshot request has a saved response, a valid completion time, no supplier task ID and unfinished local acceptance. Use recover_snapshot with the original action and requestKey; task GET remains read-only.

taskIdstring | null

Supplier task identifier, when present.

taskStatusstring | null

Last observed supplier task status.

errorstring | null

Sanitized recorded error, if any.

createdAtstring (ISO 8601)

Local operation creation time.

finishedAtstring (ISO 8601) | null

Local completion time, if present.