From e8acf6b34f11d0706fb55a7ddf3d2f17e6a1f4b5 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Mon, 12 Aug 2019 08:30:25 -0400 Subject: [PATCH] [DOCS] Reformats cat repositories API (#45382) --- docs/reference/cat/repositories.asciidoc | 35 ++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/docs/reference/cat/repositories.asciidoc b/docs/reference/cat/repositories.asciidoc index a0a4263aa47..1f4ed6a0d49 100644 --- a/docs/reference/cat/repositories.asciidoc +++ b/docs/reference/cat/repositories.asciidoc @@ -1,8 +1,35 @@ [[cat-repositories]] === cat repositories -The `repositories` command shows the snapshot repositories registered in the -cluster. For example: +Returns the <> for a cluster. + + +[[cat-repositories-api-request]] +==== {api-request-title} + +`GET /_cat/repositories` + + +[[cat-repositories-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-repositories-api-example]] +==== {api-examples-title} [source,js] -------------------------------------------------- @@ -11,7 +38,7 @@ GET /_cat/repositories?v // CONSOLE // TEST[s/^/PUT \/_snapshot\/repo1\n{"type": "fs", "settings": {"location": "repo\/1"}}\n/] -might looks like: +The API returns the following response: [source,txt] -------------------------------------------------- @@ -20,5 +47,3 @@ repo1 fs repo2 s3 -------------------------------------------------- // TESTRESPONSE[s/\nrepo2 s3// non_json] - -We can quickly see which repositories are registered and their type.