elasticsearch/docs/reference/esql/esql-async-query-delete-api.asciidoc
Stef Nestor c1019d4c5d
(Doc+) Link API doc to parent object - part1 (#111951)
* (Doc+) Link API to parent Doc part1

---------

Co-authored-by: shainaraskas <shaina.raskas@elastic.co>
Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
2024-08-20 14:58:18 -06:00

42 lines
1.3 KiB
Text

[[esql-async-query-delete-api]]
=== {esql} async query delete API
++++
<titleabbrev>{esql} async query delete API</titleabbrev>
++++
The <<esql,{esql}>> async query delete API is used to manually delete an async query
by ID. If the query is still running, the query will be cancelled. Otherwise,
the stored results are deleted.
[source,console]
----
DELETE /query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=
----
// TEST[skip: no access to query ID]
[[esql-async-query-delete-api-request]]
==== {api-request-title}
`DELETE /_query/async/<query_id>`
[[esql-async-query-delete-api-prereqs]]
==== {api-prereq-title}
* If the {es} {security-features} are enabled, only the following users can
use this API to delete a query:
** The authenticated user that submitted the original query request
** Users with the `cancel_task` <<privileges-list-cluster,cluster privilege>>
[[esql-async-query-delete-api-path-params]]
==== {api-path-parms-title}
`<query_id>`::
(Required, string)
Identifier for the query to delete.
+
A query ID is provided in the <<esql-async-query-api,{esql} async query API>>'s
response for a query that does not complete in the awaited time. A query ID is
also provided if the request's <<esql-async-query-api-keep-on-completion,`keep_on_completion`>>
parameter is `true`.