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 "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 · Requiredstring
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 · Requiredstring
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 · Optionalstring
Supplier snapshot ID, 1–80 characters. Needed for update, delete and restore.
nameJSON body · Optionalstring
Trimmed name, 1–30 characters. Required for create and update.
descriptionJSON body · Optionalstring
Trimmed description, at most 255 characters.
confirmJSON body · Optionalboolean
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.
taskKeystringStable platform operation key.
actionstringRecorded action name.
statestring ('started' | 'succeeded' | 'failed')Local operation state, distinct from the provider task status.
pendingbooleanHTTP status is 202 when true, otherwise 200.
localFinishPendingbooleanTrue 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 | nullSupplier task identifier, when present.
taskStatusstring | nullLast observed supplier task status.
errorstring | nullSanitized recorded error, if any.
createdAtstring (ISO 8601)Local operation creation time.
finishedAtstring (ISO 8601) | nullLocal completion time, if present.