Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] EQL: Document delete async search API #57732

Merged
merged 1 commit into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions docs/reference/eql/delete-async-eql-search-api.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[role="xpack"]
[testenv="basic"]

[[delete-async-eql-search-api]]
=== Delete async EQL search API
++++
<titleabbrev>Delete async EQL search</titleabbrev>
++++

dev::[]

Deletes an <<eql-search-async,async EQL search>> or a
<<eql-search-store-sync-eql-search,stored synchronous EQL search>>. The API also
deletes results for the search.

[source,console]
----
DELETE /_eql/search/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=
----
// TEST[skip: no access to search ID]

[[delete-async-eql-search-api-request]]
==== {api-request-title}

`DELETE /_eql/search/<search_id>`

[[delete-async-eql-search-api-prereqs]]
==== {api-prereq-title}

See <<eql-requirements,EQL requirements>>.

[[delete-async-eql-search-api-limitations]]
===== Limitations

See <<eql-limitations,EQL limitations>>.

[[delete-async-eql-search-api-path-params]]
==== {api-path-parms-title}

`<search_id>`::
(Required, string)
Identifier for the search to delete.
+
A search ID is provided in the <<eql-search-api,EQL search API>>'s response for
an <<eql-search-async,async search>>. A search ID is also provided if the
request's <<eql-search-api-keep-on-completion,`keep_on_completion`>> parameter
is `true`.
27 changes: 25 additions & 2 deletions docs/reference/eql/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,23 @@ GET /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTo
// TEST[skip: no access to search ID]
====

You can use the <<delete-async-eql-search-api,delete async EQL search API>> to
manually delete an async EQL search before the `keep_alive` period ends. If the
search is still ongoing, this cancels the search request.

.*Example*
[%collapsible]
====
The following delete async EQL search API request deletes an async EQL search
and its results.

[source,console]
----
DELETE /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?keep_alive=5d
----
// TEST[skip: no access to search ID]
====

[discrete]
[[eql-search-store-sync-eql-search]]
=== Store synchronous EQL searches
Expand All @@ -642,8 +659,7 @@ By default, the EQL search API only stores async searches that cannot be
completed within the period set by the `wait_for_completion_timeout` parameter.

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

[%collapsible]
.*Example*
Expand Down Expand Up @@ -694,6 +710,13 @@ GET /_eql/search/FjlmbndxNmJjU0RPdExBTGg0elNOOEEaQk9xSjJBQzBRMldZa1VVQ2pPa01YUTo
// TEST[skip: no access to search ID]
====

Saved synchronous searches are still subject to the storage retention period set
by the `keep_alive` parameter. After this period, the search and its saved
results are deleted.

You can also manually delete saved synchronous searches using the
<<delete-async-eql-search-api,delete async EQL search API>>.

[discrete]
[[eql-search-case-sensitive]]
=== Run a case-sensitive EQL search
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ include::eql/eql-search-api.asciidoc[]

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

include::eql/delete-async-eql-search-api.asciidoc[]

endif::[]

include::search/count.asciidoc[]
Expand Down