elasticsearch/docs/reference/search-application/apis/list-search-applications.asciidoc
2023-06-09 11:09:21 -06:00

75 lines
1.5 KiB
Text

[role="xpack"]
[[list-search-applications]]
=== List Search Applications
beta::[]
++++
<titleabbrev>List Search Applications</titleabbrev>
++++
Returns information about Search Applications.
[[list-search-applications-request]]
==== {api-request-title}
`GET _application/search_application/`
[[list-search-applications-prereq]]
==== {api-prereq-title}
Requires the `manage_search_application` cluster privilege.
[[list-search-applications-path-params]]
==== {api-path-parms-title}
`q`::
(Optional, string) Query in the Lucene query string syntax, to return only search applications matching the query.
`size`::
(Optional, integer) Maximum number of results to retrieve.
`from`::
(Optional, integer) The offset from the first result to fetch.
[[list-search-applications-response-codes]]
==== {api-response-codes-title}
[[list-search-applications-example]]
==== {api-examples-title}
The following example lists all configured search applications:
[source,console]
----
GET _application/search_application/
----
// TEST[skip:TBD]
The following example lists the first three search applications whose names match the query string `app`:
[source,console]
----
GET _application/search_application/?from=0&size=3&q=app
----
// TEST[skip:TBD]
A sample response:
[source,console-result]
----
{
"count": 2,
"results": [
{
"name": "app-1",
"indices": [ "index1", "index2" ]
},
{
"name": "app-2",
"indices": [ "index3", "index4" ]
}
],
"updated_at_millis": 1682105622204
}
----