Delete async SQL search API

edit

Delete async SQL search API

edit

Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it.

resp = client.sql.delete_async(
    id="FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
)
print(resp)
response = client.sql.delete_async(
  id: 'FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM='
)
puts response
const response = await client.sql.deleteAsync({
  id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
});
console.log(response);
DELETE _sql/async/delete/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=

Request

edit

DELETE _sql/async/delete/<search_id>

Prerequisites

edit
  • If the Elasticsearch security features are enabled, only the following users can use this API to delete a search:

    • Users with the cancel_task cluster privilege
    • The user who first submitted the search

Limitations

edit

See SQL Limitations.

Path parameters

edit
<search_id>
(Required, string) Identifier for the search.