File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
8282+
8383Defaults to `open`.
8484
85+ `filter_path`::
86+ (Optional, string)
87+ Comma-separated list of filters for the API response. See
88+ <<common-options-response-filtering>>.
89+
8590`ignore_unavailable`::
8691(Optional, Boolean) If `true`, missing or closed indices are not included in the
8792response. Defaults to `true`.
Original file line number Diff line number Diff line change @@ -136,6 +136,49 @@ GET /my-index-000001/_eql/search
136136----
137137// TEST[setup:sec_logs]
138138
139+ Use the <<common-options-response-filtering,`filter_path`>> query parameter to
140+ filter the API response. For example, the following search returns only the
141+ timestamp and PID for each matching event.
142+
143+ [source,console]
144+ ----
145+ GET /my-index-000001/_eql/search?filter_path=hits.events._source.@timestamp,hits.events._source.process.pid
146+ {
147+ "query": """
148+ process where process.name == "regsvr32.exe"
149+ """
150+ }
151+ ----
152+ // TEST[setup:sec_logs]
153+
154+ The API returns the following response.
155+
156+ [source,console-result]
157+ ----
158+ {
159+ "hits" : {
160+ "events" : [
161+ {
162+ "_source" : {
163+ "@timestamp" : "2099-12-07T11:07:09.000Z",
164+ "process" : {
165+ "pid" : 2012
166+ }
167+ }
168+ },
169+ {
170+ "_source" : {
171+ "@timestamp" : "2099-12-07T11:07:10.000Z",
172+ "process" : {
173+ "pid" : 2012
174+ }
175+ }
176+ }
177+ ]
178+ }
179+ }
180+ ----
181+
139182[discrete]
140183[[eql-search-sequence]]
141184=== Search for a sequence of events
You can’t perform that action at this time.
0 commit comments