Get async ES|QL query results

  • GET /_query/async/{id}
Auth

Get the current status and available results or stored results for an ES|QL asynchronous query. If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.

Read the reference documentation

Path parameters

id string required

The unique identifier of the query. A query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time. A query ID is also provided when the request was submitted with the keep_on_completion parameter set to true.

Query parameters

drop_null_columns boolean · default: false

Indicates whether columns that are entirely null will be removed from the columns and values portion of the results. If true, the response will include an extra section under the name all_columns which has the name of all the columns.

format enum

A short version of the Accept header, for example json or yaml.

Values: csv json tsv txt yaml cbor smile arrow
keep_alive string

The period for which the query and its results are stored in the cluster. When this period expires, the query and its results are deleted, even if the query is still ongoing.

wait_for_completion_timeout string

The period to wait for the request to finish. By default, the request waits for complete query results. If the request completes during the period specified in this parameter, complete query results are returned. Otherwise, the response returns an is_running value of true and no results.

Response

application/json
took number
is_partial boolean
all_columns object[]
name string required
type string required
columns object[] required
name string required
type string required
values union oneOf[] required
One of: number or string or boolean or object
_clusters object

Cross-cluster search information. Present if include_ccs_metadata was true in the request and a cross-cluster search was performed.

total number required
successful number required
running number required
skipped number required
partial number required
failed number required
details map string to object required
<string> object
status enum required
Values: running successful partial skipped failed
indices string required
took number
_shards object
total number required
successful number
skipped number
failed number
failures object[]
shard string required
index string required
node string
reason object required
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as reason in failures
root_cause object[]
Same fields as reason in failures
suppressed object[]
Same fields as reason in failures
profile object

Profiling information. Present if profile was true in the request. The contents of this field are currently unstable.

id string

The ID of the async query, to be used in subsequent requests to check the status or retrieve results.

Also available in the X-Elasticsearch-Async-Id HTTP header.

is_running boolean required

Indicates whether the async query is still running or has completed.

Also available in the X-Elasticsearch-Async-Is-Running HTTP header.