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● Supported

Official E2B docs ↗

Request parameters

  • sandboxIDstring必填

    path:

  • cursorinteger可选

    query: Starting timestamp in Unix milliseconds.

  • limitinteger可选
    默认 1000

    query: Maximum log entries to return.

  • directionstring可选

    query: Read forward or backward in time.

    取值 forwardbackward
  • levelstring可选

    query: Minimum log level to return.

    取值 debuginfowarnerror
  • 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

NameTypeDescription
logsarray<object>Sandbox logs structured
logs[].timestampstringTimestamp of the log entry
logs[].messagestringLog message content
logs[].levelstringState of the sandbox
logs[].fieldsobject