get-search-application.asciidoc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. [[get-search-application-request]]
  10. ==== {api-request-title}
  11. `GET _application/search_application/<name>`
  12. [[get-search-application-prereq]]
  13. ==== {api-prereq-title}
  14. Requires the `manage_search_application` cluster privilege.
  15. [[get-search-application-path-params]]
  16. ==== {api-path-parms-title}
  17. `<name>`::
  18. (Required, string)
  19. [[get-search-application-response-codes]]
  20. ==== {api-response-codes-title}
  21. `400`::
  22. The `name` was not provided.
  23. `404` (Missing resources)::
  24. No Search Application matching `name` could be found.
  25. [[get-search-application-example]]
  26. ==== {api-examples-title}
  27. The following example gets the Search Application named `my-app`:
  28. [source,console]
  29. ----
  30. GET _application/search_application/my-app/
  31. ----
  32. // TEST[skip:TBD]
  33. A sample response:
  34. [source,console-result]
  35. ----
  36. {
  37. "name": "my-app",
  38. "indices": [ "index1", "index2" ],
  39. "updated_at_millis": 1682105622204,
  40. "template": {
  41. "script": {
  42. "source": {
  43. "query": {
  44. "query_string": {
  45. "query": "{{query_string}}",
  46. "default_field": "{{default_field}}"
  47. }
  48. }
  49. },
  50. "params": {
  51. "query_string": "*",
  52. "default_field": "*"
  53. }
  54. }
  55. }
  56. }
  57. ----