[role="xpack"]
[[delete-async-sql-search-api]]
=== Delete async SQL search API
++++
Delete async SQL search
++++
.New API reference
[sidebar]
--
For the most up-to-date API details, refer to {api-es}/group/endpoint-sql[SQL APIs].
--
Deletes an <> or a <>. If the search is still running, the API cancels it.
[source,console]
----
DELETE _sql/async/delete/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=
----
// TEST[skip: no access to search ID]
[[delete-async-sql-search-api-request]]
==== {api-request-title}
`DELETE _sql/async/delete/`
[[delete-async-sql-search-api-prereqs]]
==== {api-prereq-title}
* If the {es} {security-features} are enabled, only the following users can
use this API to delete a search:
** Users with the `cancel_task` <>
** The user who first submitted the search
[[delete-async-sql-search-api-limitations]]
===== Limitations
See <>.
[[delete-async-sql-search-api-path-params]]
==== {api-path-parms-title}
``::
(Required, string) Identifier for the search.