Get sandbox logs
Call Create sandbox first and replace sbx_123 with its returned sandboxID.
GET
/e2b/v2/sandboxes/{sandboxID}/logs● SupportedRequest parameters
sandboxIDstringrequiredpath:
cursorintegeroptionalquery: Starting timestamp in Unix milliseconds.
limitintegeroptionalquery: Maximum log entries to return.
directionstringoptionalquery: Read forward or backward in time.
levelstringoptionalquery: Minimum log level to return.
searchstringoptionalquery: Case-sensitive substring filter on log messages.
Returns
200
Errors follow the E2B format — see error codes
Request
curl
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
curl https://api.deepraxis.com/e2b/v2/sandboxes/sbx_123/logs \
-H "X-API-Key: $PRAXIS_API_KEY"Python
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
import requests
opts = dict(
api_key="$PRAXIS_API_KEY",
api_url="https://api.deepraxis.com/e2b",
domain="sandbox.praxisusercontent.com",
)
# Read the v2 sandbox logs over HTTP.
resp = requests.get(
f"{opts['api_url']}/v2/sandboxes/sbx_123/logs",
headers={"X-API-Key": opts["api_key"]},
)
print(resp.json())TypeScript
// Call Create sandbox first and replace sbx_123 with its returned sandboxID.
const opts = {
apiKey: "$PRAXIS_API_KEY",
apiUrl: "https://api.deepraxis.com/e2b",
domain: "sandbox.praxisusercontent.com",
};
// Read the v2 sandbox logs over HTTP.
const resp = await fetch(`${opts.apiUrl}/v2/sandboxes/sbx_123/logs`, {
headers: { "X-API-Key": opts.apiKey },
});
console.log(await resp.json());Response 200
{
"logs": [
{
"timestamp": "2026-10-04T16:11:20.455459068Z",
"level": "info",
"message": "Sandbox created",
"fields": {
"pid": "1"
}
},
{
"timestamp": "2026-10-04T16:11:20.017565389Z",
"level": "debug",
"message": "Started creating sandbox",
"fields": {
"pid": "1"
}
}
]
}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 |