This API deletes an existing catalog entity (source, space, folder in a space, PDS dataset, and VDS dataset).
If you have a file/folder in a file-based source that has been promoted (it’s now a PDS) and then delete it, the file reverts to the original format. For example, if a PDS was originally a text file, it reverts to a text file after the PDS is deleted.
DELETE /api/v3/catalog/{id}
403
- User does not have permission to delete the catalog entity.404
- A catalog entity with the specified ID could not be found.In this example, the Samples (2) source being deleted. The source entity ID is obtained by executing GET /catalog and locating the source ID and tag information.
DELETE localhost:9047/api/v3/catalog/b88c426c-20fe-49da-ba91-b3189ae96503
curl -X DELETE \
'http://localhost:9047/api/v3/catalog/b88c426c-20fe-49da-ba91-b3189ae96503?tag=0' \
-H 'Authorization: _dremioo8opojj6vn4ughkvcpalpr46d6' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: d0263200-7470-4753-b363-14828c4e6098' \
-H 'cache-control: no-cache'
import requests
url = "http://localhost:9047/api/v3/catalog/b88c426c-20fe-49da-ba91-b3189ae96503"
payload = ""
headers = {
'Authorization': "_dremioo8opojj6vn4ughkvcpalpr46d6",
'Content-Type': "application/json",
'cache-control': "no-cache",
'Postman-Token': "a7b66ba5-1f89-410a-89bf-1f4b58659303"
}
response = requests.request("DELETE", url, data=payload, headers=headers, params=querystring)
print(response.text)
204 No Content