Private
Delete a version
Changed ondetache/delete a version from a dataset. For CMD and Cantabular datasets, the version is soft-deleted. For static datasets, the version is permanently deleted from the versions collection.
delete/datasets/{id}/editions/{edition}/versions/{version}
Request
- Base URLhttps://api.beta.ons.gov.uk/v1
- AuthAPI key in header Authorization
Path parameters
editionstring required
An edition of a dataset
idstring required
ID that represents a dataset
versionstring required
A version of a dataset
Response
A json object containing the edition and version of a dataset. For CMD, Cantabular
Example response
{
"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
}Changes
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
removed the non-success response with the status
- info
added the success response with the status
- info