Skip to content

Commit 6d7acd0

Browse files
authored
[DOCS] EQL: Document delete async search API (#57732)
1 parent d197a85 commit 6d7acd0

File tree

3 files changed

+74
-2
lines changed

3 files changed

+74
-2
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[role="xpack"]
2+
[testenv="basic"]
3+
4+
[[delete-async-eql-search-api]]
5+
=== Delete async EQL search API
6+
++++
7+
<titleabbrev>Delete async EQL search</titleabbrev>
8+
++++
9+
10+
dev::[]
11+
12+
Deletes an <<eql-search-async,async EQL search>> or a
13+
<<eql-search-store-sync-eql-search,stored synchronous EQL search>>. The API also
14+
deletes results for the search.
15+
16+
[source,console]
17+
----
18+
DELETE /_eql/search/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=
19+
----
20+
// TEST[skip: no access to search ID]
21+
22+
[[delete-async-eql-search-api-request]]
23+
==== {api-request-title}
24+
25+
`DELETE /_eql/search/<search_id>`
26+
27+
[[delete-async-eql-search-api-prereqs]]
28+
==== {api-prereq-title}
29+
30+
See <<eql-requirements,EQL requirements>>.
31+
32+
[[delete-async-eql-search-api-limitations]]
33+
===== Limitations
34+
35+
See <<eql-limitations,EQL limitations>>.
36+
37+
[[delete-async-eql-search-api-path-params]]
38+
==== {api-path-parms-title}
39+
40+
`<search_id>`::
41+
(Required, string)
42+
Identifier for the search to delete.
43+
+
44+
A search ID is provided in the <<eql-search-api,EQL search API>>'s response for
45+
an <<eql-search-async,async search>>. A search ID is also provided if the
46+
request's <<eql-search-api-keep-on-completion,`keep_on_completion`>> parameter
47+
is `true`.

docs/reference/eql/search.asciidoc

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,23 @@ GET /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTo
634634
// TEST[skip: no access to search ID]
635635
====
636636

637+
You can use the <<delete-async-eql-search-api,delete async EQL search API>> to
638+
manually delete an async EQL search before the `keep_alive` period ends. If the
639+
search is still ongoing, this cancels the search request.
640+
641+
.*Example*
642+
[%collapsible]
643+
====
644+
The following delete async EQL search API request deletes an async EQL search
645+
and its results.
646+
647+
[source,console]
648+
----
649+
DELETE /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?keep_alive=5d
650+
----
651+
// TEST[skip: no access to search ID]
652+
====
653+
637654
[discrete]
638655
[[eql-search-store-sync-eql-search]]
639656
=== Store synchronous EQL searches
@@ -642,8 +659,7 @@ By default, the EQL search API only stores async searches that cannot be
642659
completed within the period set by the `wait_for_completion_timeout` parameter.
643660

644661
To save the results of searches that complete during this period, set the
645-
`keep_on_completion` parameter to `true`. Note these saved searches are still
646-
subject to the storage retention period set by the `keep_alive` parameter.
662+
`keep_on_completion` parameter to `true`.
647663

648664
[%collapsible]
649665
.*Example*
@@ -694,6 +710,13 @@ GET /_eql/search/FjlmbndxNmJjU0RPdExBTGg0elNOOEEaQk9xSjJBQzBRMldZa1VVQ2pPa01YUTo
694710
// TEST[skip: no access to search ID]
695711
====
696712

713+
Saved synchronous searches are still subject to the storage retention period set
714+
by the `keep_alive` parameter. After this period, the search and its saved
715+
results are deleted.
716+
717+
You can also manually delete saved synchronous searches using the
718+
<<delete-async-eql-search-api,delete async EQL search API>>.
719+
697720
[discrete]
698721
[[eql-search-case-sensitive]]
699722
=== Run a case-sensitive EQL search

docs/reference/search.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ include::eql/eql-search-api.asciidoc[]
174174

175175
include::eql/get-async-eql-search-api.asciidoc[]
176176

177+
include::eql/delete-async-eql-search-api.asciidoc[]
178+
177179
endif::[]
178180

179181
include::search/count.asciidoc[]

0 commit comments

Comments
 (0)