Skip to main content

eventStream

GET 

/api/v1/stream

Server-sent events for the UIs and the app: one event per change of an object the caller may see. Each event has id: <position>, event: <type> and one line of data with a StreamEvent; the client re-fetches the object. A comment line is sent every 15 s. After a reconnect, Last-Event-ID continues after that position; when the cloud no longer holds it, the first event is reset and the client reloads its views. A stream without Last-Event-ID starts with what changes from then on (docs/schema/cloud.sql stream_event has the positions). A session, token or device has at most 5 streams open on a server: its next one ends its oldest. A stream checks its caller again before it delivers events and every 15 s, as a new request would be checked, and ends when the session, token or device login is revoked or has expired or the caller may no longer read the stream; what it delivers is what the caller may see then.

Request​

Responses​

Event stream; the data of each event is a StreamEvent