Skip to content
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
5 changes: 5 additions & 0 deletions docs/reference/eql/eql-search-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `open`.

`filter_path`::
(Optional, string)
Comma-separated list of filters for the API response. See
<<common-options-response-filtering>>.

`ignore_unavailable`::
(Optional, Boolean) If `true`, missing or closed indices are not included in the
response. Defaults to `true`.
Expand Down
43 changes: 43 additions & 0 deletions docs/reference/eql/eql.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,49 @@ GET /my-index-000001/_eql/search
----
// TEST[setup:sec_logs]

Use the <<common-options-response-filtering,`filter_path`>> query parameter to
filter the API response. For example, the following search returns only the
timestamp and PID for each matching event.

[source,console]
----
GET /my-index-000001/_eql/search?filter_path=hits.events._source.@timestamp,hits.events._source.process.pid
{
"query": """
process where process.name == "regsvr32.exe"
"""
}
----
// TEST[setup:sec_logs]

The API returns the following response.

[source,console-result]
----
{
"hits" : {
"events" : [
{
"_source" : {
"@timestamp" : "2099-12-07T11:07:09.000Z",
"process" : {
"pid" : 2012
}
}
},
{
"_source" : {
"@timestamp" : "2099-12-07T11:07:10.000Z",
"process" : {
"pid" : 2012
}
}
}
]
}
}
----

[discrete]
[[eql-search-sequence]]
=== Search for a sequence of events
Expand Down