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

Fix API template consistency. #8488

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions API_STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ For GET and DELETE APIs: Introduce what you can do with the optional parameters.
Parameter | Data type | Description
:--- | :--- | :---

### Request fields
### Request body fields

For PUT and POST APIs: Introduce what the request fields are allowed to provide in the body of the request.

Expand Down Expand Up @@ -189,7 +189,7 @@ The `POST _reindex` request returns the following response fields:
}
```

### Response fields
### Response body fields

For PUT and POST APIs: Define all allowable response fields that can be returned in the body of the response.

Expand Down
20 changes: 10 additions & 10 deletions _api-reference/analyze-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ text | String or Array of Strings | Text to analyze. If you provide an array of

[Set a token limit](#set-a-token-limit)

#### Analyze array of text strings
### Analyze array of text strings

When you pass an array of strings to the `text` field, it is analyzed as a multi-value field.

Expand Down Expand Up @@ -145,7 +145,7 @@ The previous request returns the following fields:
}
````

#### Apply a built-in analyzer
### Apply a built-in analyzer

If you omit the `index` path parameter, you can apply any of the built-in analyzers to the text string.

Expand Down Expand Up @@ -190,7 +190,7 @@ The previous request returns the following fields:
}
````

#### Apply a custom analyzer
### Apply a custom analyzer

You can create your own analyzer and specify it in an analyze request.

Expand Down Expand Up @@ -244,7 +244,7 @@ The previous request returns the following fields:
}
````

#### Apply a custom transient analyzer
### Apply a custom transient analyzer

You can build a custom transient analyzer from tokenizers, token filters, or character filters. Use the `filter` parameter to specify token filters.

Expand Down Expand Up @@ -373,7 +373,7 @@ The previous request returns the following fields:
}
````

#### Specify an index
### Specify an index

You can analyze text using an index's default analyzer, or you can specify a different analyzer.

Expand Down Expand Up @@ -446,7 +446,7 @@ The previous request returns the following fields:
}
````

#### Derive the analyzer from an index field
### Derive the analyzer from an index field

You can pass text and a field in the index. The API looks up the field's analyzer and uses it to analyze the text.

Expand Down Expand Up @@ -493,7 +493,7 @@ The previous request returns the following fields:
}
````

#### Specify a normalizer
### Specify a normalizer

Instead of using a keyword field, you can use the normalizer associated with the index. A normalizer causes the analysis change to produce a single token.

Expand Down Expand Up @@ -557,7 +557,7 @@ The previous request returns the following fields:
}
````

#### Get token details
### Get token details

You can obtain additional details for all tokens by setting the `explain` attribute to `true`.

Expand Down Expand Up @@ -640,7 +640,7 @@ The previous request returns the following fields:
}
````

#### Set a token limit
### Set a token limit

You can set a limit to the number of tokens generated. Setting a lower value reduces a node's memory usage. The default value is 10000.

Expand All @@ -659,7 +659,7 @@ PUT /books2
The preceding request is an index API rather than an analyze API. See [Dynamic index-level index settings]({{site.url}}{{site.baseurl}}/install-and-configure/configuring-opensearch/index-settings/#dynamic-index-level-index-settings) for additional details.
{: .note}

### Response fields
## Response body fields

The text analysis endpoints return the following response fields.

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 @@ -24,7 +24,7 @@ GET _cat/aliases
```


## URL parameters
## Query parameters

All CAT aliases URL parameters are optional.

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 @@ -22,7 +22,7 @@ GET _cat/allocation?v
GET _cat/allocation/<node_name>
```

## URL parameters
## Query parameters

All CAT allocation URL parameters are optional.

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 @@ -17,11 +17,12 @@ The CAT cluster manager operation lists information that helps identify the elec

## Path and HTTP methods

```
```json
GET _cat/cluster_manager
```
{% include copy-curl.html %}

## URL parameters
## Query parameters

All CAT cluster manager URL parameters are optional.

Expand Down
5 changes: 3 additions & 2 deletions _api-reference/cat/cat-count.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ The CAT count operation lists the number of documents in your cluster.

## Path and HTTP methods

```
```json
GET _cat/count?v
GET _cat/count/<index>?v
```
{% include copy-curl.html %}

## URL parameters
## Query parameters

All CAT count URL parameters are optional. You can specify any of the [common URL parameters]({{site.url}}{{site.baseurl}}/api-reference/cat/index).

Expand Down
5 changes: 3 additions & 2 deletions _api-reference/cat/cat-field-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ The CAT Field Data operation lists the memory size used by each field per node.

## Path and HTTP methods

```
```json
GET _cat/fielddata?v
GET _cat/fielddata/<field_name>?v
```
{% include copy-curl.html %}

## URL parameters
## Query parameters

All CAT fielddata URL parameters are optional.

Expand Down
5 changes: 3 additions & 2 deletions _api-reference/cat/cat-health.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ The CAT health operation lists the status of the cluster, how long the cluster h

## Path and HTTP methods

```
```json
GET _cat/health?v
```
{% include copy-curl.html %}

## URL parameters
## Query parameters

All CAT health URL parameters are optional.

Expand All @@ -39,6 +39,7 @@ The following example request give cluster health information for the past 5 day
```json
GET _cat/health?v&time=5d
```
{% include copy-curl.html %}

## Example response

Expand Down
6 changes: 3 additions & 3 deletions _api-reference/cat/cat-indices.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GET _cat/indices/<index>
GET _cat/indices
```

## URL parameters
## Query parameters

All URL parameters are optional.

Expand All @@ -40,14 +40,14 @@ expand_wildcards | Enum | Expands wildcard expressions to concrete indexes. Comb

## Example requests

```
```json
GET _cat/indices?v
```
{% include copy-curl.html %}

To limit the information to a specific index, add the index name after your query.

```
```json
GET _cat/indices/<index>?v
```
{% include copy-curl.html %}
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 @@ -21,7 +21,7 @@ The CAT nodeattrs operation lists the attributes of custom nodes.
GET _cat/nodeattrs
```

## URL parameters
## Query parameters

All CAT nodeattrs URL parameters are optional.

Expand All @@ -36,7 +36,7 @@ cluster_manager_timeout | Time | The amount of time to wait for a connection to

The following example request returns attributes about custom nodes:

```
```json
GET _cat/nodeattrs?v
```
{% include copy-curl.html %}
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 @@ -23,7 +23,7 @@ A few important node metrics are `pid`, `name`, `cluster_manager`, `ip`, `port`,
GET _cat/nodes
```

## URL parameters
## Query parameters

All CAT nodes URL parameters are optional.

Expand All @@ -41,7 +41,7 @@ include_unloaded_segments | Boolean | Whether to include information from segmen

The following example request lists node level information:

```
```json
GET _cat/nodes?v
```
{% include copy-curl.html %}
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 @@ -22,7 +22,7 @@ The CAT pending tasks operation lists the progress of all pending tasks, includi
GET _cat/pending_tasks
```

## URL parameters
## Query parameters

All CAT nodes URL parameters are optional.

Expand All @@ -38,7 +38,7 @@ time | Time | Specify the units for time. For example, `5d` or `7h`. For more in

The following example request lists the progress of all pending node tasks:

```
```json
GET _cat/pending_tasks?v
```
{% include copy-curl.html %}
Expand Down
6 changes: 3 additions & 3 deletions _api-reference/cat/cat-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ The CAT plugins operation lists the names, components, and versions of the insta

## Path and HTTP methods

```
```json
GET _cat/plugins
```

## URL parameters
## Query parameters

All CAT plugins URL parameters are optional.

Expand All @@ -37,7 +37,7 @@ cluster_manager_timeout | Time | The amount of time to wait for a connection to

The following example request lists all installed plugins:

```
```json
GET _cat/plugins?v
```
{% include copy-curl.html %}
Expand Down
6 changes: 3 additions & 3 deletions _api-reference/cat/cat-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The CAT recovery operation lists all completed and ongoing index and shard recov
GET _cat/recovery
```

## URL parameters
## Query parameters

All CAT recovery URL parameters are optional.

Expand All @@ -37,14 +37,14 @@ time | Time | Specify the units for time. For example, `5d` or `7h`. For more in

## Example requests

```
```json
GET _cat/recovery?v
```
{% include copy-curl.html %}

To see only the recoveries of a specific index, add the index name after your query.

```
```json
GET _cat/recovery/<index>?v
```
{% include copy-curl.html %}
Expand Down
6 changes: 3 additions & 3 deletions _api-reference/cat/cat-repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ The CAT repositories operation lists all snapshot repositories for a cluster.

## Path and HTTP methods

```
```json
GET _cat/repositories
```

## URL parameters
## Query parameters

All CAT repositories URL parameters are optional.

Expand All @@ -36,7 +36,7 @@ cluster_manager_timeout | Time | The amount of time to wait for a connection to

The following example request lists all snapshot repositories in the cluster:

```
```json
GET _cat/repositories?v
```
{% include copy-curl.html %}
Expand Down
10 changes: 5 additions & 5 deletions _api-reference/cat/cat-segments.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ The cat segments operation lists Lucene segment-level information for each index

## Path and HTTP methods

```
```json
GET _cat/segments
```

## URL parameters
## Query parameters

All CAT segments URL parameters are optional.

Expand All @@ -35,21 +35,21 @@ cluster_manager_timeout | Time | The amount of time to wait for a connection to

## Example requests

```
```json
GET _cat/segments?v
```
{% include copy-curl.html %}

To see only the information about segments of a specific index, add the index name after your query.

```
```json
GET _cat/segments/<index>?v
```
{% include copy-curl.html %}

If you want to get information for more than one index, separate the indexes with commas:

```
```json
GET _cat/segments/index1,index2,index3
```
{% include copy-curl.html %}
Expand Down
Loading
Loading