Interrupt Sandbox Command
DELETE
/v1/sandbox/{sandbox_id}/commandDELETE
/v1/sandbox/{'{sandbox_id}'}/commandYour instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.
Description
Sends an interrupt signal to a background command running in the specified sandbox. Use the command_id returned when the command was launched with background: true.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sandbox_id | string | Yes | Sandbox ID or name |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
command_id | string | Yes | ID of the background command to interrupt |
Responses
200 Success
| Property | Type | Description |
|---|---|---|
status | string | Result of the interrupt operation. Value is "interrupted" on success |
default An unexpected error response.
| Property | Type | Description |
|---|---|---|
code | integer | |
message | string | |
details | object[] |
Request
curl -X DELETE "https://{instance}.{region}.everstack.ai/v1/sandbox/{sandbox_id}/command" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"command_id":"cmd_abc123"}'const sandboxId = "your-sandbox-id";
const response = await fetch(`https://{instance}.{region}.everstack.ai/v1/sandbox/${sandboxId}/command`, {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"command_id": "cmd_abc123",
}),
});
const data = await response.json();import requests
sandbox_id = "your-sandbox-id"
response = requests.delete(
f"https://{instance}.{region}.everstack.ai/v1/sandbox/{sandbox_id}/command",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"command_id": "cmd_abc123",
},
)
data = response.json()Response
{
"status": "interrupted"
}{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
