v1

latestOpenAPI 3.0.0Open Government Licence v3.02026-07-14355492.7 KB
Private

Get instances

Get a list of instances which has been paged

get/instances

Query parameters

statestring

A comma separated list of state values to filter on (e.g. ‘completed,edition-confirmed’)

datasetstring

A unique id for a dataset to filter on

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.

Response

Return a list of instance state

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,
  "items": [
    {
      "alerts": [
        {
          "description": "This is a description of the changes made as part of the correction or other important notice about this version.",
          "type": "correction"
        }
      ],
      "collection_id": "666c06bc09d337ab9d164c82f8f383c081a4e38cbd91b79d4a23ea0025fecb3f",
      "downloads": {
        "csv": {
          "href": "https://download.ons.gov.uk/my-dataset-download.csv",
          "size": "466807"
        },
        "xls": {
          "href": "https://download.ons.gov.uk/my-dataset-download.csv",
          "size": "466807"
        }
      },
      "edition": "july-september-2017",
      "links": {
        "dataset": {
          "href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset",
          "id": "my-dataset"
        },
        "dimensions": {
          "href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset/editions/july-september-2017/versions/1/dimensions"
        },
        "edition": {
          "href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset/editions/july-september-2017",
          "id": "july-september-2017"
        },
        "job": {
          "href": "https://api.beta.ons.gov.uk/v1/jobs/042e216a-7822-4fa0-a3d6-e3f5248ffc35",
          "id": "042e216a-7822-4fa0-a3d6-e3f5248ffc35"
        },
        "self": {
          "href": "https://api.beta.ons.gov.uk/v1/instances/45c4669b-3ae9-4ba7-b690-87e890a1c67f"
        },
        "version": {
          "href": "https://api.beta.ons.gov.uk/v1/dataset/my-dataset/edition/july-september-2017/versions/1",
          "id": "1"
        }
      },
      "state": "published"
    }
  ]
}