elasticsearch/docs/reference/sql/apis/get-async-sql-search-status-api.asciidoc
James Rodewig 07ac8818b6
[DOCS] Remove testenv annotations from doc snippet tests (#80023) (#80458)
Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
# Conflicts:
#	docs/reference/ml/df-analytics/apis/get-trained-model-deployment-stats.asciidoc
#	docs/reference/ml/df-analytics/apis/infer-trained-model-deployment.asciidoc
#	docs/reference/ml/df-analytics/apis/put-trained-model-definition-part.asciidoc
#	docs/reference/ml/df-analytics/apis/put-trained-model-vocabulary.asciidoc
#	docs/reference/ml/df-analytics/apis/start-trained-model-deployment.asciidoc
#	docs/reference/ml/df-analytics/apis/stop-trained-model-deployment.asciidoc
#	docs/reference/slm/apis/slm-delete.asciidoc
#	docs/reference/slm/apis/slm-execute-retention.asciidoc
#	docs/reference/slm/apis/slm-execute.asciidoc
#	docs/reference/slm/apis/slm-get-status.asciidoc
#	docs/reference/slm/apis/slm-get.asciidoc
#	docs/reference/slm/apis/slm-start.asciidoc
#	docs/reference/slm/apis/slm-stats.asciidoc
#	docs/reference/slm/apis/slm-stop.asciidoc
#	docs/reference/sql/endpoints/client-apps/tableau-desktop.asciidoc
#	docs/reference/sql/endpoints/client-apps/tableau-server.asciidoc
2021-11-05 19:41:54 -04:00

66 lines
2 KiB
Text

[role="xpack"]
[[get-async-sql-search-status-api]]
=== Get async SQL search status API
++++
<titleabbrev>Get async SQL search status</titleabbrev>
++++
Returns the current status of an <<sql-async,async SQL search>> or a
<<sql-store-searches,stored synchronous SQL search>>.
[source,console]
----
GET _sql/async/status/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=?format=json
----
// TEST[skip: no access to search ID]
[[get-async-sql-search-status-api-request]]
==== {api-request-title}
`GET _sql/async/status/<search_id>`
[[get-async-sql-search-status-api-prereqs]]
==== {api-prereq-title}
* If the {es} {security-features} are enabled, you must have the `monitor`
<<privileges-list-cluster,cluster privilege>> to use this API.
[[get-async-sql-search-status-api-limitations]]
===== Limitations
See <<sql-limitations>>.
[[get-async-sql-search-status-api-path-params]]
==== {api-path-parms-title}
`<search_id>`::
(Required, string) Identifier for the search.
[role="child_attributes"]
[[get-async-sql-search-status-api-response-body]]
==== {api-response-body-title}
`id`::
(string) Identifier for the search.
`is_running`::
(Boolean) If `true`, the search is still running. If `false`, the
search has finished.
`is_partial`::
(Boolean) If `true`, the response does not contain complete search results. If
`is_partial` is `true` and `is_running` is `true`, the search is still running.
If `is_partial` is `true` but `is_running` is `false`, the results are partial
due to a failure or timeout.
`start_time_in_millis`::
(integer) Timestamp, in milliseconds since the Unix epoch, when the search
started. The API only returns this property for running searches.
`expiration_time_in_millis`::
(integer) Timestamp, in milliseconds since the Unix epoch, when {es} will delete
the search and its results, even if the search is still running.
`completion_status`::
(integer) HTTP status code for the search. The API only returns this property
for completed searches.