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
-
index
string | array[string] Required The name of the index to scope the operation
Query parameters
-
allow_no_indices
boolean -
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
-
query
string 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 filter
object | array[object] Query, written in Query DSL, used to filter the events on which the EQL query runs.
One of: An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
-
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. -
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
curl \
--request POST http://api.example.com/{index}/_eql/search \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"query\": \"\"\"\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n \"\"\"\n}"'
{
"query": """
process where (process.name == "cmd.exe" and process.pid != 2013)
"""
}
{
"query": """
sequence by process.pid
[ file where file.name == "cmd.exe" and process.pid != 2013 ]
[ process where stringContains(process.executable, "regsvr32") ]
"""
}
{
"id": "string",
"is_partial": true,
"is_running": true,
"": 42.0,
"timed_out": true,
"hits": {
"total": {
"relation": "eq",
"value": 42.0
},
"events": [
{
"_index": "string",
"_id": "string",
"_source": {},
"missing": true,
"fields": {
"additionalProperty1": [
{}
],
"additionalProperty2": [
{}
]
}
}
],
"sequences": [
{
"events": [
{
"_index": "string",
"_id": "string",
"_source": {},
"missing": true,
"fields": {}
}
],
"join_keys": [
{}
]
}
]
}
}