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. compare (previous_period | previous_week) adds the same batch over the shifted window under a compare key (see _compare_block).

post/v1/metrics/batch

Request

  • Base URL
    https://api.shortkit.dev (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Request body

timeframestring[]
filtersstring[]
compare'previous_period' | 'previous_week' nullable

Response

Successful Response

unknown required

Changes