---
title: "Retrieve metrics over time"
method: GET
path: "/data/timeseries/{metric}"
tags: ["Analytics"]
---

# Retrieve metrics over time

`GET /data/timeseries/{metric}`

Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred

## Path parameters

- `metric` 'play' | 'play-rate' | 'start' | 'end' | 'impression' | 'ccv-peak' | 'ccv-average' | 'view', required

## Query parameters

- `from` string, date-time
- `to` string, date-time
- `interval` 'minute' | 'hour' | 'day'
- `sortBy` 'metricValue' | 'emittedAt'
- `sortOrder` 'asc' | 'desc'
- `unique` boolean
- `viewDuration` '3s' | '5s' | '10s' | '30s'
- `currentPage` integer
- `pageSize` integer

## Parameters

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

## Response `200`

Success

- AnalyticsMetricsOverTimeResponse
  - `context` AnalyticsMetricsOverTimeResponseContext, required
    - `metric` 'play' | 'play-rate' | 'start' | 'end' | 'impression' | 'ccv-average' | 'ccv-peak' | 'unique-ccv-average' | 'unique-ccv-peak' | '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.
    - `interval` 'minute' | 'hour' | 'day' — Returns the interval 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` AnalyticsMetricsOverTimeResponseData[], required — Returns an array of metrics and the timestamps.
    - `emittedAt` string — Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined.
    - `metricValue` number, float — Returns the data for a specific metric value.
  - `pagination` Pagination, required
    - `itemsTotal` integer — Total number of items that exist.
    - `pagesTotal` integer — Number of items listed in the current page.
    - `pageSize` integer — Maximum number of item per page.
    - `currentPage` integer — The current page index.
    - `currentPageItems` integer — The number of items on the current page.
    - `links` PaginationLink[], required
      - `rel` string
      - `uri` string, uri

## 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)
