Public

Get a list of options from a dimension (filterable and cantabular datasets only)

Get a list of options which appear in this dimension and dataset. By default all options are returned, but a subset can be requested by providing offset and limit query parameters, or by providing the list of option IDs, only the IDs that are found will be returned.

get/datasets/{id}/editions/{edition}/versions/{version}/dimensions/{dimension}/options

Request

  • Base URL
    https://api.beta.ons.gov.uk/v1
  • Auth
    • none
    • or API key in header Authorization

Path parameters

dimensionstring required

A dimension from a dataset

editionstring required

An edition of a dataset

idstring required

ID that represents a dataset

versionstring required

A version of a dataset

Query parameters

limitinteger

Maximum number of items that will be returned. A value of zero will return zero items.

offsetinteger

Starting index of the items array that will be returned. By default it is zero, meaning that the returned items will start from the beginning.

idstring

List of ids, as comma separated values and/or as multiple query parameters with the same key (e.g. 'id=op1,op2&id=op3'). It defines the IDs that we want to retrieve. If provided, it takes precedence over offset and limit.

Response

Json object containing all options for a dimension

countinteger

The number of items returned.

limitinteger

The number of items requested.

offsetinteger

The offset of the first item to retrieve, starting at 0. Use this parameter as a pagination mechanism along with the limit parameter

total_countinteger

The total number of items available.

Example response

{
  "count": 20,
  "total_count": 123
}

Changes

No recorded changes to this operation across all 1 revision of this API.