/v1/vms/{uid}/snapshots/{snapshot_uid}Deletes one of the VM's snapshots. The snapshot shows deleting until the operation
finishes. To delete a snapshot whose VM no longer exists, use
Delete a snapshot.
This is asynchronous. It returns 202 Accepted with an operation_id. See
Get an operation. Send an X-Idempotency key to make
retries safe: a retry with the same key for the same snapshot returns the original
operation with 200, even after the snapshot is gone.
Authentication
Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.
Path parameters
uidstringRequiredThe VM's uid.
snapshot_uidstringRequiredThe snapshot's uid.
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
X-IdempotencystringOptional unique key for this request, such as a UUID. Leading and trailing spaces are
ignored. If you send a key you already used for the same snapshot action, the original
operation is returned with 200 OK and X-Idempotency-Replay: true, and nothing new is
queued. Reusing a key for a different action or snapshot returns 409 with
action: idempotency_key_reused. Keys are shared across the workspace. Without a key,
every request is treated as new.
Response
The delete operation was queued. name is the VM's name.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredUID of the queued operation. Poll it with Get an operation. The snapshot is the operation's resource_uid.
vm_uidstringRequiredUID of the VM from the request path. For Delete a snapshot, the snapshot's source VM, or empty on a replay.
namestringRequiredName of the VM for VM-scoped requests (empty on a replay if the VM is gone). Name of the snapshot for Delete a snapshot.
actionstringRequiredThe action that was queued.
One ofvm_snapshot.createvm_snapshot.restorevm_snapshot.delete
statusstringRequiredStatus of the operation.
One ofqueuedrunningsucceededfailed
events_urlstringRequiredPath of the server-sent events stream with the operation's progress.
is_replaybooleanRequiredtrue when an existing operation was returned for a reused X-Idempotency key.
is_completedbooleanRequiredtrue when a returned existing operation has already finished.
Response
Replay. The X-Idempotency key was already used for this snapshot action, so the existing
operation is returned and nothing is queued. vm_uid is the VM from the request path and
name is that VM's current name (empty if it is gone). For
Delete a snapshot, vm_uid is empty and name is the
snapshot's name.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredUID of the queued operation. Poll it with Get an operation. The snapshot is the operation's resource_uid.
vm_uidstringRequiredUID of the VM from the request path. For Delete a snapshot, the snapshot's source VM, or empty on a replay.
namestringRequiredName of the VM for VM-scoped requests (empty on a replay if the VM is gone). Name of the snapshot for Delete a snapshot.
actionstringRequiredThe action that was queued.
One ofvm_snapshot.createvm_snapshot.restorevm_snapshot.delete
statusstringRequiredStatus of the operation.
One ofqueuedrunningsucceededfailed
events_urlstringRequiredPath of the server-sent events stream with the operation's progress.
is_replaybooleanRequiredtrue when an existing operation was returned for a reused X-Idempotency key.
is_completedbooleanRequiredtrue when a returned existing operation has already finished.
Errors
| Status | Meaning |
|---|---|
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
404 | The VM or snapshot does not exist, or the snapshot was not taken from this VM. |
409 | The snapshot is already being deleted (snapshot is already being deleted), or the X-Idempotency key was used for a different operation (action: idempotency_key_reused). |
Errors use the standard error format.