Get a command
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vms.dev/api/v1/sandboxes/{id}/commands/{commandId}', 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}/commands/{commandId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://vms.dev/api/v1/sandboxes/{id}/commands/{commandId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "cmd_01jz8x3n9q2v7k4m6p8r0t2w4y",
"sandboxId": "<string>",
"argv": [
"<string>"
],
"cwd": "<string>",
"status": "running",
"pid": 4503599627370495,
"detached": true,
"startedAt": "2023-11-07T05:31:56Z",
"exitedAt": "2023-11-07T05:31:56Z",
"exitCode": 0,
"signal": "SIGTERM",
"oomKilled": true,
"timedOut": true,
"lastSeq": 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>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Commands
Get a command
Returns one command with its status and its exit result. Needs the sandboxes:exec scope.
GET
/
v1
/
sandboxes
/
{id}
/
commands
/
{commandId}
Get a command
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vms.dev/api/v1/sandboxes/{id}/commands/{commandId}', 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}/commands/{commandId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://vms.dev/api/v1/sandboxes/{id}/commands/{commandId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "cmd_01jz8x3n9q2v7k4m6p8r0t2w4y",
"sandboxId": "<string>",
"argv": [
"<string>"
],
"cwd": "<string>",
"status": "running",
"pid": 4503599627370495,
"detached": true,
"startedAt": "2023-11-07T05:31:56Z",
"exitedAt": "2023-11-07T05:31:56Z",
"exitCode": 0,
"signal": "SIGTERM",
"oomKilled": true,
"timedOut": true,
"lastSeq": 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>"
}
}{
"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 command.
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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$