Skip to main content
GET
Read or tail a setup run's log

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Headers

x-tenant-id
string

Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.

Minimum string length: 1
x-organization-id
string

Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.

Minimum string length: 1

Path Parameters

environmentId
string<uuid>
required

Environment id (UUID).

setupRunId
string<uuid>
required

Setup run id.

Query Parameters

after
integer<int64>

Return lines with seq greater than this. Pass the previous response's next_after to continue a tail; 0 (the default) starts from the beginning.

Required range: 0 <= x <= 9007199254740991
limit
integer

Maximum lines to return. Defaults to 500.

Required range: 1 <= x <= 2000
wait_seconds
integer

When no new lines exist and the run is still going, block up to this many seconds for more before responding. The server caps the wait at 5 seconds; larger values are accepted and clamped. Through the public API, prefer wait_seconds=0, sleep two seconds client-side, and loop with after=next_after until status is terminal.

Required range: 0 <= x <= 60

Response

A page of a setup run's log with the cursor for the next page. stdout, stderr, marker (the script line about to run), and system (setup phase notes) are interleaved in capture order.

A page of a setup run's log with the cursor for the next page. stdout, stderr, marker (the script line about to run), and system (setup phase notes) are interleaved in capture order.

lines
object[]
required

Log lines after the requested cursor, in order. Empty when the run has produced nothing new within the wait.

next_after
integer<int64>
required

Cursor to pass as after on the next call. Equal to the request's after when no new lines were returned.

Required range: -9007199254740991 <= x <= 9007199254740991
status
string
required

The run's status when the page was read. Stop tailing once it is succeeded, failed, or cancelled and the page is empty.

truncated
boolean

True when the run produced more output than is kept (4 MiB). The head is retained; the stderr tail is on the run.