Skip to content

Files

Latest commit

86d568f · Dec 31, 2024

History

History
68 lines (54 loc) · 2.08 KB

esql-async-query-get-api.asciidoc

File metadata and controls

68 lines (54 loc) · 2.08 KB

{esql} async query get API

{esql} async query get API
New API reference

For the most up-to-date API details, refer to {api-es}/group/endpoint-esql[ES|QL APIs].

Returns the current status and available results for an {esql} async query or a stored results.

GET /_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=

{api-request-title}

GET /_query/async/<query_id>

{api-prereq-title}

  • If the {es} {security-features} are enabled, only the user who first submitted the {esql} query can retrieve the results using this API.

{api-path-parms-title}

<query_id>

(Required, string) Identifier for the query.

A query ID is provided in the {esql} async query API's response for a query that does not complete in the awaited time. A query ID is also provided if the request’s keep_on_completion parameter is true.

{api-query-parms-title}

The API accepts the same parameters as the synchronous query API, along with the following parameters:

wait_for_completion_timeout

(Optional, time value) Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete query results.

If this parameter is specified and the request completes during this period, complete query results are returned.

If the request does not complete during this period, the response returns an is_running value of true and no results.

{api-response-body-title}

The {esql} async query get API returns the same response body as the {esql} query API. See the {esql} query API’s response body parameters.