Skip to Content
Get Subview Breakdown Timeseries
get

Returns the metric value broken down by subview attributes over time, bucketed by the requested time granularity. Powers stacked bar chart visualizations.

Buckets the data pipeline has not yet finalized are omitted from data entirely, rather than zero-filled. Check each entry's status and the response's meta.complete_through to tell a genuinely-empty bucket apart from one that's still incomplete.

Request path & query params
METRIC_ID
string
Possible values: "playing_time"

ID of the metric to compute over subviews. Additional metrics may be added over time.

SUBVIEW_TYPE
string
Possible values: "rendition""playback_mode"

The subview type to query.

timeframe[]
array

Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=).

Accepted formats are...

  • array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
  • duration string e.g. timeframe[]=24:hours or timeframe[]=7:days
filters[]
array

Filter results using key:value pairs. Must be provided as an array query string parameter.

The set of filterable dimensions is distinct from the main Data API's dimensions, and depends on the subview type — see the List Subview Dimensions endpoint for the valid names.

  • filters[]=dimension:value - Include rows where dimension equals value
  • filters[]=!dimension:value - Exclude rows where dimension equals value
  • filters[]=dimension:__empty__ - Include rows where the dimension has no value

Example: filters[]=country:US

group_by[]
array

Subview attributes to group the results by. Must be provided as an array query string parameter. Currently only supported for the rendition subview type, as any combination of the 6 enum values below.

If omitted, defaults to grouping by every attribute available for the subview type.

Possible values: "video_source_bitrate""video_source_width""video_source_height""video_source_fps""video_source_codec""video_source_rendition_name"
time_granularity
string
(default: hour)
Possible values: "hour""day"

Time bucket size for the timeseries.

breakdown_value_limit
integer
(default: 10, max: 100)

Number of breakdown rows to include per selected dimension value.

get
200
https://api.mux.com/data/v1/subview-metrics/{METRIC_ID}/{SUBVIEW_TYPE}/breakdown-timeseries
Response
(application/json)
{
  "data": [
    {
      "date": "2021-04-01T00:00:00Z",
      "status": "complete",
      "values": [
        {
          "breakdown_value": "18.5Mb / 3840w / 2160h / 60fps / HEVC / 4k",
          "metric_value": 12500000
        },
        {
          "breakdown_value": "12Mb / 2560w / 1440h / 60fps / HEVC / 2k",
          "metric_value": 6300000
        },
        {
          "breakdown_value": "other",
          "metric_value": 4200000
        }
      ]
    },
    {
      "date": "2021-04-01T01:00:00Z",
      "status": "partial",
      "values": [
        {
          "breakdown_value": "18.5Mb / 3840w / 2160h / 60fps / HEVC / 4k",
          "metric_value": 3800000
        }
      ]
    }
  ],
  "meta": {
    "subview_type": "rendition",
    "metric": "playing_time",
    "unit": "ms",
    "group_by": [
      "video_source_bitrate",
      "video_source_width",
      "video_source_height",
      "video_source_fps",
      "video_source_codec",
      "video_source_rendition_name"
    ],
    "time_granularity": "hour",
    "complete_through": "2021-04-01T00:59:59Z"
  },
  "total_row_count": 2,
  "timeframe": [
    1617235200,
    1617321600
  ]
}