Retrieve the details of a specific instance, including resource specifications, data-plane access information, and network and lifecycle configuration. Compatible with the E2B get-sandbox protocol and corresponds to get_info() in the SDK.
Prerequisites
Configure the endpoint and authentication first. See API overview and authentication.
Endpoint
GET /sandboxes/{sandboxID}
Retrieve the details of a specific instance. Compatible with the E2B get-sandbox protocol and corresponds to get_info() in the SDK. Returns 404 if the instance does not exist, with the message 沙箱实例不存在 (the sandbox instance does not exist). If no network or lifecycle configuration exists, the corresponding field is omitted or returned as an empty object.
Path parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
sandboxID | Yes | string | Unique instance ID. |
Request example
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
Response fields
| Field | Type | Description |
|---|---|---|
sandboxID | string | Unique instance ID. |
bailianSandboxId | string | Alibaba Cloud Model Studio extension identifier. Usually not needed by developers. |
templateID | string | Template ID. |
state | string | Instance state, for example running. |
cpuCount | integer | Number of vCPUs. |
memoryMB | integer | Memory size in MB. |
envdVersion | string | envd version. |
domain | string | Data-plane access domain. |
envdAccessToken | string | envd access token. |
trafficAccessToken | string | Traffic access token. |
envdUrl | string | envd access URL. |
allowInternetAccess | boolean | Whether the instance can access the internet. |
network | object | Instance-level network configuration. Sub-fields: allowPublicTraffic (boolean, whether public traffic is allowed), allowOut (array<string>, egress allowlist), denyOut (array<string>, egress denylist). Omitted or returned as an empty object when no network configuration exists. |
lifecycle | object | Lifecycle configuration. Sub-fields: onTimeout (string, behavior on expiry, for example pause), autoResume (boolean, whether connecting to a paused instance resumes it automatically). Omitted or returned as an empty object when no lifecycle configuration exists. |