Using
Opens a Server-Sent Events stream of global lifecycle/DDL events: domains created, deleted and purged across all three engines, plus relational table/view/index DDL and JSON index DDL. Admin-only — the path carries no domain segment, so the standard auth middleware rejects any non-admin caller.
applies to v0.5.1const url = 'https://example.com/store-api/events';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/store-api/events \ --header 'Authorization: Bearer <token>'A Last-Event-ID (header or ?last_event_id=, header wins) resumes gaplessly from an in-memory
replay ring when possible; otherwise the server emits event: reset before continuing live. This
stream has its own tag (g) and sequence, entirely independent of GET /store-api/kv/{domain}/watch’s
(w) — an id from one stream is unknown_id at the other.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Resume id from a previous id: (or event: reset) — for callers that cannot set headers. Ignored when the Last-Event-ID header is present.
Header Parameters
Section titled “Header Parameters”Resume id from a previous id: (or event: reset); set automatically by a native EventSource’s auto-reconnect. Takes precedence over ?last_event_id=.
Responses
Section titled “Responses”SSE stream of lifecycle/DDL events across the KV, JSON and relational engines: domains created/deleted/purged, and (rel) table/view/index DDL, (json) index DDL. No per-key data events — use a domain’s watch for those. Every event carries an id:; event: matches its type field (e.g. domain_created, table_altered). data: is JSON {engine, type, domain, object?, ts} — object is the table/view/index/field name, absent for domain events. event: reset (data: {"reason": ...}) is emitted whenever gapless resume cannot be guaranteed.
Missing or invalid API key
Non-admin caller — this endpoint has no {domain} segment, so it is admin-only