Datasets : Delete File
This method allows any files to be deleted from a dataset by their name.
Method
DELETE /datasets/{owner}/{id}/files/{filename}
Parameters
Parameters:
Parameter | Description | Parameter Type | Data Type |
---|---|---|---|
owner | Dataset owner username. Included in data.world dataset URL path, after domain. For example, jonloyens in https://data.world/jonloyens/an-intro-to-dataworld-dataset |
path | string |
id | Dataset id. Included in data.world dataset URL, after owner's username. For example, an-intro-to-dataworld-dataset in https://data.world/jonloyens/an-intro-to-dataworld-dataset |
path | string |
filename | Filename. Included in data.world dataset file URL, after file subdirectory. For example, AnIntrotodata.worldDatasetChangeLog-Sheet1.csv in https://data.world/jonloyens/an-intro-to-dataworld-dataset/file/AnIntrotodata.worldDatasetChangeLog-Sheet1.csv |
path | string |
Response
JSON schema
{
"message": "string"
}
Errors
HTTP Status Code | Reason | Solution |
---|---|---|
400 | Bad request. | Check syntax and URIs. |
401 | Unauthorized | Verify credentials / API key |
403 | Forbidden | |
404 | Not found. | |
422 | Bad request. | Check syntax and URIs. |
500 | Server error. |
Request URL:
https://api.data.world/v0/datasets/jonloyens/an-intro-to-dataworld-dataset/files/AnIntrotodata.worldDatasetChangeLog-Sheet1.csv
cURL:
curl https://api.data.world/v0/datasets/jonloyens/an-intro-to-dataworld/files/AnIntrotodata.worldDatasetChangeLog-Sheet1.csv \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <API TOKEN>' \
-X DELETE
Response Body:
{
"message": "Dataset files have been successfully deleted."
}