List running sandboxes
List your running sandboxes with paging and state filters.
/sandbox/v1/sandboxes● SupportedRequest parameters
metadatastring可选query: Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded.
statearray可选query: live: running; exited: finished; all: all retained observations. Defaults to live.
orderstring可选query: Sort direction by sandbox start time. Defaults to desc (newest first).
startedAfterstring可选query: Return sandboxes started at or after this timestamp.
templatestring可选query: Filter sandboxes by a template ID or alias.
nextTokenstring可选query: Cursor to start the list from
limitinteger可选query: Maximum number of items to return per page
namestring可选query: Case-insensitive literal name substring, 1–64 characters after trimming. Chinese, %, _ and backslash match literally. Combines with filters and pagination; historical NULL names do not match.
Returns
200
Errors follow the E2B format — see error codes
Response
HTTP 200
Successfully returned all running sandboxes
application/json
| Name | Type | Description |
|---|---|---|
| [].templateID | string | Identifier of the template from which is the sandbox created |
| [].alias | string | Alias of the template |
| [].sandboxID | string | Identifier of the sandbox |
| [].clientID | string | Identifier of the client |
| [].startedAt | string | Time when the sandbox was started |
| [].endAt | string | Time when the sandbox will expire |
| [].cpuCount | integer | CPU cores for the sandbox |
| [].memoryMB | integer | Memory for the sandbox in MiB |
| [].diskSizeMB | integer | Disk size for the sandbox in MiB |
| [].metadata | any | Your own string key/value pairs stored with the sandbox; usable as a filter in listSandboxes. |
| [].state | string | State of the sandbox |
| [].envdVersion | string | Version of the envd running in the sandbox |
| [].volumeMounts | array<object> | Volumes mounted into the sandbox. |
| [].volumeMounts[].name | string | Name of the volume |
| [].volumeMounts[].path | string | Path of the volume |
Upgrade to a full sandbox
Upgrade a light instance to a full sandbox, terminating programs, processes and terminals. Files, sandbox ID and name are preserved. Returns HTTP 200 with sandbox detail and a new envdAccessToken; reconnect with it because the old token is revoked. Migration failure preserves source files but does not restart programs. Own face only; E2B ingress returns 404.
Get a sandbox
Get a sandbox's state, template, resources and expiry.