Query one metric over a filter window
Compute a single metric over a time window and a set of filter lenses, returning { series[], total, delta, n, unit, format } (plus a breakdown[] for non-scalar metrics). total is the scalar value for count/ratio/avg metrics and null for distribution/percentile metrics (whose per-slice numbers live in breakdown[]). n is the honest sample count behind the number — a client should refuse to over-claim below a metric’s minimum-n. series[] is the tz-aware per-bucket trend (empty for point-in-time backlog metrics).
Filters (all optional): from/to bound the window as a half-open [from, to) range (RFC3339); tz is the IANA timezone used to bucket the series (default UTC), which fixes day-boundary drift; bucket sets the series granularity (day|week|month|hour, default day); channel restricts to one channel; agent and queue are INDEPENDENT lenses (both may be set — they AND together, one narrowing to a single agent, the other to a single queue); minN overrides the metric’s low-volume suppression floor. Applying a lens the metric does not declare (see the catalog’s dimensions) is a 400. compare=true additionally computes delta = current minus the immediately preceding equal-length window (scalar metrics with a bounded window only; otherwise delta is null).
Authorizations
Flowyte secret API key (Authorization: Bearer flowyte_sk_live_…). Scope-gated; is scoped to your organization — a key can never reach another tenant. The listed scopes in each operation's apiKey requirement are the scopes that key must hold. The tokenUrl is nominal: keys are minted in the dashboard.
Path Parameters
A metric id from the catalog (e.g. containment). Unknown ids → 404.
Query Parameters
Window start (RFC3339); window is half-open [from, to).
Window end (RFC3339, exclusive).
Also compute delta = current minus a baseline window (scalar call metrics with a bounded window only). Modes: prev (or any truthy legacy value — true/1/yes) = the immediately preceding EQUAL-LENGTH window [from-Δ, from); lastweek = the SAME-length window shifted back exactly 7 days [from-7d, to-7d] (same-period-last-week). Blank/other = no delta.
prev, lastweek, true IANA timezone for series bucketing (default UTC). Fixes day-boundary drift.
Series granularity (default day).
day, week, month, hour Restrict to one channel.
voice, chat, sms Restrict to one agent id. Independent of queue (they AND together).
Restrict to one queue id. Independent of agent (they AND together).
Override the metric low-volume suppression floor.
x >= 0Response
The compiled metric result.
The compiled result of queryMetric. total is the scalar value for count/ratio/avg metrics and null for distribution/percentile metrics (whose per-slice numbers live in breakdown[]). n is the honest sample count behind the number. series[] is the tz-aware per-bucket trend (empty for point-in-time backlog metrics). delta is populated only when ?compare= was requested on a scalar metric with a bounded window.