ES|QL async query get API
Returns the current status and available results for an ES|QL async query or a stored results.
resp = client.esql.async_query_get(
id="FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
)
print(resp) response = client.esql.async_query_get( id: 'FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=' ) puts response
const response = await client.transport.request({
method: "GET",
path: "/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
});
console.log(response); GET /_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=
Request
GET /_query/async/<query_id>
Prerequisites
- 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
-
<query_id> -
(Required, string) Identifier for the query.
A query ID is provided in the ES|QL 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_completionparameter istrue.
Query 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_runningvalue oftrueand no results.
Response body
The ES|QL async query get API returns the same response body as the ES|QL query API. See the ES|QL query API’s response body parameters.
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-get-api.html