# Subview Metrics

> Data API reference, generated from the OpenAPI spec.

HTML version: https://www.mux.com/docs/api-reference/data/subview-metrics. Full OpenAPI spec: https://www.mux.com/api-spec.json

## List Subview Dimension Values

`GET https://api.mux.com/data/v1/subview-metrics/{SUBVIEW_TYPE}/dimensions/{DIMENSION_NAME}`

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.

Operation ID: `list-subview-dimension-values`. HTML version: https://www.mux.com/docs/api-reference/data/subview-metrics/list-subview-dimension-values

### Path parameters

- `SUBVIEW_TYPE` (string, required): The subview type to query. Possible values: `"rendition"`, `"playback_mode"`.
- `DIMENSION_NAME` (string, required): Name of the dimension. See the List Subview Dimensions endpoint for the valid values for a given subview type.

### Query parameters

- `timeframe[]` (array of string): 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 of string): 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, format: int32, default: 25, maximum: 250): Number of items to include in the response.
- `page` (integer, format: int32, default: 1): Offset by this many pages, of the size of `limit`
- `order_by` (string, default: "playing_time"): Value to order the results by. Possible values: `"playing_time"`, `"value"`.
- `order_direction` (string): Sort order. Possible values: `"asc"`, `"desc"`.
- `query` (string): Only return dimension values containing this substring.

### Response `200`

OK

- `data` (array of object, required)
  - `value` (string, required)
  - `playing_time` (number, required, format: double)
- `meta` (object, required)
  - `subview_type` (string, required)
  - `metric` (string, required)
  - `unit` (string, required)
  - `dimension_name` (string, required)
- `total_row_count` (integer, required, format: int64)
- `timeframe` (array of integer, required) Each item: format: int64.
