Every record version, as Server-Sent Events

The change feed as a text/event-stream (WHATWG Server-Sent Events). Each event is event: record.version, with the same JSON an entry of GET /api/network/changes carries and id set to its cursor, so a client that reconnects with Last-Event-ID (every EventSource does) resumes exactly after the last event it received. Without Last-Event-ID or after, the stream starts now. A connection is held for about 50 seconds and closed with a comment; the client reconnects (retry: 3000). A comment is sent every 15 seconds on a quiet stream. Errors before the stream opens are RFC 9457 problem details. Readable cross-origin: the response carries Access-Control-Allow-Origin: * and never Access-Control-Allow-Credentials, so a browser on any site may read it without cookies.

get/api/network/changes/stream

Request

  • Base URL: https://trooth.co
  • URL: https://trooth.co/api/network/changes/stream
  • Auth: none required

Query parameters

afterstring

The same as Last-Event-ID, for a client that cannot set headers.

Headers

Last-Event-IDstring

The id of the last event received; the stream resumes after it.

Response

An event stream of record.version events.

Changes

No recorded changes to this operation across all 1 revision of this API.