E2B
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.
GET
/e2b/v2/sandboxes/{sandboxID}/logs● SupportedRequest parameters
sandboxIDstring必填path:
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 |