Skip to content

Commit 7367855

Browse files
committed
[DOCS] Reformat get index API docs (#45758)
1 parent 45ad01a commit 7367855

File tree

2 files changed

+52
-8
lines changed

2 files changed

+52
-8
lines changed
Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[[indices-get-index]]
2-
=== Get Index
2+
=== Get index API
3+
++++
4+
<titleabbrev>Get index</titleabbrev>
5+
++++
36

4-
The get index API allows to retrieve information about one or more indexes.
7+
Returns information about one or more indexes.
58

69
[source,js]
710
--------------------------------------------------
@@ -10,12 +13,47 @@ GET /twitter
1013
// CONSOLE
1114
// TEST[setup:twitter]
1215

13-
The above example gets the information for an index called `twitter`. Specifying an index,
14-
alias or wildcard expression is required.
15-
16-
The get index API can also be applied to more than one index, or on
17-
all indices by using `_all` or `*` as index.
18-
1916
NOTE: Before 7.0.0, the 'mappings' definition used to include a type name. Although mappings
2017
in responses no longer contain a type name by default, you can still request the old format
2118
through the parameter include_type_name. For more details, please see <<removal-of-types>>.
19+
20+
21+
[[get-index-api-request]]
22+
==== {api-request-title}
23+
24+
`GET /<index>`
25+
26+
27+
[[get-index-api-path-params]]
28+
==== {api-path-parms-title}
29+
30+
`<index>`::
31+
+
32+
--
33+
(Required, string) Comma-separated list or wildcard expression of index names
34+
used to limit the request.
35+
36+
Use a value of `_all` to retrieve information for all indices in the cluster.
37+
--
38+
39+
40+
[[get-index-api-query-params]]
41+
==== {api-query-parms-title}
42+
43+
include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
44+
45+
include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
46+
+
47+
Defaults to `open`.
48+
49+
include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings]
50+
51+
include::{docdir}/rest-api/common-parms.asciidoc[tag=include-defaults]
52+
53+
include::{docdir}/rest-api/common-parms.asciidoc[tag=include-type-name]
54+
55+
include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
56+
57+
include::{docdir}/rest-api/common-parms.asciidoc[tag=local]
58+
59+
include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]

docs/reference/rest-api/common-parms.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html[HTTP accept header].
5757
Valid values include JSON, YAML, etc.
5858
end::http-format[]
5959

60+
tag::include-defaults[]
61+
`include_defaults`::
62+
(Optional, string) If `true`, return all default settings in the response.
63+
Defaults to `false`.
64+
end::include-defaults[]
65+
6066
tag::include-type-name[]
6167
`include_type_name`::
6268
deprecated:[7.0.0, Mapping types have been deprecated. See <<removal-of-types>>.]

0 commit comments

Comments
 (0)