From b0a03b17380e631bc0facc1ac42892d95345aa21 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 19 Dec 2024 21:21:19 +0000 Subject: [PATCH] Add automation for first two CAT APIs (#8930) * Add automation for first three CAT APIs Signed-off-by: Archer * Add pointers for Aliases and Allocation. Remove for cluster_manager. Signed-off-by: Archer * Add updated specs Signed-off-by: Archer * Update _api-reference/cat/cat-allocation.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> --------- Signed-off-by: Archer Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> (cherry picked from commit 100642105afeb2e3231a45ece909c1f5a02bbc93) Signed-off-by: github-actions[bot] --- _api-reference/cat/cat-aliases.md | 33 +++++++++++++++------ _api-reference/cat/cat-allocation.md | 35 +++++++++++++++++------ _api-reference/cat/cat-cluster_manager.md | 2 +- 3 files changed, 52 insertions(+), 18 deletions(-) diff --git a/_api-reference/cat/cat-aliases.md b/_api-reference/cat/cat-aliases.md index 5a6e3e2692..9913100d0d 100644 --- a/_api-reference/cat/cat-aliases.md +++ b/_api-reference/cat/cat-aliases.md @@ -16,20 +16,37 @@ has_children: false The CAT aliases operation lists the mapping of aliases to indexes, plus routing and filtering information. -## Endpoints + +## Endpoints ```json -GET _cat/aliases/ -GET _cat/aliases +GET /_cat/aliases +GET /_cat/aliases/{name} ``` -{% include copy-curl.html %} + + + ## Query parameters +Parameter | Type | Description | Default +:--- | :--- | :--- | :--- +`expand_wildcards` | List or String | Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. | +`format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | +`h` | List | A comma-separated list of column names to display. | +`help` | Boolean | Returns help information. | `false` +`local` | Boolean | Whether to return information from the local node only instead of from the cluster manager node. | `false` +`s` | List | A comma-separated list of column names or column aliases to sort by. | +`v` | Boolean | Enables verbose mode, which displays column headers. | `false` + -Parameter | Type | Description -:--- | :--- | :--- -local | Boolean | Whether to return information from the local node only instead of from the cluster manager node. Default is `false`. -expand_wildcards | Enum | Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. Default is `open`. ## Example requests diff --git a/_api-reference/cat/cat-allocation.md b/_api-reference/cat/cat-allocation.md index c28a35afcc..16b4b9785d 100644 --- a/_api-reference/cat/cat-allocation.md +++ b/_api-reference/cat/cat-allocation.md @@ -15,20 +15,37 @@ has_children: false The CAT allocation operation lists the allocation of disk space for indexes and the number of shards on each node. -## Endpoints + +## Endpoints ```json -GET _cat/allocation?v -GET _cat/allocation/ +GET /_cat/allocation +GET /_cat/allocation/{node_id} ``` + -## Query parameters -Parameter | Type | Description -:--- | :--- | :--- -bytes | Byte size | Specify the units for byte size. For example, `7kb` or `6gb`. For more information, see [Supported units]({{site.url}}{{site.baseurl}}/opensearch/units/). -local | Boolean | Whether to return information from the local node only instead of from the cluster manager node. Default is `false`. -cluster_manager_timeout | Time | The amount of time to wait for a connection to the cluster manager node. Default is 30 seconds. + +## Query parameters +Parameter | Type | Description | Default +:--- | :--- | :--- | :--- +`bytes` | String | The units used to display byte values. | +`cluster_manager_timeout` | String | A timeout for connection to the cluster manager node. | +`format` | String | A short version of the HTTP `Accept` header, such as `json` or `yaml`. | +`h` | List | A comma-separated list of column names to display. | +`help` | Boolean | Returns help information. | `false` +`local` | Boolean | Returns local information but does not retrieve the state from cluster manager node. | `false` +`s` | List | A comma-separated list of column names or column aliases to sort by. | +`v` | Boolean | Enables verbose mode, which displays column headers. | `false` + ## Example requests diff --git a/_api-reference/cat/cat-cluster_manager.md b/_api-reference/cat/cat-cluster_manager.md index 21b2684817..2cdb27d218 100644 --- a/_api-reference/cat/cat-cluster_manager.md +++ b/_api-reference/cat/cat-cluster_manager.md @@ -39,4 +39,4 @@ GET _cat/cluster_manager?v ```json id | host | ip | node ZaIkkUd4TEiAihqJGkp5CA | 172.18.0.3 | 172.18.0.3 | opensearch-node2 -``` +``` \ No newline at end of file