Salambo
Browse documentation
Runs

Retrieve retained run events

Returns public Pi and Salambo events in run sequence order. Requires run:read. Event payloads are read from the encrypted S2 stream.

Events are technical history with their own retention, stored apart from the run record. The durable record of a turn, including its status, output, error and agent_version, is the run object from getRun, which stays readable when events are not.

History is a rolling window. Each run keeps the retention period its event streams were provisioned with (14 days by default), and events expire one by one as they age past it, so older events can be gone while newer ones remain. The window is applied here: an event older than the retention period is not returned, even if it is still stored. The period is returned as history.retention_days, and an entitlement change applies to runs created afterwards, not to existing ones.

A read without after reports what it found in history.status: complete when the events begin at the run's first (or the selected turn's first), partial when older events expired and only a retained suffix is returned, expired when events were recorded but every one has expired, and empty when no event has ever been recorded. A page never presents a retained suffix as the whole history. A read with after continues a page and reports no status.

A cursor whose event has expired returns 410 with code event_cursor_expired. 503 with code event_boundary_pending means the first event of an admitted turn is not recorded yet, and 503 with code event_history_unavailable means the history service could not be read, or a stream that held events is missing. Both are retryable, and neither is ever reported as empty or expired.

GET/runs/{runId}/events

Authorization

AuthorizationBearer <token>

Path parameters

runIdstringrequired
pattern
"^run_[A-Za-z0-9]+$"

Query parameters

turn_idstring
pattern
"^turn_[A-Za-z0-9]+$"
limitinteger
minimum
1
maximum
1000
default
100
afterstring
pattern
"^evt_[a-f0-9]{12}x[a-z0-9]+$"

Response

application/json

Retained event page.

object

Additional properties are allowed.

objectstringrequired
const
"list"
dataarrayrequired
Show nested schema
Array items
object

Public Pi or Salambo event. Unknown types and additive fields remain valid.

Additional properties are allowed.

idstringrequired
pattern
"^evt_[a-f0-9]{12}x[a-z0-9]+$"
sequenceintegerrequired
minimum
1
sourcestringrequired
enum
["pi","salambo"]
typestringrequired
minLength
1
run_idstringrequired
pattern
"^run_[A-Za-z0-9]+$"
turn_idstringrequired
pattern
"^turn_[A-Za-z0-9]+$"
created_atintegerrequired
minimum
0
dataobjectrequired

Additional properties are allowed.

has_morebooleanrequired
next_cursorunionrequired
Show nested schema
Exactly one of
string1
string
pattern
"^evt_[a-f0-9]{12}x[a-z0-9]+$"
null2
null
historyobjectrequired

What is known about the run's event history. Events expire one by one, so no single timestamp says when history ends.

Additional properties are allowed.

Show nested schema
statusunionrequired

What a read without after found, and null for a read with after. complete: the events begin at the run's first event (or the selected turn's first) and nothing older has expired. partial: older events expired and the page holds the events that remain. expired: events were recorded and every one has expired, so data is empty. empty: no event has ever been recorded.

Show nested schema
Exactly one of
string1
string
enum
["complete","partial","expired","empty"]
null2
null
retention_daysunionrequired

The rolling retention period in days that this run's event streams were provisioned with. It does not change when the workspace's entitlement does. null while the run has no event stream yet.

Show nested schema
Exactly one of
integer1
integer
minimum
1
maximum
365
null2
null