Exact breakdown of the events of a set of triggers
const url = 'https://localhost:3000/api/v1/events/breakdown?dimension=example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://localhost:3000/api/v1/events/breakdown?dimension=example' \ --header 'Authorization: <Authorization>'Counts the events of the WHOLE scope and the whole window by the value of one axis (dimension), or by pair of values of two axes (cross): this is what the panels show (donut, bars, table, heatmap, punchcard, stacked). dimension and cross are hour (0-23), weekday (1 Monday to 7 Sunday), @country (sender country, server key _geo_country) or a metadata key; hour and weekday are read in the tz time zone (IANA name, default UTC, otherwise 400). Without cross, buckets lists the first limit values (default 20, max 50; natural order for hour and weekday, otherwise by descending count then value) and total counts every event carrying the dimension: total minus the sum of the buckets is what limit cut off. With cross, pairs lists the pairs of the first limit dimension values; a null cross_key groups the cross values beyond limit; events missing either value are not counted. Only scalar values (non-empty string, number, boolean) form a bucket. measure=sum:
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Scope: personal or tenant:{id}
Scope: all
Scope: group ID (UUID)
Scope: comma-separated trigger IDs (50 max)
Axis: hour, weekday, @country or metadata key (128 characters max)
Second axis (same values as dimension)
IANA time zone for hour and weekday (default: UTC)
Start (default: now-1h). Supports relative time: now-1h, now-24h
End (default: now). Supports relative time
JSON filter on metadata
Count (default) or sum:{metadata key}: sums that numeric key per value, read on raw events; events whose key is missing or not a JSON number are ignored
Max number of values per metadata axis (default: 20, max: 50)
Responses
Section titled “Responses”Breakdown
object
Buckets is empty with cross.
object
Count is the number of events (with measure=sum:
Value is the sum of the key, present with measure=sum:
Measure is count, or sum:
Pairs is empty without cross.
object
CrossKey is null for the cross values beyond the limit, gathered together.
Value is the sum of the key, present with measure=sum:
SkippedTriggerIDs lists the requested trigger_ids that do not exist or that the caller may not read (the two cases are not told apart). Empty for the other scopes.
Total is the number of events carrying the dimension, over the whole scope and window; Total minus the sum of Buckets is what the limit cut. Zero with cross.
TotalValue is the sum behind Total, present with measure=sum:
Truncated is true when the scope holds more readable triggers than the cap (10000 for scope=all, 500 otherwise): only the oldest ones are read.
Example
{ "buckets": [ { "count": 1234, "key": "/home", "value": 12.5 } ], "cross": "weekday", "dimension": "hour", "from": "2026-01-15T10:30:00Z", "measure": "sum:cost_usd", "pairs": [ { "count": 42, "cross_key": "/home", "key": "1", "value": 3.2 } ], "skipped_trigger_ids": [ "550e8400-e29b-41d4-a716-446655440000" ], "to": "2026-01-16T10:30:00Z", "total": 15234, "total_value": 812.4, "truncated": false}Invalid request
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}Unauthorized
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}Owner or group not found
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}Too many concurrent calls
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}Erreur interne
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}Timeout
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}