DataPress logo
API Reference

Deleting Datasets

Version:  4.0
Updated:  14th July 2024

Overview

Deleting a dataset will remove it from the catalogue and delete all associated resources. The complete dataset history will remain in the Audit Log.

Note
Uploaded files will be retained on the server for 90 days.
DELETE
https://data.website/api/dataset/:id
Path Parameters
:id5-character ID of the dataset, eg. "ab12x"stringRequired
HTTP Headers
AuthorizationAPI key.stringRequired
HTTP Return Codes
200JSON confirmation of deletion.
404Dataset not found.
403API key does not have editor permissions.

Example

import requests, json, os

dataset_id = "20abc"

headers = {"Authorization": os.getenv("DATAPRESS_API_KEY")}
url = f"https://data.website/api/dataset/{dataset_id}"

response = requests.delete(url, headers=headers)
print(json.dumps(response.json(), indent=2))