Get async ES|QL query results Added in 8.13.0

GET /_query/async/{id}

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.

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

  • 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.

  • 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.

  • 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.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • columns object

      Additional properties are allowed.

    • is_running boolean Required

      Indicates whether the query is still running. If the value is false, the async query has finished and the results are returned.

GET /_query/async/{id}
curl \
 -X GET http://api.example.com/_query/async/{id}
Response examples (200)
{
  "columns": {},
  "is_running": true
}