Private
Create a specific version
Create a specific version for a dataset series. This will set the state of the version and dataset series to be associated.
post/datasets/{id}/editions/{edition}/versions/{version}
Path parameters
idstring required
ID that represents a dataset
editionstring required
An edition of a dataset
versionstring required
A version of a dataset
Query parameters
is_latestboolean
A boolean value which, when true, sets the latest_version information at series level using the version number and edition provided in the path
Request body
Example request
{
"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",
"dataset_id": "my-dataset",
"dimensions": [
{
"links": {
"version": {
"href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset/editions/july-september-2017/versions/5",
"id": "5"
}
}
}
],
"distributions": [
{
"title": "Full Dataset (CSV)",
"download_url": "https://download.ons.gov.uk/my-dataset-download.csv",
"byte_size": 4300000
}
],
"downloads": {
"csv": {
"href": "https://download.ons.gov.uk/my-dataset-download.csv",
"size": "123456"
},
"csvw": {
"href": "https://download.ons.gov.uk/my-dataset.metadata.json",
"size": "123456"
},
"txt": {
"href": "https://download.ons.gov.uk/my-dataset.metadata.txt",
"size": "123456"
},
"xls": {
"href": "https://download.ons.gov.uk/my-dataset.xls",
"size": "123456"
}
},
"edition": "july-september-2017",
"edition_title": "July to September 2017",
"is_based_on": {
"id": "Usual-Residents",
"type": "cantabular_table"
},
"latest_changes": [
{
"description": "Some estimates for the periods between April 2011 and March 2019 have been updated. This is because of changes in guidance on suppressing data, where estimates are no longer required to be suppressed solely based on their co-efficient of variation (CV) values.",
"name": "Data Suppression Changes"
}
],
"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/5/dimensions"
},
"edition": {
"href": "https://api.beta.ons.gov.uk/v1/datasets/my-datasets/editions/july-september-2017",
"id": "july-september-2017"
},
"self": {
"href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset/editions/july-september-2017/versions/5"
},
"web_page": {
"href": "https://www.ons.gov.uk/businessindustryandtrade/datasets/my-dataset/editions/july-september-2017/versions/5"
},
"versions": {
"href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset/editions/july-september-2017/versions"
}
},
"related_content": [
{
"href": "https://www.ons.gov.uk/my-related-page",
"title": "Related Link Title",
"description": "This is a description of the linked resource."
}
],
"state": "published",
"type": "static",
"usage_notes": [
{
"title": "Data Suppression",
"note": "Individual estimates suppressed with \"[c]\" relate to statistics based on a small number of respondents (< 5). Such values have been suppressed on quality grounds and to maintain confidentiality."
}
],
"version": 1
}Response
A json object containing a version