get-search-application.asciidoc 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. [role="xpack"]
  2. [[get-search-application]]
  3. === Get Search Application
  4. beta::[]
  5. ++++
  6. <titleabbrev>Get Search Application</titleabbrev>
  7. ++++
  8. Retrieves information about a search application.
  9. If the search application has an inconsistent state between its alias and configured indices, a warning header will be returned with the response.
  10. To resolve this inconsistent state, issue an updated <<put-search-application>> command.
  11. [[get-search-application-request]]
  12. ==== {api-request-title}
  13. `GET _application/search_application/<name>`
  14. [[get-search-application-prereq]]
  15. ==== {api-prereq-title}
  16. Requires the `manage_search_application` cluster privilege.
  17. [[get-search-application-path-params]]
  18. ==== {api-path-parms-title}
  19. `<name>`::
  20. (Required, string)
  21. [[get-search-application-response-codes]]
  22. ==== {api-response-codes-title}
  23. `400`::
  24. The `name` was not provided.
  25. `404` (Missing resources)::
  26. No Search Application matching `name` could be found.
  27. [[get-search-application-example]]
  28. ==== {api-examples-title}
  29. The following example gets the Search Application named `my-app`:
  30. [source,console]
  31. ----
  32. GET _application/search_application/my-app/
  33. ----
  34. // TEST[skip:TBD]
  35. A sample response:
  36. [source,console-result]
  37. ----
  38. {
  39. "name": "my-app",
  40. "indices": [ "index1", "index2" ],
  41. "updated_at_millis": 1682105622204,
  42. "template": {
  43. "script": {
  44. "source": {
  45. "query": {
  46. "query_string": {
  47. "query": "{{query_string}}",
  48. "default_field": "{{default_field}}"
  49. }
  50. }
  51. },
  52. "params": {
  53. "query_string": "*",
  54. "default_field": "*"
  55. }
  56. }
  57. }
  58. }
  59. ----