On this page

    Delete a Catalog

    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.

    Syntax

    DELETE /api/v3/catalog/{id}
    

    Response Codes

    • 403 - User does not have permission to delete the catalog entity.
    • 404 - A catalog entity with the specified ID could not be found.

    Example: Delete a Source

    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.

    HTTP Request

    DELETE localhost:9047/api/v3/catalog/b88c426c-20fe-49da-ba91-b3189ae96503

    Curl

    curl -X DELETE \
      'http://localhost:9047/api/v3/catalog/b88c426c-20fe-49da-ba91-b3189ae96503?tag=0' \
      -H 'Authorization: _dremioo8opojj6vn4ughkvcpalpr46d6' \
      -H 'Content-Type: application/json'
    

    Python

    import requests
    
    url = "http://localhost:9047/api/v3/catalog/b88c426c-20fe-49da-ba91-b3189ae96503"
    
    payload = ""
    headers = {
        'Authorization': "_dremioo8opojj6vn4ughkvcpalpr46d6",
        'Content-Type': "application/json"
        }
    
    response = requests.request("DELETE", url, data=payload, headers=headers, params=querystring)
    
    print(response.text)
    

    Response

    204 No Content