Suspend Vm Endpoint
POST /v1/vms/{vm_id}/suspend
Suspend one of your running VMs: its memory and disk are saved and it stops running.
The call returns at once with status suspending. Resume it with POST
/v1/vms/{vm_id}/resume, which returns a new vm_id; if the session has
auto_resume set, the next execute, share, PTY or SSH request resumes it for you.
Unlike POST /v1/vms/{vm_id}/snapshot, the saved state can only resume this VM, and
deleting the VM deletes it. Returns 400 where suspend is not enabled.
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
vm_id | path | string | Yes | ||
X-API-Key | header | string | null | No | nullable |
Responses
200
Successful Response
application/json
Resolved schema:
{}
400
Auto-suspend is not enabled on this server.
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.
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 |
503
The VM is temporarily unreachable. Retry later.
No response body.