From ac3055f13827383ca84d0d5e00f145f41e91d3c2 Mon Sep 17 00:00:00 2001 From: Archer Date: Wed, 11 Dec 2024 10:27:08 -0600 Subject: [PATCH 1/4] Add automation for first three CAT APIs Signed-off-by: Archer --- _api-reference/cat/cat-aliases.md | 28 ++++++++++++++------ _api-reference/cat/cat-allocation.md | 32 +++++++++++++++++------ _api-reference/cat/cat-cluster_manager.md | 27 ++++++++++++++++--- 3 files changed, 68 insertions(+), 19 deletions(-) diff --git a/_api-reference/cat/cat-aliases.md b/_api-reference/cat/cat-aliases.md index 950d497351..98c9ce6ac9 100644 --- a/_api-reference/cat/cat-aliases.md +++ b/_api-reference/cat/cat-aliases.md @@ -16,20 +16,32 @@ has_children: false The CAT aliases operation lists the mapping of aliases to indexes, plus routing and filtering information. -## Path and HTTP methods - + +## Paths and HTTP methods ```json -GET _cat/aliases/ -GET _cat/aliases +GET /_cat/aliases +GET /_cat/aliases/{name} ``` -{% include copy-curl.html %} + + ## Query parameters - 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`. +`expand_wildcards` | String / String / String / String / List | Whether to expand wildcard expression to concrete indexes that are open, closed or both. +`format` | String | A short version of the Accept header (for example, `json`, `yaml`). +`h` | List | Comma-separated list of column names to display. +`help` | Boolean | Return help information. +`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. +`s` | List | Comma-separated list of column names or column aliases to sort by. +`v` | Boolean | Verbose mode. Display column headers. + ## Example requests diff --git a/_api-reference/cat/cat-allocation.md b/_api-reference/cat/cat-allocation.md index a57c861a4b..c5c9af23f3 100644 --- a/_api-reference/cat/cat-allocation.md +++ b/_api-reference/cat/cat-allocation.md @@ -15,20 +15,36 @@ has_children: false The CAT allocation operation lists the allocation of disk space for indexes and the number of shards on each node. -## Path and HTTP methods - + +## Paths and HTTP methods ```json -GET _cat/allocation?v -GET _cat/allocation/ +GET /_cat/allocation +GET /_cat/allocation/{node_id} ``` + + -## Query parameters + +## 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. +`bytes` | String | The unit used to display byte values. +`cluster_manager_timeout` | String | Operation timeout for connection to cluster-manager node. +`format` | String | A short version of the Accept header (for example, `json`, `yaml`). +`h` | List | Comma-separated list of column names to display. +`help` | Boolean | Return help information. +`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. +`s` | List | Comma-separated list of column names or column aliases to sort by. +`v` | Boolean | Verbose mode. Display column headers. +`master_timeout`
_DEPRECATED_ | String | _(Deprecated since 2.0: To promote inclusive language, use `cluster_manager_timeout` instead.)_ Operation timeout for connection to cluster-manager node. + ## Example requests diff --git a/_api-reference/cat/cat-cluster_manager.md b/_api-reference/cat/cat-cluster_manager.md index 1b75074e12..fdb82cfe32 100644 --- a/_api-reference/cat/cat-cluster_manager.md +++ b/_api-reference/cat/cat-cluster_manager.md @@ -15,11 +15,32 @@ has_children: false The CAT cluster manager operation lists information that helps identify the elected cluster manager node. -## Path and HTTP methods - + +## Paths and HTTP methods ```json -GET _cat/cluster_manager +GET /_cat/cluster_manager ``` + + + +## Query parameters +Parameter | Type | Description +:--- | :--- | :--- +`cluster_manager_timeout` | String | Operation timeout for connection to cluster-manager node. +`format` | String | A short version of the Accept header (for example, `json`, `yaml`). +`h` | List | Comma-separated list of column names to display. +`help` | Boolean | Return help information. +`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. +`s` | List | Comma-separated list of column names or column aliases to sort by. +`v` | Boolean | Verbose mode. Display column headers. +`master_timeout`
_DEPRECATED_ | String | _(Deprecated since 2.0: To promote inclusive language, use `cluster_manager_timeout` instead.)_ Operation timeout for connection to cluster-manager node. + ## Query parameters From be747a7ab8a3068bacd51334b90d4074bd246d91 Mon Sep 17 00:00:00 2001 From: Archer Date: Thu, 19 Dec 2024 12:39:14 -0600 Subject: [PATCH 2/4] Add pointers for Aliases and Allocation. Remove for cluster_manager. Signed-off-by: Archer --- _api-reference/cat/cat-aliases.md | 31 ++++++++++++++------- _api-reference/cat/cat-allocation.md | 34 +++++++++++++++-------- _api-reference/cat/cat-cluster_manager.md | 23 ++------------- 3 files changed, 45 insertions(+), 43 deletions(-) diff --git a/_api-reference/cat/cat-aliases.md b/_api-reference/cat/cat-aliases.md index 036fd961f3..c027f39f6d 100644 --- a/_api-reference/cat/cat-aliases.md +++ b/_api-reference/cat/cat-aliases.md @@ -17,26 +17,37 @@ The CAT aliases operation lists the mapping of aliases to indexes, plus routing + ## Endpoints - ```json GET /_cat/aliases GET /_cat/aliases/{name} ``` + + ## Query parameters -Parameter | Type | Description -:--- | :--- | :--- -`expand_wildcards` | String / String / String / String / List | Whether to expand wildcard expression to concrete indexes that are open, closed or both. -`format` | String | A short version of the Accept header (for example, `json`, `yaml`). -`h` | List | Comma-separated list of column names to display. -`help` | Boolean | Return help information. -`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. -`s` | List | Comma-separated list of column names or column aliases to sort by. -`v` | Boolean | Verbose mode. Display column headers. +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. | +`local` | Boolean | Whether to return information from the local node only instead of from the cluster manager node. | +`s` | List | A comma-separated list of column names or column aliases to sort by. | +`v` | Boolean | Enables verbose mode, which displays column headers. | + ## Example requests ```json diff --git a/_api-reference/cat/cat-allocation.md b/_api-reference/cat/cat-allocation.md index 79e6eef1e6..157faa9e11 100644 --- a/_api-reference/cat/cat-allocation.md +++ b/_api-reference/cat/cat-allocation.md @@ -16,25 +16,35 @@ The CAT allocation operation lists the allocation of disk space for indexes and + ## Endpoints - ```json GET /_cat/allocation GET /_cat/allocation/{node_id} ``` + + + ## Query parameters -Parameter | Type | Description -:--- | :--- | :--- -`bytes` | String | The unit used to display byte values. -`cluster_manager_timeout` | String | Operation timeout for connection to cluster-manager node. -`format` | String | A short version of the Accept header (for example, `json`, `yaml`). -`h` | List | Comma-separated list of column names to display. -`help` | Boolean | Return help information. -`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. -`s` | List | Comma-separated list of column names or column aliases to sort by. -`v` | Boolean | Verbose mode. Display column headers. -`master_timeout`
_DEPRECATED_ | String | _(Deprecated since 2.0: To promote inclusive language, use `cluster_manager_timeout` instead.)_ Operation timeout for connection to cluster-manager node. +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. | +`local` | Boolean | Returns local information but does not retrieve the state from cluster-manager node. | +`s` | List | A comma-separated list of column names or column aliases to sort by. | +`v` | Boolean | Enables verbose mode, which displays column headers. | ## Example requests diff --git a/_api-reference/cat/cat-cluster_manager.md b/_api-reference/cat/cat-cluster_manager.md index c062d28ed8..2cdb27d218 100644 --- a/_api-reference/cat/cat-cluster_manager.md +++ b/_api-reference/cat/cat-cluster_manager.md @@ -15,31 +15,12 @@ has_children: false The CAT cluster manager operation lists information that helps identify the elected cluster manager node. - ## Endpoints ```json -GET /_cat/cluster_manager +GET _cat/cluster_manager ``` - - -## Query parameters -Parameter | Type | Description -:--- | :--- | :--- -`cluster_manager_timeout` | String | Operation timeout for connection to cluster-manager node. -`format` | String | A short version of the Accept header (for example, `json`, `yaml`). -`h` | List | Comma-separated list of column names to display. -`help` | Boolean | Return help information. -`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. -`s` | List | Comma-separated list of column names or column aliases to sort by. -`v` | Boolean | Verbose mode. Display column headers. -`master_timeout`
_DEPRECATED_ | String | _(Deprecated since 2.0: To promote inclusive language, use `cluster_manager_timeout` instead.)_ Operation timeout for connection to cluster-manager node. - - ## Query parameters Parameter | Type | Description @@ -58,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 From d33d12a98acdf7ae33e34d9e0be0a0345cb97cba Mon Sep 17 00:00:00 2001 From: Archer Date: Thu, 19 Dec 2024 14:58:19 -0600 Subject: [PATCH 3/4] Add updated specs Signed-off-by: Archer --- _api-reference/cat/cat-aliases.md | 6 +++--- _api-reference/cat/cat-allocation.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_api-reference/cat/cat-aliases.md b/_api-reference/cat/cat-aliases.md index c027f39f6d..9913100d0d 100644 --- a/_api-reference/cat/cat-aliases.md +++ b/_api-reference/cat/cat-aliases.md @@ -41,10 +41,10 @@ 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. | -`local` | Boolean | Whether to return information from the local node only instead of from the cluster manager node. | +`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. | +`v` | Boolean | Enables verbose mode, which displays column headers. | `false` diff --git a/_api-reference/cat/cat-allocation.md b/_api-reference/cat/cat-allocation.md index 157faa9e11..933537bcbb 100644 --- a/_api-reference/cat/cat-allocation.md +++ b/_api-reference/cat/cat-allocation.md @@ -41,10 +41,10 @@ Parameter | Type | Description | Default `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. | -`local` | Boolean | Returns local information but does not retrieve the state from cluster-manager node. | +`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. | +`v` | Boolean | Enables verbose mode, which displays column headers. | `false` ## Example requests From 29f17f3634ff553f57b08a660b1229026c0d7b94 Mon Sep 17 00:00:00 2001 From: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:17:23 -0600 Subject: [PATCH 4/4] 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> --- _api-reference/cat/cat-allocation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_api-reference/cat/cat-allocation.md b/_api-reference/cat/cat-allocation.md index 933537bcbb..16b4b9785d 100644 --- a/_api-reference/cat/cat-allocation.md +++ b/_api-reference/cat/cat-allocation.md @@ -42,7 +42,7 @@ Parameter | Type | Description | Default `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` +`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`