DELETE /source
[info] DEPRECATED
Use the Catalog API instead. The Source API will be removed in a future release.
Deletes an existing source.
Syntax
DELETE /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 -X DELETE \
http://localhost:9047/api/v3/source/a24cf314-6305-49cf-9b4e-f7da55f8044d \
-H 'Authorization: _dremioerjt7vnhtljpus01rfibddefdg' \
-H 'Postman-Token: 678a3704-f84d-4b50-9824-aefab2ecf19a' \
-H 'cache-control: no-cache'
Python Request
import http.client
conn = http.client.HTTPConnection("localhost")
payload = ""
headers = {
'Authorization': "_dremioerjt7vnhtljpus01rfibddefdg",
'cache-control': "no-cache",
'Postman-Token': "806a4577-4f4b-4549-9483-75677061ea96"
}
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.
Status: 200 OK
A visual check of the Dremio UI showed the duplicate Samples (1) source removed.