Skip to Content
List Subview Dimension Values
get

Returns the distinct values for a dimension, each annotated with the total playing time across all matching values. Sorted by playing time descending by default.

Request path & query params
SUBVIEW_TYPE
string
Possible values: "rendition""playback_mode"

The subview type to query.

DIMENSION_NAME
string

Name of the dimension. See the List Subview Dimensions endpoint for the valid values for a given subview type.

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

limit
integer
(default: 25, max: 250)

Number of items to include in the response.

page
integer
(default: 1)

Offset by this many pages, of the size of limit

order_by
string
(default: playing_time)
Possible values: "playing_time""value"

Value to order the results by.

order_direction
string
Possible values: "asc""desc"

Sort order.

query
string

Only return dimension values containing this substring.

get
200
https://api.mux.com/data/v1/subview-metrics/{SUBVIEW_TYPE}/dimensions/{DIMENSION_NAME}
Response
(application/json)
{
  "data": [
    {
      "value": "United States",
      "playing_time": 86400000
    },
    {
      "value": "Great Britain",
      "playing_time": 24800000
    },
    {
      "value": "Germany",
      "playing_time": 18200000
    }
  ],
  "meta": {
    "subview_type": "rendition",
    "dimension_name": "country",
    "metric": "playing_time",
    "unit": "ms"
  },
  "total_row_count": 3,
  "timeframe": [
    1617235200,
    1617321600
  ]
}