Skip to content

Commit

Permalink
Add automation for first three CAT APIs
Browse files Browse the repository at this point in the history
Signed-off-by: Archer <[email protected]>
  • Loading branch information
Naarcha-AWS committed Dec 11, 2024
1 parent befc0d2 commit ac3055f
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 19 deletions.
28 changes: 20 additions & 8 deletions _api-reference/cat/cat-aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<!-- spec_insert_start
api: cat.aliases
component: paths_and_http_methods
-->
## Paths and HTTP methods
```json
GET _cat/aliases/<alias>
GET _cat/aliases
GET /_cat/aliases
GET /_cat/aliases/{name}
```
{% include copy-curl.html %}
<!-- spec_insert_end -->

<!-- spec_insert_start
api: cat.aliases
component: query_parameters
-->
## 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.

Check failure on line 37 in _api-reference/cat/cat-aliases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _api-reference/cat/cat-aliases.md#L37

[OpenSearch.SpacingSlash] When using '/' between words, do not insert space on either side of it.
Raw output
{"message": "[OpenSearch.SpacingSlash] When using '/' between words, do not insert space on either side of it.", "location": {"path": "_api-reference/cat/cat-aliases.md", "range": {"start": {"line": 37, "column": 22}}}, "severity": "ERROR"}

Check failure on line 37 in _api-reference/cat/cat-aliases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _api-reference/cat/cat-aliases.md#L37

[OpenSearch.SpacingSlash] When using '/' between words, do not insert space on either side of it.
Raw output
{"message": "[OpenSearch.SpacingSlash] When using '/' between words, do not insert space on either side of it.", "location": {"path": "_api-reference/cat/cat-aliases.md", "range": {"start": {"line": 37, "column": 40}}}, "severity": "ERROR"}
`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.
<!-- spec_insert_end -->

## Example requests

Expand Down
32 changes: 24 additions & 8 deletions _api-reference/cat/cat-allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<!-- spec_insert_start
api: cat.allocation
component: paths_and_http_methods
-->
## Paths and HTTP methods
```json
GET _cat/allocation?v
GET _cat/allocation/<node_name>
GET /_cat/allocation
GET /_cat/allocation/{node_id}
```
<!-- spec_insert_end -->


## Query parameters

<!-- spec_insert_start
api: cat.allocation
component: 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` <br> _DEPRECATED_ | String | _(Deprecated since 2.0: To promote inclusive language, use `cluster_manager_timeout` instead.)_ Operation timeout for connection to cluster-manager node.
<!-- spec_insert_end -->

## Example requests

Expand Down
27 changes: 24 additions & 3 deletions _api-reference/cat/cat-cluster_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<!-- spec_insert_start
api: cat.cluster_manager
component: paths_and_http_methods
-->
## Paths and HTTP methods
```json
GET _cat/cluster_manager
GET /_cat/cluster_manager
```
<!-- spec_insert_end -->

<!-- spec_insert_start
api: cat.cluster_manager
component: query_parameters
-->
## 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` <br> _DEPRECATED_ | String | _(Deprecated since 2.0: To promote inclusive language, use `cluster_manager_timeout` instead.)_ Operation timeout for connection to cluster-manager node.
<!-- spec_insert_end -->

## Query parameters

Expand Down

0 comments on commit ac3055f

Please sign in to comment.