get-async-sql-search-status-api.asciidoc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[get-async-sql-search-status-api]]
  4. === Get async SQL search status API
  5. ++++
  6. <titleabbrev>Get async SQL search status</titleabbrev>
  7. ++++
  8. Returns the current status of an <<sql-async,async SQL search>> or a
  9. <<sql-store-searches,stored synchronous SQL search>>.
  10. [source,console]
  11. ----
  12. GET _sql/async/status/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=?format=json
  13. ----
  14. // TEST[skip: no access to search ID]
  15. [[get-async-sql-search-status-api-request]]
  16. ==== {api-request-title}
  17. `GET _sql/async/status/<search_id>`
  18. [[get-async-sql-search-status-api-prereqs]]
  19. ==== {api-prereq-title}
  20. * If the {es} {security-features} are enabled, you must have the `monitor`
  21. <<privileges-list-cluster,cluster privilege>> to use this API.
  22. [[get-async-sql-search-status-api-limitations]]
  23. ===== Limitations
  24. See <<sql-limitations>>.
  25. [[get-async-sql-search-status-api-path-params]]
  26. ==== {api-path-parms-title}
  27. `<search_id>`::
  28. (Required, string) Identifier for the search.
  29. [role="child_attributes"]
  30. [[get-async-sql-search-status-api-response-body]]
  31. ==== {api-response-body-title}
  32. `id`::
  33. (string) Identifier for the search.
  34. `is_running`::
  35. (Boolean) If `true`, the search is still running. If `false`, the
  36. search has finished.
  37. `is_partial`::
  38. (Boolean) If `true`, the response does not contain complete search results. If
  39. `is_partial` is `true` and `is_running` is `true`, the search is still running.
  40. If `is_partial` is `true` but `is_running` is `false`, the results are partial
  41. due to a failure or timeout.
  42. `start_time_in_millis`::
  43. (integer) Timestamp, in milliseconds since the Unix epoch, when the search
  44. started. The API only returns this property for running searches.
  45. `expiration_time_in_millis`::
  46. (integer) Timestamp, in milliseconds since the Unix epoch, when {es} will delete
  47. the search and its results, even if the search is still running.
  48. `completion_status`::
  49. (integer) HTTP status code for the search. The API only returns this property
  50. for completed searches.