The node records every request it serves, whichever way it arrived: through the edge, from inside a sandbox, or from a tool on the node. Each record has the request's status, size, duration and timing phases, and the edge adds its own phases under the same ID. Records are kept for 7 days. Both calls need platform:read.

Look up one request

Every response carries x-request-id, and every problem repeats it as instance:

bash
curl -s "https://beta-api.b3os.org/v1/requests/$REQUEST_ID" \ -H "Authorization: Bearer $B3OS_API_KEY"
FieldMeaning
method, path, operation_id, productWhat was called; the path has no query string
status_code, error_codeThe response status, and the problem's code when it failed
org_id, project_id, key_idWho called. For calls from a sandbox, key_id is the key that created the sandbox.
nodeThe node that served it; null when the edge answered by itself
connectionedge, sandbox, uds (the node's Unix socket) or tcp (the node's loopback port)
sandbox_idThe calling sandbox, for sandbox connections
started_at, duration_msStart time, and first request byte to last response byte, measured on the node (for streams, until the stream ended)
request_bytes, response_bytesBody sizes
phasesThe node's phases (source: node) and the edge's edge_auth and edge_upstream (source: edge), in order
trace_idThe W3C trace ID from the traceparent you sent
user_agentThe client's user agent

For a request the edge answered itself, such as key management or a request refused before forwarding, the edge returns its own record: node is null and only edge phases appear.

List recent requests

GET /v1/requests lists the node's records for your project, newest first:

bash
curl -s -G https://beta-api.b3os.org/v1/requests \ -H "Authorization: Bearer $B3OS_API_KEY" \ -d product=vision -d status=5xx -d limit=50
FilterExample
productvision
operation_idvisionScrape
status2xx, 4xx or 5xx
key_idkey_01m5t5csy2wt4e3er052chyf1x
connectionsandbox
sandbox_idAll calls one sandbox made
sinceAn RFC 3339 time

The list holds what the node served. Requests the edge answered without forwarding are not listed; fetch those by ID. Timing explains how to read the phases.

Ask a question... ⌘I