Skip to content

Commit

Permalink
[DOC] Format all API pages according to the API template (#5169)
Browse files Browse the repository at this point in the history
* Fix APIs File

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

* Update API files according to API template

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

* Update exec-stored-script.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Update cat-aliases.md

Signed-off-by: MUHAMMAD SAMIULLAH <[email protected]>

* Update cat-allocation.md

Signed-off-by: MUHAMMAD SAMIULLAH <[email protected]>

* Update cat-cluster_manager.md

Signed-off-by: MUHAMMAD SAMIULLAH <[email protected]>

* Update cat-count.md

Signed-off-by: MUHAMMAD SAMIULLAH <[email protected]>

* Update cat-field-data.md

Signed-off-by: MUHAMMAD SAMIULLAH <[email protected]>

* Update cat-health.md

Signed-off-by: MUHAMMAD SAMIULLAH <[email protected]>

* updated

* updated

* updated

---------

Signed-off-by: samipak458 <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: MUHAMMAD SAMIULLAH <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
  • Loading branch information
samipak458 and Naarcha-AWS authored Oct 23, 2023
1 parent e88bdc4 commit 84e4ab1
Show file tree
Hide file tree
Showing 110 changed files with 303 additions and 167 deletions.
2 changes: 2 additions & 0 deletions _api-reference/analyze-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ redirect_from:
---

# Analyze API
**Introduced 1.0**
{: .label .label-purple }

The Analyze API allows you to perform [text analysis]({{site.url}}{{site.baseurl}}/api-reference/analyze-apis/), which is the process of converting unstructured text into individual tokens (usually words) that are optimized for search.

Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ has_children: false
---

# CAT aliases
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT aliases operation lists the mapping of aliases to indexes, plus routing and filtering information.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ has_children: false
---

# CAT allocation
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT allocation operation lists the allocation of disk space for indexes and the number of shards on each node.
Expand Down
3 changes: 2 additions & 1 deletion _api-reference/cat/cat-cluster_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ has_children: false
---

# CAT cluster_manager
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT cluster manager operation lists information that helps identify the elected cluster manager node.
Expand All @@ -36,6 +36,7 @@ In addition to the [common URL parameters]({{site.url}}{{site.baseurl}}/api-refe
Parameter | Type | Description
:--- | :--- | :---
cluster_manager_timeout | Time | The amount of time to wait for a connection to the cluster manager node. Default is 30 seconds.

## Response

```json
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-count.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT count
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT count operation lists the number of documents in your cluster.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-field-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ redirect_from:
---

# CAT fielddata
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT fielddata operation lists the memory size used by each field per node.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-health.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT health
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT health operation lists the status of the cluster, how long the cluster has been up, the number of nodes, and other useful information that helps you analyze the health of your cluster.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-indices.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ redirect_from:
---

# CAT indices
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT indices operation lists information related to indexes, that is, how much disk space they are using, how many shards they have, their health status, and so on.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-nodeattrs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ redirect_from:
---

# CAT nodeattrs
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT nodeattrs operation lists the attributes of custom nodes.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT nodes
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT nodes operation lists node-level information, including node roles and load metrics.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-pending-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT pending tasks
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT pending tasks operation lists the progress of all pending tasks, including task priority and time in queue.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT plugins
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT plugins operation lists the names, components, and versions of the installed plugins.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT recovery
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT recovery operation lists all completed and ongoing index and shard recoveries.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT repositories
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT repositories operation lists all completed and ongoing index and shard recoveries.
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-segment-replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ has_children: false
---

# CAT segment replication
Introduced 2.7
**Introduced 2.7**
{: .label .label-purple }

The CAT segment replication operation returns information about active and last completed [segment replication]({{site.url}}{{site.baseurl}}/opensearch/segment-replication/index) events on each replica shard, including related shard-level metrics. These metrics provide information about how far behind the primary shard the replicas are lagging.
Expand Down Expand Up @@ -47,7 +47,7 @@ Parameter | Data type | Description
`v` | Boolean | If `true`, the response includes column headings. Defaults to `false`.
`s` | String | Specifies to sort the results. For example, `s=shardId:desc` sorts by shardId in descending order.

## Examples
## Example

The following examples illustrate various segment replication responses.

Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-segments.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT segments
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The cat segments operation lists Lucene segment-level information for each index.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-shards.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT shards
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT shards operation lists the state of all primary and replica shards and how they are distributed.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT snapshots
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT snapshots operation lists all snapshots for a repository.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT tasks
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT tasks operation lists the progress of all tasks currently running on your cluster.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# CAT templates
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT templates operation lists the names, patterns, order numbers, and version numbers of index templates.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cat/cat-thread-pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ redirect_from:
---

# CAT thread pool
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The CAT thread pool operation lists the active, queued, and rejected threads of different thread pools on each node.
Expand Down
3 changes: 2 additions & 1 deletion _api-reference/cat/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ redirect_from:
---

# CAT API

**Introduced 1.0**
{: .label .label-purple }
You can get essential statistics about your cluster in an easy-to-understand, tabular format using the compact and aligned text (CAT) API. The CAT API is a human-readable interface that returns plain text instead of traditional JSON.

Using the CAT API, you can answer questions like which node is the elected master, what state is the cluster in, how many documents are in each index, and so on.
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cluster-api/cluster-allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ redirect_from:
---

# Cluster allocation explain
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The most basic cluster allocation explain request finds an unassigned shard and explains why it can't be allocated to a node.
Expand Down
14 changes: 8 additions & 6 deletions _api-reference/cluster-api/cluster-awareness.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ redirect_from:
---

# Cluster routing and awareness
**Introduced 1.0**
{: .label .label-purple }

To control the distribution of search or HTTP traffic, you can use the weights per awareness attribute to control the distribution of search or HTTP traffic across zones. This is commonly used for zonal deployments, heterogeneous instances, and routing traffic away from zones during zonal failure.

Expand Down Expand Up @@ -53,7 +55,7 @@ In the following example request body, `zone_1` and `zone_2` receive 50 requests

The following example request creates a round robin shard allocation for search traffic by using an undefined ratio:

### Request
#### Request

```json
PUT /_cluster/routing/awareness/zone/weights
Expand All @@ -69,7 +71,7 @@ PUT /_cluster/routing/awareness/zone/weights
```
{% include copy-curl.html %}

### Response
#### Response

```
{
Expand All @@ -82,14 +84,14 @@ PUT /_cluster/routing/awareness/zone/weights

The following example request gets weights for all zones.

### Request
#### Request

```json
GET /_cluster/routing/awareness/zone/weights
```
{% include copy-curl.html %}

### Response
#### Response

OpenSearch responds with the weight of each zone:

Expand All @@ -110,14 +112,14 @@ OpenSearch responds with the weight of each zone:

You can remove your weight ratio for each zone using the `DELETE` method.

### Request
#### Request

```json
DELETE /_cluster/routing/awareness/zone/weights
```
{% include copy-curl.html %}

### Response
#### Response

```json
{
Expand Down
10 changes: 6 additions & 4 deletions _api-reference/cluster-api/cluster-decommission.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ redirect_from:
---

# Cluster decommission
**Introduced 1.0**
{: .label .label-purple }

The cluster decommission operation adds support decommissioning based on awareness. It greatly benefits multi-zone deployments, where awareness attributes, such as `zones`, can aid in applying new upgrades to a cluster in a controlled fashion. This is especially useful during outages, in which case, you can decommission the unhealthy zone to prevent replication requests from stalling and prevent your request backlog from becoming too large.

Expand All @@ -36,7 +38,7 @@ awareness_attribute_value | String | The value of the awareness attribute. For e

You can use the following example requests to decommission and recommission a zone:

### Request
#### Request

The following example request decommissions `zone-a`:

Expand All @@ -52,7 +54,7 @@ DELETE /_cluster/decommission/awareness
```
{% include copy-curl.html %}

### Response
#### Response


```json
Expand All @@ -65,14 +67,14 @@ DELETE /_cluster/decommission/awareness

The following example requests returns the decommission status of all zones.

### Request
#### Request

```json
GET /_cluster/decommission/awareness/zone/_status
```
{% include copy-curl.html %}

### Response
#### Response

```json
{
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/cluster-api/cluster-health.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirect_from:
---

# Cluster health
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The most basic cluster health request returns a simple status of the health of your cluster. OpenSearch expresses cluster health in three colors: green, yellow, and red. A green status means all primary shards and their replicas are allocated to nodes. A yellow status means all primary shards are allocated to nodes, but some replicas aren't. A red status means at least one primary shard is not allocated to any node.
Expand Down
8 changes: 4 additions & 4 deletions _api-reference/cluster-api/cluster-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ redirect_from:
---

# Cluster settings
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The cluster settings operation lets you check the current settings for your cluster, review default settings, and change settings. When you update a setting using the API, OpenSearch applies it to all nodes in the cluster.

### Path and HTTP methods
## Path and HTTP methods

```
GET _cluster/settings
PUT _cluster/settings
```

### Path parameters
## Path parameters

All cluster setting parameters are optional.

Expand Down Expand Up @@ -51,7 +51,7 @@ PUT _cluster/settings
}
```

### Request fields
## Request fields

The GET operation has no request body options. All cluster setting field parameters are optional.

Expand Down
5 changes: 2 additions & 3 deletions _api-reference/cluster-api/cluster-stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ redirect_from:
---

# Cluster stats
Introduced 1.0
**Introduced 1.0**
{: .label .label-purple }

The cluster stats API operation returns statistics about your cluster.

## Examples
## Example

```json
GET _cluster/stats/nodes/_cluster_manager
Expand All @@ -29,7 +29,6 @@ GET _cluster/stats
GET _cluster/stats/nodes/<node-filters>
```


## URL parameters

All cluster stats parameters are optional.
Expand Down
Loading

0 comments on commit 84e4ab1

Please sign in to comment.