Skip to main content
GET
Read or follow a sandbox's logs

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Last-Event-ID
string

SSE resume: the last event id received. Same as page[after], which wins when both are given.

Path Parameters

sandbox_id
string
required

Sandbox ID (sb-…).

Required string length: 1 - 64

Query Parameters

follow
boolean
default:false

false: one page of stored output as JSON. true: a Server-Sent Events stream of the stored output, then new output as it's stored, until the sandbox ends.

stream
enum<string>

Only stdout or only stderr (and the gaps that touch it), with either value of follow. Which output stream a line came from.

Available options:
stdout,
stderr
page[after]
string

Continue after this position (meta.next_page_after, or an event id). Omit it to start at the beginning of the retained log.

page[size]
integer
default:20

Entries per page (max 100); follow=false only.

Required range: 1 <= x <= 100

Response

follow=false: a JSON page (application/json). follow=true: a Server-Sent Events stream (text/event-stream) of log, gap and end events, whose data are the JSON objects LogLine, LogGap and LogEnd.

A page of stored output, in order. Paged by cursor: pass meta.next_page_after as page[after] for the next page.

data
object[]
required

One line of the sandbox's output.

meta
object
required

Pagination metadata for log reads, which page by cursor. A growing log can't be numbered or counted stably, so there's no page_number, total_pages or total_results.