Query Analytics
Query Analytics
Analytics reads require an events.read or admin token. Recent data is served
from Postgres; older data is served from DuckDB over verified Parquet segments.
Use source: "auto" unless you are debugging one path.
TOKEN="$(just dev-hydra-token)"
curl -sf -X POST http://localhost:8088/api/v1/analytics/query \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "date": "2026-05-27", "eventType": "page-view", "limit": 100, "source": "auto" }'
Ranged queries use /api/v1/analytics/query-range with from, to, and
groupBy: "day".