Skip to content

Stream events (Server-Sent Events)

GET
/v1/events/stream
curl --request GET \
--url https://api.aerandil.com/v1/events/stream \
--header 'Authorization: Bearer <token>'

Server-Sent Events tail of the event log. The polling endpoint at GET /v1/events is the right contract for batched durable consumers (replayable, indifferent to downtime); the streaming surface exists for live agents that can’t afford the poll-sleep-poll latency.

Both surfaces emit the same EventRow shape — a client can swap between polling and streaming without re-tooling filters.

Resume. The Last-Event-ID request header (auto-set by browser EventSource on reconnect) carries the last observed seq and wins over the since query parameter.

Frames. The default frame has id: <seq> and data: <EventRow JSON>. An error frame (event: error) is emitted when an event row fails to serialise — the consumer reconnects with the last known id. Comment-only heartbeat frames (: keepalive\n\n) keep idle connections open across NAT/LB cull windows and are not modeled here (per the OAI registry, SSE comments are out of scope).

Last-Event-ID
string
/^\d+$/

Resume cursor (last observed seq). Set automatically by browser EventSource on reconnect; wins over the since query parameter when both are present.

since
integer

Numeric seq resume cursor for SDKs that don’t speak the standard Last-Event-ID reconnect header. Strict greater-than (seq > since). Loses to Last-Event-ID when both are set.

correlation_id
string format: uuid

Same shape as /v1/events?correlation_id=….

object_type
string

Same shape as /v1/events?object_type=….

property_id
string format: uuid

Same shape as /v1/events?property_id=… — the house a handset or desk is standing in.

Open Server-Sent Events stream. Runs until the client disconnects; idle connections are kept alive by : keepalive comment frames every ~15 seconds.

Media typetext/event-stream
One of: discriminator: event
object
data
required
One of: discriminator: kind
object
correlation_id
string format: uuid
id
required
string format: uuid
kind
required
string
Allowed value: object_created
Allowed values: object_created
object_type
required
string
principal
required
One of: discriminator: kind
object
kind
required
string
Allowed value: system
Allowed values: system
seq
required
integer
ts
required
string format: date-time
event
required

SSE default event name. On the wire the server omits the event: line for these frames; the OAI registry models the default name explicitly so generated SDKs can dispatch.

string
Allowed value: message
Allowed values: message
id
required

Stringified seq of the carried event row.

string
/^\d+$/
Cache-Control
string
Allowed value: no-store

Always no-store — forever-streaming body.