Get Metric Breakdown Series
Changed onPer-value time series for the top-N values of a dimension — ONE scan.
Replaces the portal breakdown tables' per-row filtered /timeseries fan-out (2 GETs x N rows per table) with a single grouped query: GROUP BY (dimension, time bucket), restricted to the top-N dimension values via a joined subquery (same selection logic/ordering as /breakdown), so the window is scanned once — not once per value.
values[] (optional, <=100) overrides top-N selection with an explicit value list; the response then contains one entry per requested value in the given order, zero-filled when a value has no rows. The portal uses this to request series for exactly the rows its /breakdown call returned (whose top-N may have been computed over a different timeframe than the fixed 7d/30d sparkline windows).
having[] (same syntax and rules as /breakdown: default measurement, NULL → dropped, <=2 conditions, no session metrics) selects the SET of values on their whole-window values BEFORE top-N ranking; with values[] the requested values that fail a condition are OMITTED (not zero-filled). The ranking itself is unchanged.
Bucketing matches /timeseries exactly: same granularity rule (granularity forces hour|day; auto otherwise — see _granularity), same org-timezone day/hour keys, same gap-filling. Decomposable metrics use the two-level 15-minute-bin machinery; unique_viewers/median / p95 run a single-pass GROUP BY — per-(value, bucket) COUNT(DISTINCT) is exact because each bucket is contained within one group. The session metrics (feed_sessions / avg_session_depth / avg_session_duration) aggregate per-(value, session) rows bucketed by the slice's first view, like /timeseries' session branch.
Request
- Base URLhttps://api.shortkit.dev (the document declares no server; this is the origin it was published from)
- Authnone declared
Path parameters
Query parameters
Response
Successful Response
Changes
- info
added the new optional
queryrequest parametergranularity
- info