Get a sandbox
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vms.dev/api/v1/sandboxes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://vms.dev/api/v1/sandboxes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://vms.dev/api/v1/sandboxes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "sbx_06d8k3m7q2v9x4b1n5c0e8f2ja",
"name": "<string>",
"state": "creating",
"size": "small",
"health": "ok",
"errorReason": "host_lost",
"labels": {},
"ipv6": "2604:2dc0:100:32d5::1a",
"urls": [
{
"id": "url_06d8k3m7q2v9x4b1n5c0e8f2jb",
"sandboxId": "sbx_06d8k3m7q2v9x4b1n5c0e8f2ja",
"port": 3000,
"url": "https://agent-42-3000-k3m7q2v9.vmsdev.run",
"public": true,
"token": "vmsu_Gq3n0Yb1c2d3e4f5g6h7i8j9k0l1m2n3o4p5q6r7s8t",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"sshHostKey": "<string>",
"sshUser": "agent-42-k3m7q2v9",
"stopAt": "2023-11-07T05:31:56Z",
"stopAfterSeconds": 3600,
"dataExpiresAt": "2023-11-07T05:31:56Z",
"latestSnapshotAt": "2023-11-07T05:31:56Z",
"snapshotVerifiedAt": "2023-11-07T05:31:56Z",
"lastSnapshotLagSeconds": 4503599627370495,
"snapshotProgress": 0.5,
"hydrated": true,
"hydratedAt": "2023-11-07T05:31:56Z",
"hydration": {
"phase": "folding",
"filesDone": 4503599627370495,
"filesTotal": 4503599627370495,
"errorCode": "hydration_failed"
},
"lastReboot": {
"reason": "crash",
"at": "2023-11-07T05:31:56Z"
},
"operation": {
"id": "op_06d8k3m7q2v9x4b1n5c0e8f2ja",
"sandboxId": "sbx_06d8k3m7q2v9x4b1n5c0e8f2ja",
"kind": "create",
"status": "pending",
"error": {
"code": "no_capacity",
"message": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
},
"forkedFrom": "sbx_06d8k3m7q2v9x4b1n5c0e8f2ja",
"imageVersion": "ubuntu-26.04-20261116130819",
"pinImage": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"costMicros": 4503599627370495
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Sandboxes
Get a sandbox
Returns one sandbox with its latest operation. After a delete, the first request returns the sandbox with the state deleted, and each later request answers 404. Needs the sandboxes:read scope.
GET
/
v1
/
sandboxes
/
{id}
Get a sandbox
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vms.dev/api/v1/sandboxes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://vms.dev/api/v1/sandboxes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://vms.dev/api/v1/sandboxes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "sbx_06d8k3m7q2v9x4b1n5c0e8f2ja",
"name": "<string>",
"state": "creating",
"size": "small",
"health": "ok",
"errorReason": "host_lost",
"labels": {},
"ipv6": "2604:2dc0:100:32d5::1a",
"urls": [
{
"id": "url_06d8k3m7q2v9x4b1n5c0e8f2jb",
"sandboxId": "sbx_06d8k3m7q2v9x4b1n5c0e8f2ja",
"port": 3000,
"url": "https://agent-42-3000-k3m7q2v9.vmsdev.run",
"public": true,
"token": "vmsu_Gq3n0Yb1c2d3e4f5g6h7i8j9k0l1m2n3o4p5q6r7s8t",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"sshHostKey": "<string>",
"sshUser": "agent-42-k3m7q2v9",
"stopAt": "2023-11-07T05:31:56Z",
"stopAfterSeconds": 3600,
"dataExpiresAt": "2023-11-07T05:31:56Z",
"latestSnapshotAt": "2023-11-07T05:31:56Z",
"snapshotVerifiedAt": "2023-11-07T05:31:56Z",
"lastSnapshotLagSeconds": 4503599627370495,
"snapshotProgress": 0.5,
"hydrated": true,
"hydratedAt": "2023-11-07T05:31:56Z",
"hydration": {
"phase": "folding",
"filesDone": 4503599627370495,
"filesTotal": 4503599627370495,
"errorCode": "hydration_failed"
},
"lastReboot": {
"reason": "crash",
"at": "2023-11-07T05:31:56Z"
},
"operation": {
"id": "op_06d8k3m7q2v9x4b1n5c0e8f2ja",
"sandboxId": "sbx_06d8k3m7q2v9x4b1n5c0e8f2ja",
"kind": "create",
"status": "pending",
"error": {
"code": "no_capacity",
"message": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
},
"forkedFrom": "sbx_06d8k3m7q2v9x4b1n5c0e8f2ja",
"imageVersion": "ubuntu-26.04-20261116130819",
"pinImage": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"costMicros": 4503599627370495
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Authorizations
Response
The sandbox.
When the sandbox stops on its own. Null when auto-stop is off or the sandbox does not run.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$When the saved files are deleted: 30 days after a stop, or at a delete. Null while the sandbox runs.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$When the last restore put each saved file on the local disk. Null when the sandbox did not restore saved files.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$