Event stream

Follow a cycle as it runs, over server-sent events. There are no webhooks: the stream is how a client hears about a round.

Under /api/v1/campaigns/{campaign_id}/cycles/{cycle_id}
Method Path What it does
GET /events:subscribe Subscribe to a cycle’s live ledger over SSE.

Subscribe

curl -N http://127.0.0.1:8001/api/v1/campaigns/{campaign_id}/cycles/{cycle_id}/events:subscribe

A running, paused or finished cycle all answer. Only an unknown cycle is a 404. The descend query reaches an inner cycle.

What arrives

stream_snapshot first frame, once
The served dashboard. Its sequence is the offset the stream picks up at.
ProjectionEnvelope every later record
kind is the record’s type and sequence is its offset in the cycle’s ledger.
heartbeat comment, every 15 s
Keeps the connection open while nothing happens.

The stream is not a stable contract. The record types are listed in the spec.

In the repo

Event stream ↗
docs/developer/event-stream.md
Event stream spec ↗
docs/specs/events-asyncapi.yaml