| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 | [role="xpack"][testenv="basic"][[get-async-eql-status-api]]=== Get async EQL status API++++<titleabbrev>Get async EQL search status</titleabbrev>++++Returns the current status for an <<eql-search-async,async EQL search>> ora <<eql-search-store-sync-eql-search,stored synchronous EQL search>>without returning results. This is a more lightweight API than<<get-async-eql-search-api,get async EQL search API>> as it doesn't returnsearch results, and reports only the status.If the {es} {security-features} are enabled, the access to the get asynceql status API is restricted to the <<built-in-roles, monitoring_user role>>.[source,console]----GET /_eql/search/status/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=----// TEST[skip: no access to search ID][[get-async-eql-status-api-request]]==== {api-request-title}`GET /_eql/search/status/<search_id>`[[get-async-eql-status-api-path-params]]==== {api-path-parms-title}`<search_id>`::(Required, string)Identifier for the search.+A search ID is provided in the <<eql-search-api,EQL search API>>'s response foran <<eql-search-async,async search>>. A search ID is also provided if therequest's <<eql-search-api-keep-on-completion,`keep_on_completion`>> parameteris `true`.[role="child_attributes"][[get-async-eql-status-api-response-body]]==== {api-response-body-title}`id`::(string)Identifier for the search.`is_running`::(boolean)If `true`, the search request is still executing.If `false`, the search is completed.`is_partial`::(boolean)If `true`, the response does not contain complete search results.This could be because either the search is still running(`is_running` status is `false`), or because it is already completed(`is_running` status is `true`)  and results are partial due tofailures or timeouts.`start_time_in_millis`::(Long)For a running search shows a timestamp when the eql searchstarted, in milliseconds since the Unix epoch.`expiration_time_in_millis`::(long)Shows a timestamp when the eql search will be expired, in millisecondssince the Unix epoch. When this time is reached, the search and its resultsare deleted, even if the search is still ongoing.`completion_status`::(Integer)For a completed search shows the http status code of the completedsearch.[[eql-status-api-example]]==== {api-examples-title}[source,console]----GET /_eql/search/status/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?keep_alive=5d----// TEST[skip: no access to search ID]If the search is still running, the status response has the following form:[source,console-result]--------------------------------------------------{  "id" : "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",  "is_running" : true,  "is_partial" : true,  "start_time_in_millis" : 1611690235000,  "expiration_time_in_millis" : 1611690295000}--------------------------------------------------// TEST[skip: no access to search ID]If the search is completed the status response doesn't have`start_time_in_millis`, but has an additional `completion_status`field that shows the status code of the completed eql search:[source,console-result]--------------------------------------------------{  "id" : "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",  "is_running" : false,  "is_partial" : false,  "expiration_time_in_millis" : 1611690295000,  "completion_status" : 200 <1>}--------------------------------------------------// TEST[skip: no access to search ID]<1> Indicates that the eql search was successfully completed
 |