Skip to content

Commit

Permalink
Add automation for first two CAT APIs (#8930)
Browse files Browse the repository at this point in the history
* Add automation for first three CAT APIs

Signed-off-by: Archer <[email protected]>

* Add pointers for Aliases and Allocation. Remove for cluster_manager.

Signed-off-by: Archer <[email protected]>

* Add updated specs

Signed-off-by: Archer <[email protected]>

* Update _api-reference/cat/cat-allocation.md

Co-authored-by: kolchfa-aws <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
(cherry picked from commit 1006421)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and kolchfa-aws committed Dec 19, 2024
1 parent 223fbaf commit b0a03b1
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 18 deletions.
33 changes: 25 additions & 8 deletions _api-reference/cat/cat-aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,37 @@ has_children: false
The CAT aliases operation lists the mapping of aliases to indexes, plus routing and filtering information.


## Endpoints

<!-- spec_insert_start
api: cat.aliases
component: endpoints
-->
## Endpoints
```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
columns: Parameter,Type,Description,Default
include_deprecated: false
-->
## 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`
<!-- spec_insert_end -->

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

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

<!-- spec_insert_start
api: cat.allocation
component: endpoints
-->
## Endpoints
```json
GET _cat/allocation?v
GET _cat/allocation/<node_name>
GET /_cat/allocation
GET /_cat/allocation/{node_id}
```
<!-- spec_insert_end -->

## 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.
<!-- spec_insert_start
api: cat.allocation
component: query_parameters
columns: Parameter,Type,Description,Default
include_deprecated: false
-->
## 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`
<!-- spec_insert_end -->

## Example requests

Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-cluster_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
```

0 comments on commit b0a03b1

Please sign in to comment.