Skip to content

Time Series API

Bucketed counts of events for charts and dashboards. The endpoint auto-selects granularity based on the requested window and anchors buckets on the latest collected event.


Endpoint Summary

Method Path Description
GET /api/logs/meta/timeseries Bucketed event counts (severity/priority)
GET /api/logs/meta/calendar Per-day counts (GitHub-style calendar)

Time Series

GET /api/logs/meta/timeseries?window=24h&limit=10&source=prom-prod
Query Type Default Constraints Description
window string 24h 5s,1m,5m,10m,15m,1h,2h,24h,7d,30d,1mo Time window
source string[] — — Filter by sources
limit int 10 1–50 Number of buckets
offset int 0 ≥ 0 Bucket pagination

Granularity selection

Window Granularity Bucket step
5s second 5 s
1m … 15m minute 1 min
1h, 2h, 24h hour 1 h
7d, 30d, 1mo day 1 day

The window fixes the granularity, while the span extends backward from the latest event until ~limit non-empty buckets are found (up to a month of history if the simulator is stopped). Granularity only widens when a window contains zero data.

Response

{
  "window": "24h",
  "granularity": "hour",
  "offset": 0,
  "has_more": true,
  "buckets": [
    { "t": "2026-08-11T08:00:00Z", "ERROR": 42, "P1": 3, "DEBUG": 0, "INFO": 0, "WARNING": 0, "CRITICAL": 0, "P2": 0, "P3": 0, "P4": 0 }
  ]
}

Each bucket contains counts for every severity (DEBUG, INFO, WARNING, ERROR, CRITICAL) and priority (P1–P4).


Calendar

GET /api/logs/meta/calendar?priority=P1&days=365
Query Type Default Constraints Description
priority string[] — P1–P4 Optional priority filter
days int 365 1–730 How far back to count
[
  { "day": "2026-08-10", "value": 12 },
  { "day": "2026-08-11", "value": 35 }
]

Powers the GitHub-style contribution calendar on the dashboard.