---
title: "Retrieve aggregated metrics"
method: GET
path: "/data/metrics/{metric}/{aggregation}"
tags: ["Analytics"]
---

# Retrieve aggregated metrics

`GET /data/metrics/{metric}/{aggregation}`

Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time.

## Path parameters

- `metric` 'play' | 'start' | 'end' | 'impression' | 'impression-time' | 'watch-time' | 'ccv' | 'view', required
- `aggregation` 'count' | 'rate' | 'total' | 'average' | 'sum' | 'peak' | 'live', required

## Query parameters

- `from` string, date-time
- `to` string, date-time
- `unique` boolean
- `viewDuration` '3s' | '5s' | '10s' | '30s'

## Parameters

- `#/components/parameters/filterBy_2` — unresolved $ref

## Response `200`

Success

- AnalyticsAggregatedMetricsResponse
  - `context` AnalyticsAggregatedMetricsResponseContext, required
    - `metric` 'play' | 'start' | 'end' | 'impression' | 'impression-time' | 'watch-time' | 'ccv' | 'unique-ccv' | 'view-3' | 'view-5' | 'view-10' | 'view-30' | 'unique-view' | 'unique-view-3' | 'unique-view-5' | 'unique-view-10' | 'unique-view-30' — Returns the metric and relevant parameters you selected.
    - `aggregation` 'count' | 'rate' | 'total' | 'average' | 'sum' — Returns the aggregation you selected.
    - `timeframe` AnalyticsAggregatedMetricsResponseContextTimeframe — Returns the starting and ending date-times of the period you want analytics for.
      - `from` string, date-time — Returns the starting date-time of the period you want analytics for in ATOM date-time format.
      - `to` string, date-time — Returns the starting date-time of the period you want analytics for in ATOM date-time format.
  - `data` number, float, required

## Other responses

- `400` — Bad request error
- `404` — Unrecognized request URL
- `429` — Too Many Requests

---

[API](https://skmtc.net/apivideo/apis/api-video.md) · [All operations](https://skmtc.net/apivideo/apis/api-video/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apivideo/api-video/revisions/45ec26f342b6/schema)
