Documentation menu

Live audit-event stream (Server-Sent Events)

GEThttps://api.instacloud.com/projects/{projectId}/events/stream

Token scope: account · org · project — read-only tokens allowed.

A long-lived text/event-stream. Each audit event carries the new row's id, projectId, branchId, source, kind and createdAt — never its payload; read that from GET /projects/{projectId}/events. Send the last event id back as Last-Event-ID to have what followed replayed (the opening frame carries an id too, so an idle stream can resume); the replay overlaps, so an event can arrive twice — dedupe by its id. A reset event means the gap could not be replayed in full (or the server lost its own subscription): refetch every view. A live event (projectId, branchId, kind; no id) signals progress that records no audit row — a service coming online, a build or deploy changing stage, a template run advancing — so refetch what its kind names; it is never replayed. The server ends each stream after a few minutes; reconnect with the cursor.

Parameters

NameInTypeRequiredDescription
projectIdpathstringyes
last-event-idheaderstringnothe `id` of the last event received; what followed it is replayed first

Responses

200

Server-Sent Events: audit, live and reset events

View as Markdown