List a publication’s data sets
Lists summary details of all the data sets related to a publication.
The URL for this endpoint is:
GET https://dev.statistics.api.education.gov.uk/api/v{version}/publications/{publicationId}/data-sets
Parameters
Path parameters
The following parameters will need to be substituted into the URL path.
Parameter | Type | Required | Description |
---|---|---|---|
publicationId |
string | true |
The ID of the publication. |
version |
string | true |
The requested API version Defaults to: |
Query parameters
Parameter | Type | Required | Description |
---|---|---|---|
page |
integer | false |
The page of results to fetch. Defaults to: Validation constraints:
|
pageSize |
integer | false |
The maximum number of results per page. Defaults to: Validation constraints:
|
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}/publications/{publicationId}/data-sets
JavaScript
const url = 'https://dev.statistics.api.education.gov.uk/api/v{version}/publications/{publicationId}/data-sets';
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}/publications/{publicationId}/data-sets'
response = requests.get(url)
print(response.text)
R
library(httr)
url <- "https://dev.statistics.api.education.gov.uk/api/v{version}/publications/{publicationId}/data-sets"
response <- GET(url)
output <- content(response)
Responses
Status | Description | Media Type | Schema |
---|---|---|---|
200 | The paginated list of data sets. |
application/json | DataSetPaginatedListViewModel |
400 | Bad Request |
application/json | ValidationProblemViewModel |
Example successful response
{
"paging": {
"page": 1,
"pageSize": 20,
"totalResults": 60,
"totalPages": 3
},
"results": [
{
"id": "7588c2d6-9e8a-4d84-8f19-6b8d52a01fbd",
"title": "Absence rates by geographic level",
"summary": "Absence information for all enrolments in schools.",
"status": "Published",
"supersedingDataSetId": "2118a6df-4934-4a1f-ad2e-4589d2b9ccaf",
"latestVersion": {
"version": "2.0",
"published": "2024-03-01T09:30:00+00:00",
"totalResults": 1000000,
"file": {
"id": "e0754872-3206-4918-aad4-029eaaae191f"
},
"timePeriods": {
"start": "2024 January",
"end": "2024 December"
},
"geographicLevels": [
"NAT",
"REG",
"LA"
],
"filters": [
"Characteristic",
"School type"
],
"indicators": [
"string"
]
}
}
]
}