[DOCS] Reformat cat alias API (#45119)

This commit is contained in:
James Rodewig 2019-08-05 08:27:15 -04:00
parent dae648eb32
commit 2f4c342fff
2 changed files with 83 additions and 4 deletions

View File

@ -1,8 +1,41 @@
[[cat-alias]]
=== cat aliases
`aliases` shows information about currently configured aliases to indices
including filter and routing infos.
Returns information about currently configured aliases to indices, including
filter and routing information.
[[cat-alias-api-request]]
==== {api-request-title}
`GET /_cat/aliases/{name}`
[[cat-alias-api-path-params]]
==== {api-path-parms-title}
include::{docdir}/rest-api/common-parms.asciidoc[tag=name]
[[cat-alias-api-query-params]]
==== {api-query-parms-title}
include::{docdir}/rest-api/common-parms.asciidoc[tag=http-format]
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-h]
include::{docdir}/rest-api/common-parms.asciidoc[tag=help]
include::{docdir}/rest-api/common-parms.asciidoc[tag=local]
include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-s]
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-v]
[[cat-alias-api-example]]
==== {api-examples-title}
////
Hidden setup for example:
@ -39,7 +72,7 @@ GET /_cat/aliases?v
// CONSOLE
// TEST[continued]
Might respond with:
The API returns the following response:
[source,txt]
--------------------------------------------------
@ -51,7 +84,7 @@ alias4 test1 - 2 1,2
--------------------------------------------------
// TESTRESPONSE[s/[*]/[*]/ non_json]
The output shows that `alias2` has configured a filter, and specific routing
This response shows that `alias2` has configured a filter, and specific routing
configurations in `alias3` and `alias4`.
If you only want to get information about specific aliases, you can specify

View File

@ -1,12 +1,58 @@
tag::cat-h[]
`h` (headings)::
(Optional, string) Comma-separated list of column names to display.
end::cat-h[]
tag::help[]
`help`::
(Optional, boolean) If `true`, the response returns help information. Defaults
to `false`.
end::help[]
tag::http-format[]
`format`::
(Optional, string) Short version of the
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html[HTTP accept header].
Valid values include JSON, YAML, etc.
end::http-format[]
tag::local[]
`local`::
(Optional, boolean) If `true`, the request retrieves information from the local
node only. Defaults to `false`, which means information is retrieved from
the master node.
end::local[]
tag::name[]
`{name}`::
(Optional, string) Comma-separated list of alias names to return.
end::name[]
tag::cat-s[]
`s` (sort)::
(Optional, string) Comma-separated list of column names or column aliases used
to sort the response.
end::cat-s[]
tag::cat-v[]
`v` (verbose)::
(Optional, boolean) If `true`, the response includes column headings. Defaults
to `false`.
end::cat-v[]
tag::timeoutparms[]
`timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a response. If no response is received before the timeout expires, the request
fails and returns an error. Defaults to `30s`.
tag::master-timeout[]
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
end::master-timeout[]
end::timeoutparms[]