Skip to main content

Get a data set’s metadata

Get the metadata about a data set. Use this to create data set queries.

The URL for this endpoint is:

GET https://dev.statistics.api.education.gov.uk/api/v{version}/data-sets/{dataSetId}/meta

Parameters

Path parameters

The following parameters will need to be substituted into the URL path.

Parameter Type Required Description
dataSetId string true

The ID of the data set.

version string true

The requested API version

Defaults to: 1.0

Query parameters

Parameter Type Required Description
types array (string) false

The types of meta to get for the requested data set version.

Can be any combination of the following:

  • Filters - include all meta relating to filters
  • Indicators - include all meta relating to indicators
  • Locations - include all meta relating to locations
  • TimePeriods - include all meta relating to time periods

Allowed options for child items:

  • Filters
  • Indicators
  • Locations
  • TimePeriods
dataSetVersion string false

The version of the data set to use e.g. 2.0, 1.1, etc.

Example request

To illustrate how to use this API endpoint, we have provided some samples below in various languages.

cURL

curl -X GET https://dev.statistics.api.education.gov.uk/api/v{version}/data-sets/{dataSetId}/meta

JavaScript

const url = 'https://dev.statistics.api.education.gov.uk/api/v{version}/data-sets/{dataSetId}/meta';

const response = await fetch(url, {
  method: 'GET',
});

console.log(response.json());

Python

import requests

url = 'https://dev.statistics.api.education.gov.uk/api/v{version}/data-sets/{dataSetId}/meta'

response = requests.get(url)

print(response.text)

R

library(httr)

url <- 'https://dev.statistics.api.education.gov.uk/api/v{version}/data-sets/{dataSetId}/meta'

response <- httr::GET(url)

output <- content(response)

Responses

Status Description Media Type Schema
200

The requested data set version metadata

application/json DataSetMetaViewModel
403

Forbidden

application/json ProblemDetailsViewModel
404

Not Found

application/json ProblemDetailsViewModel

Example successful response

{
  "filters": [
    {
      "id": "BRlj4",
      "column": "school_type",
      "label": "School type",
      "hint": "Additional detail about the filter.",
      "options": [
        {
          "id": "q1g3J",
          "label": "State-funded primary",
          "isAggregate": true
        }
      ]
    }
  ],
  "indicators": [
    {
      "id": "enW68",
      "column": "sess_authorised",
      "label": "Percentage of authorised sessions",
      "unit": "string",
      "decimalPlaces": 2
    }
  ],
  "geographicLevels": [
    {
      "code": "NAT",
      "label": "National"
    }
  ],
  "locations": [
    {
      "level": {
        "code": "NAT",
        "label": "National"
      },
      "options": [
        {
          "id": "bOmZ4",
          "label": "Sheffield",
          "code": "E12000003"
        },
        {
          "id": "bOmZ4",
          "label": "Sheffield",
          "code": "E08000019",
          "oldCode": "373"
        },
        {
          "id": "bOmZ4",
          "label": "Sheffield",
          "ukprn": "12345678"
        },
        {
          "id": "bOmZ4",
          "label": "Sheffield"
        },
        {
          "id": "bOmZ4",
          "label": "Sheffield",
          "urn": "123456",
          "laEstab": "1234567"
        }
      ]
    }
  ],
  "timePeriods": [
    {
      "code": "AYQ1",
      "period": "2020/2021",
      "label": "2020/21 Q1"
    }
  ]
}