Delete a Source
This API deletes an existing source.
Syntax
Method and URLDELETE /api/v3/source/{id}
Response Codes
401
- user does not have permission to delete the source.
404
- a source with the specified id could not be found.
Example: Delete source
In this example, a source entity is deleted. The host is a single node and the data is the Dremio sample source data.
In this case, there were two duplicate sources: Samples and Samples (1). This example deletes the Samples (1) source. The ID, a24cf314-6305-49cf-9b4e-f7da55f8044d, was obtained from the results of GET /source.
Postman is used to generate the examples.
Curl Request
curl request examplecurl -X DELETE \
http://localhost:9047/api/v3/source/a24cf314-6305-49cf-9b4e-f7da55f8044d \
-H 'Authorization: _dremioerjt7vnhtljpus01rfibddefdg'
Python Request
Python request exampleimport http.client
conn = http.client.HTTPConnection("localhost")
payload = ""
headers = {
'Authorization': "_dremioerjt7vnhtljpus01rfibddefdg"
}
conn.request("DELETE", "api,v3,source,a24cf314-6305-49cf-9b4e-f7da55f8044d", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response
The operation was successful; No results were returned except for the status.
200 OK responseStatus: 200 OK
A visual check of the Dremio UI showed the duplicate Samples (1) source removed.
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.