Skip to content

API - Watch

Watch for changes in a namespace via long-polling or SSE streaming.

Long-Polling

GET /v1/watch/{namespace}?timeout={duration}

Blocks until a change occurs or the timeout expires.

bash
curl "http://localhost:7200/v1/watch/myapp/prod?timeout=30s" \
  -H "Authorization: Bearer YOUR_TOKEN"
ParameterDescription
timeoutMax wait duration (e.g. 30s, 1m)

SSE Streaming

GET /v1/watch/{namespace}?stream=true

Opens a Server-Sent Events stream for real-time push notifications.

bash
curl -N "http://localhost:7200/v1/watch/myapp/prod?stream=true" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: text/event-stream"

Events

connected - Stream established:

event: connected
data: {"namespace":"myapp/prod","timestamp":"2025-12-20T10:00:00Z"}

change - Key set or deleted:

event: change
data: {"action":"set","namespace":"myapp/prod","key":"DB_HOST","entry":{...},"timestamp":"2025-12-20T10:01:00Z"}
event: change
data: {"action":"delete","namespace":"myapp/prod","key":"OLD_KEY","timestamp":"2025-12-20T10:02:00Z"}

See Guide - Watch for usage patterns.

Apache License 2.0