get-async-sql-search-api.asciidoc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. [role="xpack"]
  2. [[get-async-sql-search-api]]
  3. === Get async SQL search API
  4. ++++
  5. <titleabbrev>Get async SQL search</titleabbrev>
  6. ++++
  7. Returns results for an <<sql-async,async SQL search>> or a
  8. <<sql-store-searches,stored synchronous SQL search>>.
  9. [source,console]
  10. ----
  11. GET _sql/async/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=?format=json
  12. ----
  13. // TEST[skip: no access to search ID]
  14. [[get-async-sql-search-api-request]]
  15. ==== {api-request-title}
  16. `GET _sql/async/<search_id>`
  17. [[get-async-sql-search-api-prereqs]]
  18. ==== {api-prereq-title}
  19. * If the {es} {security-features} are enabled, only the user who first submitted
  20. the SQL search can retrieve the search using this API.
  21. [[get-async-sql-search-api-limitations]]
  22. ===== Limitations
  23. See <<sql-limitations>>.
  24. [[get-async-sql-search-api-path-params]]
  25. ==== {api-path-parms-title}
  26. `<search_id>`::
  27. (Required, string) Identifier for the search.
  28. [[get-async-sql-search-api-query-params]]
  29. ==== {api-query-parms-title}
  30. `delimiter`::
  31. (Optional, string) Separator for CSV results. Defaults to `,`. The API only
  32. supports this parameter for CSV responses.
  33. `format`::
  34. (Required, string) Format for the response. You must specify a format using this
  35. parameter or the `Accept` HTTP header. If you specify both, the API uses this
  36. parameter. For valid values, see <<sql-rest-format>>.
  37. `keep_alive`::
  38. (Optional, <<time-units,time value>>) Retention period for the search and its
  39. results. Defaults to the `keep_alive` period for the original SQL search.
  40. `wait_for_completion_timeout`::
  41. (Optional, <<time-units,time value>>) Period to wait for complete results.
  42. Defaults to no timeout, meaning the request waits for complete search results.
  43. [[get-async-sql-search-api-response-body]]
  44. ==== {api-response-body-title}
  45. The get async SQL search API returns the same response body as the
  46. <<sql-search-api-response-body,SQL search API>>.