Skip to main content
GET
Stream a sandbox command's output (SSE)

Path Parameters

id
string
required
commandId
string
required

Query Parameters

afterSeq
integer<int64> | null

Resume after this seq: events up to and including it are not replayed. Omitted, the stream starts from the first event the sandbox still holds. The Last-Event-ID header does the same on an SSE reconnect.

Required range: x >= 0

Response

200 - text/event-stream

SSE stream of a command's output events.

One event of a command's output stream. Every event is delivered as the SSE data: JSON with type telling it apart, and carries seq as the SSE id: so a dropped connection resumes where it left off.

seq
integer<int64>
required

Position of the event in the command's output. Starts at 1 and increases by one per event; pass it back as afterSeq or Last-Event-ID to resume.

type
enum<string>
required

Which part of the output this event is.

Available options:
stdout,
stderr,
exit,
truncated
data
string

The output chunk, base64 encoded. Set for stdout and stderr events.

exitCode
integer<int32>

Exit code, on the exit event when the command exited on its own.

signal
string

Signal that ended the command, on the exit event when one did.