Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Format all API pages according to the API template #1

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```json
GET _cat/aliases?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ 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.

## Example
**Example**

```json
GET _cat/allocation?v
Expand Down
5 changes: 3 additions & 2 deletions _api-reference/cat/cat-cluster_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ 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.

## Example
**Example**

```
GET _cat/cluster_manager?v
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
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-count.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```json
GET _cat/count?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-field-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ 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.

## Example
**Example**

```json
GET _cat/fielddata?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-health.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```json
GET _cat/health?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-indices.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ 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.

## Example
**Example**

```
GET _cat/indices?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-nodeattrs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ redirect_from:
---

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

The CAT nodeattrs operation lists the attributes of custom nodes.

## Example
**Example**

```
GET _cat/nodeattrs?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ 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.

A few important node metrics are `pid`, `name`, `cluster_manager`, `ip`, `port`, `version`, `build`, `jdk`, along with `disk`, `heap`, `ram`, and `file_desc`.

## Example
**Example**

```
GET _cat/nodes?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-pending-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```
GET _cat/pending_tasks?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```
GET _cat/plugins?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```
GET _cat/recovery?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```
GET _cat/repositories?v
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
### Examples

The following examples illustrate various segment replication responses.

Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-segments.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```
GET _cat/segments?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-shards.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```
GET _cat/shards?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ redirect_from:
---

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

The CAT snapshots operation lists all snapshots for a repository.

## Example
**Example**

```
GET _cat/snapshots?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cat/cat-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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.

## Example
**Example**

```
GET _cat/tasks?v
Expand Down
4 changes: 2 additions & 2 deletions _api-reference/cluster-api/cluster-allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ 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.

If you add some options, you can instead get information on a specific shard, including why OpenSearch assigned it to its current node.


## Example
**Example**

```json
GET _cluster/allocation/explain?include_yes_decisions=true
Expand Down
20 changes: 11 additions & 9 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 @@ -49,11 +51,11 @@ In the following example request body, `zone_1` and `zone_2` receive 50 requests
}
```

## Example: Weighted round robin search
#### Example: Weighted round robin search

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 @@ -78,18 +80,18 @@ PUT /_cluster/routing/awareness/zone/weights
```


## Example: Getting weights for all zones
#### Example: Getting weights for all zones

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 @@ -106,18 +108,18 @@ OpenSearch responds with the weight of each zone:
}
```

## Example: Deleting weights
#### Example: Deleting weights

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
Loading