Snapshot Vm
POST /v1/vms/{vm_id}/snapshot
Save a full snapshot (memory and disk) of a running VM and return its
snapshot_id when it is ready. The VM is paused while the snapshot is taken, then
keeps running, and the snapshot counts toward your snapshot limits. Pass the id as
snapshot_id to POST /v1/vms to start new VMs from this state; use
POST /v1/vms/{vm_id}/clone to copy a VM in one step, or suspend to stop the VM
and keep its state.
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
vm_id | path | string | Yes | ||
wait | query | boolean | No | Wait for snapshot creation to finish | default=true |
X-API-Key | header | string | null | No | nullable |
Request Body
Required: Yes
application/json
Resolved schema:
{
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Name"
}
},
"type": "object",
"title": "VMSnapshotRequest"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
name | string | null | No | nullable |
Responses
200
Successful Response
application/json
Resolved schema:
{
"properties": {
"snapshot_id": {
"type": "string",
"title": "Snapshot Id"
},
"status": {
"type": "string",
"title": "Status"
}
},
"type": "object",
"required": [
"snapshot_id",
"status"
],
"title": "VMSnapshotResponse"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
snapshot_id | string | Yes | ||
status | string | Yes |
400
wait=false is not supported for snapshots.
No response body.
401
No credentials, or the Bearer token / X-API-Key is invalid.
No response body.
403
The account is disabled, or a guest token was used; or the VM belongs to another account.
No response body.
404
VM not found.
No response body.
409
The VM is not running, or it is being recovered or torn down.
No response body.
422
Validation Error
application/json
Resolved schema:
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |
429
Your snapshot rate limit or daily snapshot quota is reached.
No response body.
503
The VM is temporarily unreachable, or the snapshot failed transiently. Retry later.
No response body.