Skip to main content

List Sandboxes

GET /v1/sessions/sandboxes

List your VMs, newest first, in a compact form: sandbox_id, template_id and name (the snapshot the VM started from, or default), metadata, started_at, end_at (when an active VM's lifetime ends) and status. Filter with metadata, a JSON object: a VM matches when its metadata contains every given key and value. Returns at most limit VMs (1 to 1000, default 100). GET /v1/vms lists the same VMs with more detail.

Authentication​

Requires authentication via: OAuth2PasswordBearer.

Parameters​

NameInTypeRequiredDescriptionConstraints
metadataquerystring | nullNoJSON string of metadata filters, e.g. '{"userId":"123"}'nullable
limitqueryintegerNoMaximum number of resultsdefault=100, min=1, max=1000
X-API-Keyheaderstring | nullNonullable

Responses​

200​

Successful Response

application/json​

Resolved schema:

{
"type": "array",
"items": {
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id"
},
"template_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Template Id"
},
"name": {
"type": "string",
"title": "Name"
},
"metadata": {
"type": "object",
"title": "Metadata"
},
"started_at": {
"type": "string",
"title": "Started At"
},
"end_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "End At"
},
"status": {
"type": "string",
"title": "Status"
}
},
"type": "object",
"required": [
"sandbox_id",
"name",
"metadata",
"started_at",
"status"
],
"title": "VMSandboxInfo",
"description": "One VM as listed by GET /v1/sessions/sandboxes."
},
"title": "Response List Sandboxes V1 Sessions Sandboxes Get"
}

Field details:

FieldTypeRequiredDescriptionConstraints
[]objectYesOne VM as listed by GET /v1/sessions/sandboxes.
[].sandbox_idstringYes
[].template_idstring | nullNonullable
[].namestringYes
[].metadataobjectYes
[].started_atstringYes
[].end_atstring | nullNonullable
[].statusstringYes

400​

metadata is not valid JSON, or not a JSON object.

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.

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:

FieldTypeRequiredDescriptionConstraints
detailarray<object>No
detail[]objectNo
detail[].locarray<string | integer>No
detail[].loc[]string | integerNo
detail[].msgstringNo
detail[].typestringNo