Skip to content
v0.5.1GitHub

Using

Opens a Server-Sent Events stream that delivers real-time change events (`set` / `delete`) for keys matching the optional prefix. The connection stays open until the client disconnects; a keep-alive ping is sent automatically.

applies to v0.5.1
GET
/store-api/kv/{domain}/watch
curl --request GET \
--url https://example.com/store-api/kv/example/watch \
--header 'Authorization: Bearer <token>'

A Last-Event-ID (header or ?last_event_id=) resumes gaplessly from an in-memory replay ring when possible; otherwise the server emits event: reset before continuing live. A client that ignores id:/reset behaves exactly as before this was added.

domain
required
string

Domain name

prefix
string

Key prefix filter

last_event_id
string

Resume id from a previous id: (or event: reset) — for callers that cannot set headers. Ignored when the Last-Event-ID header is present.

Last-Event-ID
string | null

Resume id from a previous id: (or event: reset); set automatically by a native EventSource’s auto-reconnect. Takes precedence over ?last_event_id=.

SSE stream of key change events. Every event carries an id:. Event types: set / delete (data: the key) and reset (data: {"reason": ...}, emitted whenever gapless resume cannot be guaranteed — the client should re-read the domain, then keep applying events normally).

Media typetext/event-stream

Domain is being deleted

Media typetext/plain
string