

Deleting a dataset will remove it from the catalogue and delete all associated resources. The complete dataset history will remain in the Audit Log.
| :id | 5-character ID of the dataset, eg. "ab12x" | string | Required |
| Authorization | API key. | string | Required |
| 200 | JSON confirmation of deletion. |
| 404 | Dataset not found. |
| 403 | API key does not have editor permissions. |
import requests, json, os
dataset_id = "20abc"
headers = {"Authorization": os.getenv("DATAPRESS_API_KEY")}
url = f"https://data.website/api/v3/dataset/{dataset_id}"
response = requests.delete(url, headers=headers)
print(json.dumps(response.json(), indent=2))
{
"id": "20abc",
"deleted": true
}