v3
latestOpenAPI 3.1.02026-08-0712650111.6 KBBatch Metrics
Execute multiple metric queries in a single request.
Scalar aggregations are combined into a single SQL query with multiple aggregation expressions, except DISTINCT aggregates (unique_viewers), which run in a separate SELECT to avoid poisoning the combined query's plan (see _DISTINCT_METRICS). Special metrics like avg_session_duration fall back to individual queries. total_views is computed at most once per request.
post/v1/metrics/batch
Request body
Response
Successful Response
{"stackTrail":"paths:/v1/metrics/batch:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}