Get async SQL search APIedit

Returns results for an async SQL search or a stored synchronous SQL search.

response = client.sql.get_async(
  id: 'FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=',
  format: 'json'
puts response
GET _sql/async/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=?format=json


GET _sql/async/<search_id>


  • If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.


See SQL Limitations.

Path parametersedit

(Required, string) Identifier for the search.

Query parametersedit

(Optional, string) Separator for CSV results. Defaults to ,. The API only supports this parameter for CSV responses.
(Required, string) Format for the response. You must specify a format using this parameter or the Accept HTTP header. If you specify both, the API uses this parameter. For valid values, see Response Data Formats.
(Optional, time value) Retention period for the search and its results. Defaults to the keep_alive period for the original SQL search.
(Optional, time value) Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results.

Response bodyedit

The get async SQL search API returns the same response body as the SQL search API.