Snapshot API
The Snapshot API lets you query the current state of any join or window via a simple HTTPGET request. It solves the “cold start” problem: when a dashboard loads, it can fetch a snapshot of current results immediately instead of waiting for the next SSE event.
Endpoint
/subscribe).
Query Parameters
| Param | Required | Default | Description |
|---|---|---|---|
join | yes | — | Join or window name, or * for all. |
from | no | — | Start time (RFC 3339 or Unix seconds). |
to | no | now | End time (RFC 3339 or Unix seconds). |
limit | no | 10000 | Max rows per join/window. |
keys | no | — | Comma-separated key filter. |
Examples
Fetch all results
Fetch a specific join
Filter by keys
Time-range query
Response Format
The response is a JSON array ofJoinResult objects — identical to SSE event payloads:
Status Codes
| Code | Meaning |
|---|---|
200 | Success (may be an empty array) |
400 | Invalid parameters |
500 | Query execution failed |
503 | Storage not ready (engine initializing) |
Frontend Integration
Snapshot + SSE Pattern
The recommended pattern is to fetch a snapshot for initial state, then open an SSE stream for live updates:Replay Alternative
Instead of a separate fetch, add?replay=true to the SSE URL:
"_replay": true) before switching to live streaming. The replay_complete event signals when initial hydration is done:
Archive Queries
When thefrom parameter extends beyond the retention window (data has been compacted to Parquet), the snapshot handler automatically queries the archive federator if tiered storage is enabled.
This means a single /snapshot request can transparently query data across:
- Hot SQLite (recent data)
- Warm local Parquet files (days old)
- Cold cloud Parquet files (weeks/months old)