Delete an async SQL search Added in 7.15.0

DELETE /_sql/async/delete/{id}

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

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.

Path parameters

  • id string Required

    The identifier for the search.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

DELETE /_sql/async/delete/{id}
curl \
 --request DELETE http://api.example.com/_sql/async/delete/{id} \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "acknowledged": true
}