Stream changes to the sessions gestalt as Server-Sent Events
Streams the root sessions in the window whose rows change, as gestalt.change events whose data is a SessionGestaltChange and whose id is the frame’s read timestamp. Resume from a snapshot’s as_of via after, or from the last frame via after or the Last-Event-ID header. A gestalt.reset event means more changed than one frame carries: take a fresh snapshot, then reconnect from its as_of. Idle ticks send nothing; a comment heartbeat proves liveness. Each change feed applies the caller’s access policy: ordinary callers receive only unclassified public roots, while callers with elevated classified-data access can receive classified updates and deletes. Each stream holds a server-side slot and is capped separately from the request rate, so close it when you are done.
Authorizations
A Recursion API key, created in the console under API keys.
Headers
RFC 3339 read timestamp to resume from when after is absent. Required one way or the other, and rejected once more than 30 days old: take a new snapshot instead.
Query Parameters
The same agent_id filter used for the snapshot.
RFC 3339 start of the window, the same value the snapshot was taken with.
RFC 3339 read timestamp to resume from: the snapshot's as_of, or the last frame's. The Last-Event-ID header is honoured when this is absent. Required one way or the other, and rejected once more than 30 days old: take a new snapshot instead.
Response
OK
- Option 1
- Option 2
One Server-Sent Event of streamSessionGestalt: the root sessions whose rows changed since the previous frame, with the read timestamp to resume from. Ordinary callers receive only unclassified public roots; callers with elevated classified-data access can receive classified updates and deletes.
Read timestamp of this frame; also sent as the SSE id, so a reconnect with Last-Event-ID resumes here.
Roots visible to the caller in the window whose row changed since the previous frame, each carrying its whole current state; merge them by session_id. Ordinary callers omit classified updates and deletes. A row with deleted true has been removed.
True when more changed than one frame carries. Discard the gestalt and take a fresh snapshot; sessions is empty.