Resume sandbox
Resume a paused instance, which continues from the file system and memory state captured when it was paused. Compatible with the E2B resume protocol.
Prerequisites
Configure the endpoint and authentication first. See API overview and authentication.
Endpoint
/sandboxes/{sandboxID}/resumeResume a paused instance, which continues from the file system and memory state captured when it was paused. Compatible with the E2B resume protocol.
Path parameters
sandboxIDstringRequiredUnique instance ID.
Request body
The request body is optional.
timeoutintegerOptionalInstance timeout after resuming, in seconds. Valid range: [300,604800].
Response fields
sandboxIDstringUnique instance ID.
templateIDstringTemplate ID.
envdVersionstringenvd version.
domainstringData-plane access domain.
envdAccessTokenstringenvd access token.
trafficAccessTokenstringTraffic access token.
envdUrlstringenvd access URL.
statestringInstance state, for example running.
Request example
curl -X POST "$BASE_URL/sandboxes/sbx-xxx/resume" \
-H "Authorization: Bearer $BAILIAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"timeout": 3600}'
BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/agentstudio/sandbox, and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API key.
Response example
Returns 200 with the full connection information on success.
{
"sandboxID": "sbx-xxx",
"templateID": "your-template-id",
"envdVersion": "your-envd-version",
"domain": "your-sandbox-domain",
"envdAccessToken": "your-envd-access-token",
"trafficAccessToken": "your-traffic-access-token",
"envdUrl": "your-envd-url",
"state": "running"
}