Get sandbox logs
Read sandbox logs with cursor, direction, level and text filters.
Call Create sandbox first and replace sbx_123 with its returned sandboxID.
/sandbox/v1/sandboxes/{sandboxID}/logs● SupportedRequest parameters
sandboxIDstring必填path: Sandbox ID.
cursorinteger可选query: Starting timestamp in Unix milliseconds.
limitinteger可选query: Maximum log entries to return.
directionstring可选query: Read forward or backward in time.
levelstring可选query: Minimum log level to return.
searchstring可选query: Case-sensitive substring filter on log messages.
Returns
200
Errors follow the E2B format — see error codes
Response
HTTP 200
Successfully returned the sandbox logs
application/json
| Name | Type | Description |
|---|---|---|
| logs | array<object> | Sandbox logs structured |
| logs[].timestamp | string | Timestamp of the log entry |
| logs[].message | string | Log message content |
| logs[].level | string | State of the sandbox |
| logs[].fields | object | Structured key/value fields attached to the log line. |
Update sandbox network
Update whether the sandbox can access the internet.
Extend a running sandbox without shortening its deadline
Extend a running sandbox only when it needs a later expiry; this never resumes a paused sandbox. Timeout is seconds from now, not added to the prior deadline, and must be 900, 1800 or 3600. Returns 409 for paused, expired, or non-extending requests.