From ebd5ab0b92f64c5d09adb98354f885f2aad59a37 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Fri, 23 Aug 2019 11:14:51 -0400 Subject: [PATCH] [DOCS] Reformat get index API docs (#45758) --- docs/reference/indices/get-index.asciidoc | 54 ++++++++++++++++--- docs/reference/rest-api/common-parms.asciidoc | 6 +++ 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/docs/reference/indices/get-index.asciidoc b/docs/reference/indices/get-index.asciidoc index 561362f27ff4f..fa6ebbf6681e7 100644 --- a/docs/reference/indices/get-index.asciidoc +++ b/docs/reference/indices/get-index.asciidoc @@ -1,7 +1,10 @@ [[indices-get-index]] -=== Get Index +=== Get index API +++++ +Get index +++++ -The get index API allows to retrieve information about one or more indexes. +Returns information about one or more indexes. [source,js] -------------------------------------------------- @@ -10,12 +13,47 @@ GET /twitter // CONSOLE // TEST[setup:twitter] -The above example gets the information for an index called `twitter`. Specifying an index, -alias or wildcard expression is required. - -The get index API can also be applied to more than one index, or on -all indices by using `_all` or `*` as index. - NOTE: Before 7.0.0, the 'mappings' definition used to include a type name. Although mappings in responses no longer contain a type name by default, you can still request the old format through the parameter include_type_name. For more details, please see <>. + + +[[get-index-api-request]] +==== {api-request-title} + +`GET /` + + +[[get-index-api-path-params]] +==== {api-path-parms-title} + +``:: ++ +-- +(Required, string) Comma-separated list or wildcard expression of index names +used to limit the request. + +Use a value of `_all` to retrieve information for all indices in the cluster. +-- + + +[[get-index-api-query-params]] +==== {api-query-parms-title} + +include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards] ++ +Defaults to `open`. + +include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=include-defaults] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=include-type-name] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=local] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout] \ No newline at end of file diff --git a/docs/reference/rest-api/common-parms.asciidoc b/docs/reference/rest-api/common-parms.asciidoc index dbd975f8d6c7a..a996a253c4826 100644 --- a/docs/reference/rest-api/common-parms.asciidoc +++ b/docs/reference/rest-api/common-parms.asciidoc @@ -57,6 +57,12 @@ https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html[HTTP accept header]. Valid values include JSON, YAML, etc. end::http-format[] +tag::include-defaults[] +`include_defaults`:: +(Optional, string) If `true`, return all default settings in the response. +Defaults to `false`. +end::include-defaults[] + tag::include-type-name[] `include_type_name`:: deprecated:[7.0.0, Mapping types have been deprecated. See <>.]