Get EQL search results Added in 7.9.0
Returns search results for an Event Query Language (EQL) query. EQL assumes each document in a data stream or index corresponds to an event.
Path parameters
-
The name of the index to scope the operation
Query parameters
-
allow_no_indices boolean
-
allow_partial_search_results boolean
If true, returns partial results if there are shard failures. If false, returns an error with no partial results.
-
allow_partial_sequence_results boolean
If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all. This flag has effect only if allow_partial_search_results is true.
-
expand_wildcards string | array[string]
-
keep_alive string
Period for which the search and its results are stored on the cluster.
-
keep_on_completion boolean
If true, the search and its results are stored on the cluster.
-
wait_for_completion_timeout string
Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.
Body Required
-
EQL query you wish to run.
-
case_sensitive boolean
-
event_category_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
tiebreaker_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
timestamp_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
fetch_size number
-
keep_alive string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
keep_on_completion boolean
-
wait_for_completion_timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
allow_partial_search_results boolean
-
allow_partial_sequence_results boolean
-
size number
fields object | array[object]
Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.
-
result_position string
Values are
tail
orhead
. -
runtime_mappings object
-
max_samples_per_key number
By default, the response of a sample query contains up to
10
samples, with one sample per unique set of join keys. Use thesize
parameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use themax_samples_per_key
parameter. Pipes are not supported for sample queries.
curl \
-X POST http://api.example.com/{index}/_eql/search \
-H "Content-Type: application/json" \
-d '"{\n \"query\": \"\"\"\n process where process.name == \"regsvr32.exe\"\n \"\"\"\n}"'
{
"query": """
process where process.name == "regsvr32.exe"
"""
}
{
"query": """
process where (process.name == "cmd.exe" and process.pid != 2013)
"""
}