HTTP APIEndpoints
Read or stream events
GET
Returns a page of retained events as JSON, or streams history and live updates when called with Accept: text/event-stream. Pass after (or Last-Event-ID) with the last retained event's cursor to resume from a known position. Returns 409 cursor_unavailable if the cursor points to an unsynced tail lost during restore.
bearerheader
AuthorizationBearer <token>id*stringOpaque session ID.
Match
^[a-fA-F0-9]{32}$after?stringOpaque cursor from the last retained event.
limit?integerMaximum number of items to return (JSON mode).
Range
1 <= value <= 1000Default
100Last-Event-ID?stringSSE reconnect cursor (used when the after query parameter is omitted).
Read or stream events
- response
events*array<>next_cursor*stringcurl -X GET 'http://127.0.0.1:8080/sessions/string/events' \ -H 'Authorization: Bearer <BRAIN_TOKEN>'{ "events": [ { "cursor": "string", "data": null, "id": "string", "input_id": "string", "time": "2019-08-24T14:15:22Z", "type": "string" } ], "next_cursor": "string"}