Change sample to example (#2972)

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
This commit is contained in:
kolchfa-aws 2023-02-20 11:34:20 -05:00 committed by GitHub
parent ff99f21ceb
commit 3da7598c0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 367 additions and 367 deletions

View File

@ -54,7 +54,7 @@ Field | Data type | Description
:--- | :--- | :--- :--- | :--- | :---
text | String or Array of Strings | Text to analyze. If you provide an array of strings, the text is analyzed as a multi-value field. text | String or Array of Strings | Text to analyze. If you provide an array of strings, the text is analyzed as a multi-value field.
#### Sample requests #### Example requests
[Analyze array of text strings](#analyze-array-of-text-strings) [Analyze array of text strings](#analyze-array-of-text-strings)

View File

@ -53,16 +53,16 @@ wait_for_no_initializing_shards | Boolean | Whether to wait until there are no i
wait_for_status | Enum | Wait until the cluster health reaches the specified status or better. Supported values are `green`, `yellow`, and `red`. wait_for_status | Enum | Wait until the cluster health reaches the specified status or better. Supported values are `green`, `yellow`, and `red`.
weights | JSON object | Assigns weights to attributes within the request body of the PUT request. Weights can be set in any ration, for example, 2:3:5. In a 2:3:5 ratio with three zones, for every 100 requests sent to the cluster, each zone would receive either 20, 30, or 50 search requests in a random order. When assigned a weight of `0`, the zone does not receive any search traffic. weights | JSON object | Assigns weights to attributes within the request body of the PUT request. Weights can be set in any ration, for example, 2:3:5. In a 2:3:5 ratio with three zones, for every 100 requests sent to the cluster, each zone would receive either 20, 30, or 50 search requests in a random order. When assigned a weight of `0`, the zone does not receive any search traffic.
#### Sample request #### Example request
The following sample request retrieves cluster health for all indexes in the cluster: The following example request retrieves cluster health for all indexes in the cluster:
```json ```json
GET _cluster/health GET _cluster/health
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The response contains cluster health information: The response contains cluster health information:

View File

@ -31,14 +31,14 @@ include_defaults (GET only) | Boolean | Whether to include default settings as p
cluster_manager_timeout | Time unit | The amount of time to wait for a response from the cluster manager node. Default is `30 seconds`. cluster_manager_timeout | Time unit | The amount of time to wait for a response from the cluster manager node. Default is `30 seconds`.
timeout (PUT only) | Time unit | The amount of time to wait for a response from the cluster. Default is `30 seconds`. timeout (PUT only) | Time unit | The amount of time to wait for a response from the cluster. Default is `30 seconds`.
#### Sample request #### Example request
```json ```json
GET _cluster/settings?include_defaults=true GET _cluster/settings?include_defaults=true
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
```json ```json
PUT _cluster/settings PUT _cluster/settings
@ -106,7 +106,7 @@ The following request field parameters are compatible with the cluster API.
| cluster.persistent_tasks.allocation.enable | String | Enables or disables allocation for persistent tasks: <br /> <br /> `all` Allows persistent tasks to be assigned to nodes. <br /> <br /> `none` No allocations are allowed for persistent tasks. This does not affect persistent tasks already running. <br /> <br /> Default is `all`. | | cluster.persistent_tasks.allocation.enable | String | Enables or disables allocation for persistent tasks: <br /> <br /> `all` Allows persistent tasks to be assigned to nodes. <br /> <br /> `none` No allocations are allowed for persistent tasks. This does not affect persistent tasks already running. <br /> <br /> Default is `all`. |
| cluster.persistent_tasks.allocation.recheck_interval | Time unit | The cluster manager automatically checks whether or not persistent tasks need to be assigned when the cluster state changes in a significant way. There are other factors, such as memory usage, that will affect whether or not persistent tasks are assigned to nodes but do not otherwise cause the cluster state to change. This setting defines how often assignment checks are performed in response to these factors. Default is `30 seconds`, with a minimum of `10 seconds` being required. | | cluster.persistent_tasks.allocation.recheck_interval | Time unit | The cluster manager automatically checks whether or not persistent tasks need to be assigned when the cluster state changes in a significant way. There are other factors, such as memory usage, that will affect whether or not persistent tasks are assigned to nodes but do not otherwise cause the cluster state to change. This setting defines how often assignment checks are performed in response to these factors. Default is `30 seconds`, with a minimum of `10 seconds` being required. |
#### Sample request #### Example request
For a PUT operation, the request body must contain `transient` or `persistent`, along with the setting you want to update: For a PUT operation, the request body must contain `transient` or `persistent`, along with the setting you want to update:
@ -122,7 +122,7 @@ PUT _cluster/settings
For more information about transient settings, persistent settings, and precedence, see [OpenSearch configuration]({{site.url}}{{site.baseurl}}/install-and-configure/configuration/). For more information about transient settings, persistent settings, and precedence, see [OpenSearch configuration]({{site.url}}{{site.baseurl}}/install-and-configure/configuration/).
#### Sample response #### Example response
```json ```json
{ {

View File

@ -35,9 +35,9 @@ All query parameters are optional.
| query | Boolean | If `true`, clears the query cache. Defaults to `true`. | | query | Boolean | If `true`, clears the query cache. Defaults to `true`. |
| request | Boolean | If `true`, clears the request cache. Defaults to `true`. | | request | Boolean | If `true`, clears the request cache. Defaults to `true`. |
#### Sample requests #### Example requests
The following sample requests show multiple clear cache API uses. The following example requests show multiple clear cache API uses.
##### Clear a specific cache ##### Clear a specific cache
@ -93,7 +93,7 @@ POST /_cache/clear
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The `POST /books,hockey/_cache/clear` request returns the following fields: The `POST /books,hockey/_cache/clear` request returns the following fields:

View File

@ -49,7 +49,7 @@ master_timeout | Time units | The amount of time to wait for the connection to t
## Examples ## Examples
The following are sample requests and a sample response. The following are example requests and a example response.
#### Sample list #### Sample list
@ -71,7 +71,7 @@ POST /_dangling/msdjernajxAT23RT-BupMB?accept_data_loss=true
DELETE /_dangling/msdjernajxAT23RT-BupMB?accept_data_loss=true DELETE /_dangling/msdjernajxAT23RT-BupMB?accept_data_loss=true
```` ````
#### Sample response body #### Example response body
````json ````json
{ {

View File

@ -9,7 +9,7 @@ redirect_from:
# REST API reference # REST API reference
OpenSearch uses its REST API for most operations. This _incomplete_ section includes REST API paths, HTTP verbs, supported parameters, request body details, and sample responses. OpenSearch uses its REST API for most operations. This _incomplete_ section includes REST API paths, HTTP verbs, supported parameters, request body details, and example responses.
In general, the OpenSearch REST API is no different from the Elasticsearch OSS REST API; most client code that worked with Elasticsearch OSS should also work with OpenSearch. In general, the OpenSearch REST API is no different from the Elasticsearch OSS REST API; most client code that worked with Elasticsearch OSS should also work with OpenSearch.
{: .tip } {: .tip }

View File

@ -44,14 +44,14 @@ ignore_idle_threads | Boolean | Dont show threads that are in known idle st
type | String | Supported thread types are `cpu`, `wait`, or `block`. Defaults to `cpu`. type | String | Supported thread types are `cpu`, `wait`, or `block`. Defaults to `cpu`.
timeout | Time | Sets the time limit for node response. Default value is `30s`. timeout | Time | Sets the time limit for node response. Default value is `30s`.
#### Sample request #### Example request
```json ```json
GET /_nodes/hot_threads GET /_nodes/hot_threads
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
```bash ```bash
::: {opensearch}{F-ByTQzVQ3GQeYzQJArJGQ}{GxbcLdCATPWggOuQHJAoCw}{127.0.0.1}{127.0.0.1:9300}{dimr}{shard_indexing_pressure_enabled=true} ::: {opensearch}{F-ByTQzVQ3GQeYzQJArJGQ}{GxbcLdCATPWggOuQHJAoCw}{127.0.0.1}{127.0.0.1:9300}{dimr}{shard_indexing_pressure_enabled=true}

View File

@ -77,7 +77,7 @@ Parameter | Type | Description
flat_settings| Boolean | Specifies whether to return the `settings` object of the response in flat format. Default is `false`. flat_settings| Boolean | Specifies whether to return the `settings` object of the response in flat format. Default is `false`.
timeout | Time | Sets the time limit for node response. Default value is `30s`. timeout | Time | Sets the time limit for node response. Default value is `30s`.
#### Sample request #### Example request
The following query requests the `process` and `transport` metrics from the cluster manager node: The following query requests the `process` and `transport` metrics from the cluster manager node:
@ -86,7 +86,7 @@ GET /_nodes/cluster_manager:true/process,transport
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The response contains the metric groups specified in the `<metrics>` request parameter (in this case, `process` and `transport`): The response contains the metric groups specified in the `<metrics>` request parameter (in this case, `process` and `transport`):

View File

@ -34,7 +34,7 @@ The request may include an optional object containing the password for the OpenS
} }
``` ```
#### Sample request #### Example request
The following is an example API request: The following is an example API request:
@ -43,7 +43,7 @@ POST _nodes/reload_secure_settings
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The following is an example response: The following is an example response:

View File

@ -97,14 +97,14 @@ level | String | Specifies whether statistics are aggregated at the cluster, ind
timeout | Time | Sets the time limit for node response. Default is `30s`. timeout | Time | Sets the time limit for node response. Default is `30s`.
include_segment_file_sizes | Boolean | If segment statistics are requested, this field specifies to return the aggregated disk usage of every Lucene index file. Default is `false`. include_segment_file_sizes | Boolean | If segment statistics are requested, this field specifies to return the aggregated disk usage of every Lucene index file. Default is `false`.
#### Sample request #### Example request
```json ```json
GET _nodes/stats/ GET _nodes/stats/
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
```json ```json
{ {

View File

@ -36,7 +36,7 @@ Parameter | Type | Description
timeout | Time | Sets the time limit for a response from the node. Default is `30s`. timeout | Time | Sets the time limit for a response from the node. Default is `30s`.
cluster_manager_timeout | Time | Sets the time limit for a response from the cluster manager. Default is `30s`. cluster_manager_timeout | Time | Sets the time limit for a response from the cluster manager. Default is `30s`.
#### Sample request #### Example request
The following request returns usage details for all nodes: The following request returns usage details for all nodes:
@ -45,7 +45,7 @@ GET _nodes/usage
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The following is an example response: The following is an example response:

View File

@ -43,7 +43,7 @@ ignore_unlabeled | Defaults to `false`. Unlabeled documents are ignored when set
template_id | Template ID. template_id | Template ID.
params | Parameters used in the template. params | Parameters used in the template.
#### Sample request #### Example request
````json ````json
GET shakespeare/_rank_eval GET shakespeare/_rank_eval
@ -74,7 +74,7 @@ GET shakespeare/_rank_eval
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
````json ````json
{ {

View File

@ -29,14 +29,14 @@ ignore_unavailable | Boolean | If an index is closed or missing, an error is ret
The following are an example request and response. The following are an example request and response.
#### Sample request #### Example request
````json ````json
POST /shakespeare/_reload_search_analyzers POST /shakespeare/_reload_search_analyzers
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
````json ````json
{ {

View File

@ -45,7 +45,7 @@ All parameters are optional.
| lang | String | Scripting language. Required. | | lang | String | Scripting language. Required. |
| source | String or Object | Required. <br /> <br /> For scripts, a string with the contents of the script. <br /> <br /> For search templates, an object that defines the search template. Supports the same parameters as the [Search]({{site.url}}{{site.baseurl}}/api-reference/search) API request body. Search templates also support Mustache variables. | | source | String or Object | Required. <br /> <br /> For scripts, a string with the contents of the script. <br /> <br /> For search templates, an object that defines the search template. Supports the same parameters as the [Search]({{site.url}}{{site.baseurl}}/api-reference/search) API request body. Search templates also support Mustache variables. |
#### Sample request #### Example request
The sample uses an index called `books` with the following documents: The sample uses an index called `books` with the following documents:
@ -95,7 +95,7 @@ curl -XPUT "http://opensearch:9200/_scripts/my-first-script" -H 'Content-Type: a
See [Execute Painless stored script]({{site.url}}{{site.baseurl}}/api-reference/script-apis/exec-stored-script/) for information about running the script. See [Execute Painless stored script]({{site.url}}{{site.baseurl}}/api-reference/script-apis/exec-stored-script/) for information about running the script.
#### Sample response #### Example response
The `PUT _scripts/my-first-script` request returns the following field: The `PUT _scripts/my-first-script` request returns the following field:

View File

@ -24,7 +24,7 @@ Path parameters are optional.
| cluster_manager_timeout | Time | Amount of time to wait for a connection to the cluster manager. Optional, defaults to `30s`. | | cluster_manager_timeout | Time | Amount of time to wait for a connection to the cluster manager. Optional, defaults to `30s`. |
| timeout | Time | The period of time to wait for a response. If a response is not received before the timeout value, the request will be dropped. | timeout | Time | The period of time to wait for a response. If a response is not received before the timeout value, the request will be dropped.
#### Sample request #### Example request
The following request deletes the `my-first-script` script: The following request deletes the `my-first-script` script:
@ -33,7 +33,7 @@ DELETE _scripts/my-script
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The `DELETE _scripts/my-first-script` request returns the following field: The `DELETE _scripts/my-first-script` request returns the following field:

View File

@ -24,7 +24,7 @@ POST /_scripts/painless/_execute
| context | A context for the script. Optional. Default is `painless_test`. | | context | A context for the script. Optional. Default is `painless_test`. |
| context_setup | Specifies additional parameters for the context. Optional.| | context_setup | Specifies additional parameters for the context. Optional.|
#### Sample request #### Example request
The following request uses the default `painless_context` for the script: The following request uses the default `painless_context` for the script:
@ -42,7 +42,7 @@ GET /_scripts/painless/_execute
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The response contains the average of two script parameters: The response contains the average of two script parameters:
@ -65,7 +65,7 @@ Choose different contexts to control the variables that are available to the scr
### Painless test context ### Painless test context
The `painless_test` context is the default script context that provides only the `params` variable to the script. The returned result is always converted to a string. See the preceding sample request for a usage example. The `painless_test` context is the default script context that provides only the `params` variable to the script. The returned result is always converted to a string. See the preceding example request for a usage example.
### Filter context ### Filter context

View File

@ -19,7 +19,7 @@ OpenSearch provides several ways to run a script; the following sections show ho
| script_fields | Object | Fields to include in output. | | script_fields | Object | Fields to include in output. |
| script | Object | ID of the script that produces a value for a field. | | script | Object | ID of the script that produces a value for a field. |
#### Sample request #### Example request
The following request runs the stored script that was created in [Create or update stored script]({{site.url}}{{site.baseurl}}/api-reference/script-apis/create-stored-script/). The script sums the ratings for each book and displays the sum in the `total_ratings` field in the output. The following request runs the stored script that was created in [Create or update stored script]({{site.url}}{{site.baseurl}}/api-reference/script-apis/create-stored-script/). The script sums the ratings for each book and displays the sum in the `total_ratings` field in the output.
@ -46,7 +46,7 @@ GET books/_search
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The `GET books/_search` request returns the following fields: The `GET books/_search` request returns the following fields:

View File

@ -9,14 +9,14 @@ nav_order: 5
Retrieves all contexts for stored scripts. Retrieves all contexts for stored scripts.
#### Sample request #### Example request
````json ````json
GET _script_context GET _script_context
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The `GET _script_context` request returns the following fields: The `GET _script_context` request returns the following fields:

View File

@ -9,14 +9,14 @@ nav_order: 6
The get script language API operation retrieves all supported script languages and their contexts. The get script language API operation retrieves all supported script languages and their contexts.
#### Sample request #### Example request
```json ```json
GET _script_language GET _script_language
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The `GET _script_language` request returns the available contexts for each language: The `GET _script_language` request returns the available contexts for each language:

View File

@ -21,7 +21,7 @@ Retrieves a stored script.
:--- | :--- | :--- :--- | :--- | :---
| cluster_manager_timeout | Time | Amount of time to wait for a connection to the cluster manager. Optional, defaults to `30s`. | | cluster_manager_timeout | Time | Amount of time to wait for a connection to the cluster manager. Optional, defaults to `30s`. |
#### Sample request #### Example request
The following retrieves the `my-first-script` stored script. The following retrieves the `my-first-script` stored script.
@ -30,7 +30,7 @@ GET _scripts/my-first-script
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The `GET _scripts/my-first-script` request returns the following fields: The `GET _scripts/my-first-script` request returns the following fields:

View File

@ -53,7 +53,7 @@ Setting | Description
`server_side_encryption` | Whether to encrypt snapshot files in the S3 bucket. This setting uses AES-256 with S3-managed keys. See [Protecting data using server-side encryption](https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html). Default is false. Optional. `server_side_encryption` | Whether to encrypt snapshot files in the S3 bucket. This setting uses AES-256 with S3-managed keys. See [Protecting data using server-side encryption](https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html). Default is false. Optional.
`storage_class` | Specifies the [S3 storage class](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) for the snapshots files. Default is `standard`. Do not use the `glacier` and `deep_archive` storage classes. Optional. `storage_class` | Specifies the [S3 storage class](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) for the snapshots files. Default is `standard`. Do not use the `glacier` and `deep_archive` storage classes. Optional.
#### Sample request #### Example request
The following requests register or update a repository called `my-first-repo`. Both require a request body as described in [Request fields](#request-fields). The following requests register or update a repository called `my-first-repo`. Both require a request body as described in [Request fields](#request-fields).
@ -75,7 +75,7 @@ PUT _snapshot/my-opensearch-repo
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
Upon success, the following JSON object is returned: Upon success, the following JSON object is returned:

View File

@ -44,7 +44,7 @@ Field | Data type | Description
`include_global_state` | Boolean | Whether to include cluster state in the snapshot. Default is true. `include_global_state` | Boolean | Whether to include cluster state in the snapshot. Default is true.
`partial` | Boolean | Whether to allow partial snapshots. Default is false, which fails the entire snapshot if one or more shards fails to stor `partial` | Boolean | Whether to allow partial snapshots. Default is false, which fails the entire snapshot if one or more shards fails to stor
#### Sample requests #### Example requests
##### Request without a body ##### Request without a body
@ -70,7 +70,7 @@ PUT _snapshot/my-s3-repository/2
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample responses #### Example responses
Upon success, the response content depends on whether you include the `wait_for_completion` query parameter. Upon success, the response content depends on whether you include the `wait_for_completion` query parameter.

View File

@ -19,7 +19,7 @@ Parameter | Data type | Description
:--- | :--- | :--- :--- | :--- | :---
repository | String | Repository to delete. | repository | String | Repository to delete. |
#### Sample request #### Example request
The following request deletes the `my-opensearch-repo` repository: The following request deletes the `my-opensearch-repo` repository:
@ -28,7 +28,7 @@ DELETE _snapshot/my-opensearch-repo
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
Upon success, the response returns the following JSON object: Upon success, the response returns the following JSON object:

View File

@ -22,7 +22,7 @@ Parameter | Data type | Description
repository | String | Repostory that contains the snapshot. | repository | String | Repostory that contains the snapshot. |
snapshot | String | Snapshot to delete. | snapshot | String | Snapshot to delete. |
#### Sample request #### Example request
The following request deletes a snapshot called `my-first-snapshot` from the `my-opensearch-repo` repository: The following request deletes a snapshot called `my-first-snapshot` from the `my-opensearch-repo` repository:
@ -31,7 +31,7 @@ DELETE _snapshot/my-opensearch-repo/my-first-snapshot
``` ```
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
Upon success, the response returns the following JSON object: Upon success, the response returns the following JSON object:

View File

@ -27,7 +27,7 @@ You can also get details about a snapshot during and after snapshot creation. Se
| local | Boolean | Whether to get information from the local node. Optional, defaults to `false`.| | local | Boolean | Whether to get information from the local node. Optional, defaults to `false`.|
| cluster_manager_timeout | Time | Amount of time to wait for a connection to the master node. Optional, defaults to 30 seconds. | | cluster_manager_timeout | Time | Amount of time to wait for a connection to the master node. Optional, defaults to 30 seconds. |
#### Sample request #### Example request
The following request retrieves information for the `my-opensearch-repo` repository: The following request retrieves information for the `my-opensearch-repo` repository:
@ -36,7 +36,7 @@ GET /_snapshot/my-opensearch-repo
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
Upon success, the response returns repositry information. This sample is for an `s3` repository type. Upon success, the response returns repositry information. This sample is for an `s3` repository type.

View File

@ -40,7 +40,7 @@ Using the API to return state for other than currently running snapshots can be
:--- | :--- | :--- :--- | :--- | :---
| ignore_unavailable | Boolean | How to handles requests for unavailable snapshots. If `false`, the request returns an error for unavailable snapshots. If `true`, the request ignores unavailable snapshots, such as those that are corrupted or temporarily cannot be returned. Defaults to `false`.| | ignore_unavailable | Boolean | How to handles requests for unavailable snapshots. If `false`, the request returns an error for unavailable snapshots. If `true`, the request ignores unavailable snapshots, such as those that are corrupted or temporarily cannot be returned. Defaults to `false`.|
#### Sample request #### Example request
The following request returns the status of `my-first-snapshot` in the `my-opensearch-repo` repository. Unavailable snapshots are ignored. The following request returns the status of `my-first-snapshot` in the `my-opensearch-repo` repository. Unavailable snapshots are ignored.
@ -52,9 +52,9 @@ GET _snapshot/my-opensearch-repo/my-first-snapshot/_status
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
The example that follows corresponds to the request above in the [Sample request](#sample-request) section. The example that follows corresponds to the request above in the [Example request](#sample-request) section.
The `GET _snapshot/my-opensearch-repo/my-first-snapshot/_status` request returns the following fields: The `GET _snapshot/my-opensearch-repo/my-first-snapshot/_status` request returns the following fields:

View File

@ -23,7 +23,7 @@ Retrieves information about a snapshot.
| verbose | Boolean | Whether to show all, or just basic snapshot information. If `true`, returns all information. If `false`, omits information like start/end times, failures, and shards. Optional, defaults to `true`.| | verbose | Boolean | Whether to show all, or just basic snapshot information. If `true`, returns all information. If `false`, omits information like start/end times, failures, and shards. Optional, defaults to `true`.|
| ignore_unavailable | Boolean | How to handle snapshots that are unavailable (corrupted or otherwise temporarily can't be returned). If `true` and the snapshot is unavailable, the request does not return the snapshot. If `false` and the snapshot is unavailable, the request returns an error. Optional, defaults to `false`.| | ignore_unavailable | Boolean | How to handle snapshots that are unavailable (corrupted or otherwise temporarily can't be returned). If `true` and the snapshot is unavailable, the request does not return the snapshot. If `false` and the snapshot is unavailable, the request returns an error. Optional, defaults to `false`.|
#### Sample request #### Example request
The following request retrieves information for the `my-first-snapshot` located in the `my-opensearch-repo` repository: The following request retrieves information for the `my-first-snapshot` located in the `my-opensearch-repo` repository:
@ -32,7 +32,7 @@ GET _snapshot/my-opensearch-repo/my-first-snapshot
```` ````
{% include copy-curl.html %} {% include copy-curl.html %}
#### Sample response #### Example response
Upon success, the response returns snapshot information: Upon success, the response returns snapshot information:

View File

@ -53,7 +53,7 @@ All request body parameters are optional.
* Ingest pipelines * Ingest pipelines
* Index lifecycle policies * Index lifecycle policies
#### Sample request #### Example request
The following request restores the `opendistro-reports-definitions` index from `my-first-snapshot`. The `rename_pattern` and `rename_replacement` combination causes the index to be renamed to `opendistro-reports-definitions_restored` because duplicate open index names in a cluster are not allowed. The following request restores the `opendistro-reports-definitions` index from `my-first-snapshot`. The `rename_pattern` and `rename_replacement` combination causes the index to be renamed to `opendistro-reports-definitions_restored` because duplicate open index names in a cluster are not allowed.

View File

@ -30,7 +30,7 @@ Path parameters are optional.
| cluster_manager_timeout | Time | Amount of time to wait for a connection to the master node. Optional, defaults to `30s`. | | cluster_manager_timeout | Time | Amount of time to wait for a connection to the master node. Optional, defaults to `30s`. |
| timeout | Time | The period of time to wait for a response. If a response is not received before the timeout value, the request fails and returns an error. Defaults to `30s`. | | timeout | Time | The period of time to wait for a response. If a response is not received before the timeout value, the request fails and returns an error. Defaults to `30s`. |
#### Sample request #### Example request
The following request verifies that the my-opensearch-repo is functional: The following request verifies that the my-opensearch-repo is functional:
@ -38,9 +38,9 @@ The following request verifies that the my-opensearch-repo is functional:
POST /_snapshot/my-opensearch-repo/_verify?timeout=0s&cluster_manager_timeout=50s POST /_snapshot/my-opensearch-repo/_verify?timeout=0s&cluster_manager_timeout=50s
```` ````
#### Sample response #### Example response
The example that follows corresponds to the request above in the [Sample request](#sample-request) section. The example that follows corresponds to the request above in the [Example request](#sample-request) section.
The `POST /_snapshot/my-opensearch-repo/_verify?timeout=0s&cluster_manager_timeout=50s` request returns the following fields: The `POST /_snapshot/my-opensearch-repo/_verify?timeout=0s&cluster_manager_timeout=50s` request returns the following fields:

View File

@ -97,7 +97,7 @@ Then run a search:
GET opensearch_dashboards_sample_data_ecommerce/_search GET opensearch_dashboards_sample_data_ecommerce/_search
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -122,7 +122,7 @@ Options | Description | Type | Required
`dimensions.metrics.field.metrics` | Specify the metric aggregations you want to calculate for the field. | Multiple strings | No `dimensions.metrics.field.metrics` | Specify the metric aggregations you want to calculate for the field. | Multiple strings | No
#### Sample response #### Example response
```json ```json
{ {
@ -147,7 +147,7 @@ GET _plugins/_rollup/jobs/<rollup_id>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -173,7 +173,7 @@ Deletes an index rollup job based on the `rollup_id`.
DELETE _plugins/_rollup/jobs/<rollup_id> DELETE _plugins/_rollup/jobs/<rollup_id>
``` ```
#### Sample response #### Example response
```json ```json
200 OK 200 OK
@ -196,7 +196,7 @@ POST _plugins/_rollup/jobs/<rollup_id>/_stop
``` ```
#### Sample response #### Example response
```json ```json
200 OK 200 OK
@ -218,7 +218,7 @@ GET _plugins/_rollup/jobs/<rollup_id>/_explain
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -25,7 +25,7 @@ Introduced 1.0
Creates a policy. Creates a policy.
#### Sample request #### Example request
```json ```json
PUT _plugins/_ism/policies/policy_1 PUT _plugins/_ism/policies/policy_1
@ -76,7 +76,7 @@ PUT _plugins/_ism/policies/policy_1
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -144,7 +144,7 @@ Introduced 1.0
Adds a policy to an index. This operation does not change the policy if the index already has one. Adds a policy to an index. This operation does not change the policy if the index already has one.
#### Sample request #### Example request
```json ```json
POST _plugins/_ism/add/index_1 POST _plugins/_ism/add/index_1
@ -153,7 +153,7 @@ POST _plugins/_ism/add/index_1
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -178,7 +178,7 @@ Updates a policy. Use the `seq_no` and `primary_term` parameters to update an ex
It's possible that the policy currently applied to your index isn't the most up-to-date policy available. To see what policy is currently applied to your index, see [Explain index]({{site.url}}{{site.baseurl}}/im-plugin/ism/api/#explain-index). To get the most up-to-date version of a policy, see [Get policy]({{site.url}}{{site.baseurl}}/im-plugin/ism/api/#get-policy). It's possible that the policy currently applied to your index isn't the most up-to-date policy available. To see what policy is currently applied to your index, see [Explain index]({{site.url}}{{site.baseurl}}/im-plugin/ism/api/#explain-index). To get the most up-to-date version of a policy, see [Get policy]({{site.url}}{{site.baseurl}}/im-plugin/ism/api/#get-policy).
#### Sample request #### Example request
```json ```json
PUT _plugins/_ism/policies/policy_1?if_seq_no=7&if_primary_term=1 PUT _plugins/_ism/policies/policy_1?if_seq_no=7&if_primary_term=1
@ -229,7 +229,7 @@ PUT _plugins/_ism/policies/policy_1?if_seq_no=7&if_primary_term=1
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -297,14 +297,14 @@ Introduced 1.0
Gets the policy by `policy_id`. Gets the policy by `policy_id`.
#### Sample request #### Example request
```json ```json
GET _plugins/_ism/policies/policy_1 GET _plugins/_ism/policies/policy_1
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -369,14 +369,14 @@ Introduced 1.0
Removes any ISM policy from the index. Removes any ISM policy from the index.
#### Sample request #### Example request
```json ```json
POST _plugins/_ism/remove/index_1 POST _plugins/_ism/remove/index_1
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -398,7 +398,7 @@ A policy change is an asynchronous background process. The changes are queued an
In this example, the policy applied on the `index_1` index is changed to `policy_1`, which could either be a completely new policy or an updated version of its existing policy. The process only applies the change if the index is currently in the `searches` state. After this change in policy takes place, `index_1` transitions to the `delete` state. In this example, the policy applied on the `index_1` index is changed to `policy_1`, which could either be a completely new policy or an updated version of its existing policy. The process only applies the change if the index is currently in the `searches` state. After this change in policy takes place, `index_1` transitions to the `delete` state.
#### Sample request #### Example request
```json ```json
POST _plugins/_ism/change_policy/index_1 POST _plugins/_ism/change_policy/index_1
@ -414,7 +414,7 @@ POST _plugins/_ism/change_policy/index_1
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -432,7 +432,7 @@ Introduced 1.0
Retries the failed action for an index. For the retry call to succeed, ISM must manage the index, and the index must be in a failed state. You can use index patterns (`*`) to retry multiple failed indexes. Retries the failed action for an index. For the retry call to succeed, ISM must manage the index, and the index must be in a failed state. You can use index patterns (`*`) to retry multiple failed indexes.
#### Sample request #### Example request
```json ```json
POST _plugins/_ism/retry/index_1 POST _plugins/_ism/retry/index_1
@ -442,7 +442,7 @@ POST _plugins/_ism/retry/index_1
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -460,14 +460,14 @@ Introduced 1.0
Gets the current state of the index. You can use index patterns to get the status of multiple indexes. Gets the current state of the index. You can use index patterns to get the status of multiple indexes.
#### Sample request #### Example request
```json ```json
GET _plugins/_ism/explain/index_1 GET _plugins/_ism/explain/index_1
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -479,13 +479,13 @@ GET _plugins/_ism/explain/index_1
Optionally, you can add the `show_policy` parameter to your request's path to get the policy that is currently applied to your index, which is useful for seeing whether the policy applied to your index is the latest one. To get the most up-to-date policy, see [Get Policy API]({{site.url}}{{site.baseurl}}/im-plugin/ism/api/#get-policy). Optionally, you can add the `show_policy` parameter to your request's path to get the policy that is currently applied to your index, which is useful for seeing whether the policy applied to your index is the latest one. To get the most up-to-date policy, see [Get Policy API]({{site.url}}{{site.baseurl}}/im-plugin/ism/api/#get-policy).
#### Sample request #### Example request
```json ```json
GET _plugins/_ism/explain/index_1?show_policy=true GET _plugins/_ism/explain/index_1?show_policy=true
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -521,14 +521,14 @@ Introduced 1.0
Deletes the policy by `policy_id`. Deletes the policy by `policy_id`.
#### Sample request #### Example request
```json ```json
DELETE _plugins/_ism/policies/policy_1 DELETE _plugins/_ism/policies/policy_1
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -564,7 +564,7 @@ PUT _cluster/settings
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -588,7 +588,7 @@ To check an error prevention validation status and message, pass `validate_actio
GET _plugins/_ism/explain/test-000001?validate_action=true GET _plugins/_ism/explain/test-000001?validate_action=true
``` ```
#### Sample response #### Example response
The response contains an additional validate object with a validation message and status: The response contains an additional validate object with a validation message and status:
@ -650,7 +650,7 @@ Or:
GET _plugins/_ism/explain/test-000001 GET _plugins/_ism/explain/test-000001
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -14,7 +14,7 @@ The ISM Error Prevention API allows you to enable Index State Management (ISM) e
You can configure error prevention validation by setting the `plugins.index_state_management.validation_service.enabled` parameter. You can configure error prevention validation by setting the `plugins.index_state_management.validation_service.enabled` parameter.
#### Sample request #### Example request
```bash ```bash
PUT _cluster/settings PUT _cluster/settings
@ -25,7 +25,7 @@ PUT _cluster/settings
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -47,13 +47,13 @@ PUT _cluster/settings
Pass the `validate_action=true` path parameter in the Explain API URI to see the validation status and message. Pass the `validate_action=true` path parameter in the Explain API URI to see the validation status and message.
#### Sample request #### Example request
```bash ```bash
GET _plugins/_ism/explain/test-000001?validate_action=true GET _plugins/_ism/explain/test-000001?validate_action=true
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -103,7 +103,7 @@ GET _plugins/_ism/explain/test-000001?validate_action=true
If you pass the parameter without a value or false, then it doesn't return the validation status and message. Only if you pass `validate_action=true` will the response will return the validation status and message. If you pass the parameter without a value or false, then it doesn't return the validation status and message. Only if you pass `validate_action=true` will the response will return the validation status and message.
#### Sample request #### Example request
```bash ```bash
GET _plugins/_ism/explain/test-000001?validate_action=false GET _plugins/_ism/explain/test-000001?validate_action=false
@ -111,7 +111,7 @@ GET _plugins/_ism/explain/test-000001?validate_action=false
GET _plugins/_ism/explain/test-000001 GET _plugins/_ism/explain/test-000001
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -137,7 +137,7 @@ Field | Data type | Description
### Example ### Example
The following sample request uploads version `1.0.0` of an NLP sentence transformation model named `all-MiniLM-L6-v2`. The following example request uploads version `1.0.0` of an NLP sentence transformation model named `all-MiniLM-L6-v2`.
```json ```json
POST /_plugins/_ml/models/_upload POST /_plugins/_ml/models/_upload

View File

@ -68,10 +68,10 @@ Field | Data type | Description
| `framework_type` | string | The framework the model is using. Currently, we support `sentence_transformers` and `huggingface_transformers` frameworks. The `sentence_transformers` model outputs text embeddings directly, so ML Commons does not perform any post processing. For `huggingface_transformers`, ML Commons performs post processing by applying mean pooling to get text embeddings. See the example [`all-MiniLM-L6-v2` Huggingface model](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) for more details. | | `framework_type` | string | The framework the model is using. Currently, we support `sentence_transformers` and `huggingface_transformers` frameworks. The `sentence_transformers` model outputs text embeddings directly, so ML Commons does not perform any post processing. For `huggingface_transformers`, ML Commons performs post processing by applying mean pooling to get text embeddings. See the example [`all-MiniLM-L6-v2` Huggingface model](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) for more details. |
| `all_config` _(Optional)_ | string | This field is used for reference purposes. You can specify all model configurations in this field. For example, if you are using a Huggingface model, you can minify the `config.json` file to one line and save its contents in the `all_config` field. Once the model is uploaded, you can use the get model API operation to get all model configurations stored in this field. | | `all_config` _(Optional)_ | string | This field is used for reference purposes. You can specify all model configurations in this field. For example, if you are using a Huggingface model, you can minify the `config.json` file to one line and save its contents in the `all_config` field. Once the model is uploaded, you can use the get model API operation to get all model configurations stored in this field. |
#### Sample request #### Example request
The following sample request uploads version `1.0.0` of a natural language processing (NLP) sentence transformation model named `all-MiniLM-L6-v2`: The following example request uploads version `1.0.0` of a natural language processing (NLP) sentence transformation model named `all-MiniLM-L6-v2`:
```json ```json
POST /_plugins/_ml/models/_upload POST /_plugins/_ml/models/_upload
@ -89,7 +89,7 @@ POST /_plugins/_ml/models/_upload
} }
``` ```
#### Sample response #### Example response
OpenSearch responds with the `task_id` and task `status`: OpenSearch responds with the `task_id` and task `status`:
@ -148,7 +148,7 @@ POST /_plugins/_ml/models/<model_id>/_load
By default, the ML Commons setting `plugins.ml_commons.only_run_on_ml_node` is set to `false`. When `false`, models load on ML nodes first. If no ML nodes exist, models load on data nodes. When running ML models in production, set `plugins.ml_commons.only_run_on_ml_node` to `true` so that models only load on ML nodes. By default, the ML Commons setting `plugins.ml_commons.only_run_on_ml_node` is set to `false`. When `false`, models load on ML nodes first. If no ML nodes exist, models load on data nodes. When running ML models in production, set `plugins.ml_commons.only_run_on_ml_node` to `true` so that models only load on ML nodes.
#### Sample request: Load into any available ML node #### Example request: Load into any available ML node
In this example request, OpenSearch loads the model into all available OpenSearch node: In this example request, OpenSearch loads the model into all available OpenSearch node:
@ -157,7 +157,7 @@ In this example request, OpenSearch loads the model into all available OpenSearc
POST /_plugins/_ml/models/WWQI44MBbzI2oUKAvNUt/_load POST /_plugins/_ml/models/WWQI44MBbzI2oUKAvNUt/_load
``` ```
#### Sample request: Load into a specific node #### Example request: Load into a specific node
If you want to reserve the memory of other ML nodes within your cluster, you can load your model into a specific node(s) by specifying each node's ID in the request body: If you want to reserve the memory of other ML nodes within your cluster, you can load your model into a specific node(s) by specifying each node's ID in the request body:
@ -170,7 +170,7 @@ POST /_plugins/_ml/models/WWQI44MBbzI2oUKAvNUt/_load
``` ```
#### Sample response #### Example response
All models load asynchronously. Therefore, the load API responds with a new `task_id` based on the load and responds with a new `status` for the task. All models load asynchronously. Therefore, the load API responds with a new `task_id` based on the load and responds with a new `status` for the task.
@ -187,14 +187,14 @@ All models load asynchronously. Therefore, the load API responds with a new `tas
With your `task_id` from the load response, you can use the `GET _ml/tasks` API to see the load status of your model. Before a loaded model can be used for inferences, the load task's `state` must be `COMPLETED`. With your `task_id` from the load response, you can use the `GET _ml/tasks` API to see the load status of your model. Before a loaded model can be used for inferences, the load task's `state` must be `COMPLETED`.
#### Sample request #### Example request
```json ```json
GET /_plugins/_ml/tasks/hA8P44MBhyWuIwnfvTKP GET /_plugins/_ml/tasks/hA8P44MBhyWuIwnfvTKP
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -219,7 +219,7 @@ POST /_plugins/_ml/models/<model_id>/_predict
``` ```
### Sample request ### Example request
```json ```json
@ -231,7 +231,7 @@ POST /_plugins/_ml/_predict/text_embedding/WWQI44MBbzI2oUKAvNUt
} }
``` ```
### Sample response ### Example response
```json ```json
@ -267,14 +267,14 @@ If you're done making predictions with your model, use the unload operation to r
POST /_plugins/_ml/models/<model_id>/_unload POST /_plugins/_ml/models/<model_id>/_unload
``` ```
### Sample request ### Example request
```json ```json
POST /_plugins/_ml/models/MGqJhYMBbbh0ushjm8p_/_unload POST /_plugins/_ml/models/MGqJhYMBbbh0ushjm8p_/_unload
``` ```
### Sample response ### Example response
```json ```json

View File

@ -26,14 +26,14 @@ Note the use of port 9600. Provide parameters for metrics, aggregations, dimensi
For a full list of metrics, see [Metrics reference]({{site.url}}{{site.baseurl}}/monitoring-plugins/pa/reference/). Performance Analyzer updates its data every five seconds. If you create a custom client, we recommend using that same interval for calls to the API. For a full list of metrics, see [Metrics reference]({{site.url}}{{site.baseurl}}/monitoring-plugins/pa/reference/). Performance Analyzer updates its data every five seconds. If you create a custom client, we recommend using that same interval for calls to the API.
#### Sample request #### Example request
``` ```
GET localhost:9600/_plugins/_performanceanalyzer/metrics?metrics=Latency,CPU_Utilization&agg=avg,max&dim=ShardID&nodes=all GET localhost:9600/_plugins/_performanceanalyzer/metrics?metrics=Latency,CPU_Utilization&agg=avg,max&dim=ShardID&nodes=all
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -105,14 +105,14 @@ In this case, each top-level object represents a node. The API returns names and
Performance Analyzer has one additional URI that returns the unit for each metric. Performance Analyzer has one additional URI that returns the unit for each metric.
#### Sample request #### Example request
``` ```
GET localhost:9600/_plugins/_performanceanalyzer/metrics/units GET localhost:9600/_plugins/_performanceanalyzer/metrics/units
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -10,7 +10,7 @@ redirect_from:
# RCA API # RCA API
## Sample request ## Example request
``` ```
# Request all available RCAs # Request all available RCAs
@ -21,7 +21,7 @@ GET localhost:9600/_plugins/_performanceanalyzer/rca?name=HighHeapUsageClusterRc
``` ```
## Sample response ## Example response
```json ```json
{ {

View File

@ -83,7 +83,7 @@ POST _plugins/_anomaly_detection/detectors
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -222,7 +222,7 @@ POST _plugins/_anomaly_detection/detectors
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -419,7 +419,7 @@ POST _plugins/_anomaly_detection/detectors/_validate/detector
If the validate detector API doesnt find any issue in the detector configuration, it returns an empty response: If the validate detector API doesnt find any issue in the detector configuration, it returns an empty response:
#### Sample response #### Example response
```json ```json
{} {}
@ -427,7 +427,7 @@ If the validate detector API doesnt find any issue in the detector configurat
If the validate detector API finds an issue, it returns a message explaining what's wrong with the configuration. In this example, the feature query aggregates over a field that doesnt exist in the data source: If the validate detector API finds an issue, it returns a message explaining what's wrong with the configuration. In this example, the feature query aggregates over a field that doesnt exist in the data source:
#### Sample response #### Example response
```json ```json
{ {
@ -544,7 +544,7 @@ Returns all information about a detector based on the `detector_id`.
GET _plugins/_anomaly_detection/detectors/<detectorId> GET _plugins/_anomaly_detection/detectors/<detectorId>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -641,7 +641,7 @@ Use `job=true` to get real-time analysis task information.
GET _plugins/_anomaly_detection/detectors/<detectorId>?job=true GET _plugins/_anomaly_detection/detectors/<detectorId>?job=true
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -761,7 +761,7 @@ Use `task=true` to get information for both real-time and historical analysis ta
GET _plugins/_anomaly_detection/detectors/<detectorId>?task=true GET _plugins/_anomaly_detection/detectors/<detectorId>?task=true
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1104,7 +1104,7 @@ PUT _plugins/_anomaly_detection/detectors/<detectorId>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1199,7 +1199,7 @@ To delete a detector, you need to first stop both real-time detection and histor
DELETE _plugins/_anomaly_detection/detectors/<detectorId> DELETE _plugins/_anomaly_detection/detectors/<detectorId>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1286,7 +1286,7 @@ POST _plugins/_anomaly_detection/detectors/_preview
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1430,7 +1430,7 @@ POST _plugins/_anomaly_detection/detectors/_preview
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1541,7 +1541,7 @@ POST _opendistro/_anomaly_detection/detectors/VEHKTXwBwf_U8gjUXY2s/_preview
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1663,7 +1663,7 @@ To start a real-time detector job:
POST _plugins/_anomaly_detection/detectors/<detectorId>/_start POST _plugins/_anomaly_detection/detectors/<detectorId>/_start
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1686,7 +1686,7 @@ POST _plugins/_anomaly_detection/detectors/<detectorId>/_start
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1715,7 +1715,7 @@ To stop a real-time detector job:
POST _plugins/_anomaly_detection/detectors/<detectorId>/_stop POST _plugins/_anomaly_detection/detectors/<detectorId>/_stop
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1735,7 +1735,7 @@ Introduced 1.1
POST _plugins/_anomaly_detection/detectors/<detectorId>/_stop?historical=true POST _plugins/_anomaly_detection/detectors/<detectorId>/_stop?historical=true
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1772,7 +1772,7 @@ POST _plugins/_anomaly_detection/detectors/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1903,7 +1903,7 @@ POST _plugins/_anomaly_detection/detectors/tasks/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -2128,7 +2128,7 @@ POST _plugins/_anomaly_detection/detectors/tasks/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -2241,7 +2241,7 @@ Real-time detection doesn't persist the task ID in the anomaly result, so the ta
For information about the response body fields, see [Anomaly result mapping]({{site.url}}{{site.baseurl}}/monitoring-plugins/ad/result-mapping/#response-body-fields). For information about the response body fields, see [Anomaly result mapping]({{site.url}}{{site.baseurl}}/monitoring-plugins/ad/result-mapping/#response-body-fields).
#### Sample response #### Example response
```json ```json
{ {
@ -2366,7 +2366,7 @@ POST _plugins/_anomaly_detection/detectors/results/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -2463,7 +2463,7 @@ GET _plugins/_anomaly_detection/detectors/<detectorId>/results/_topAnomalies?his
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -2520,7 +2520,7 @@ To get all stats:
GET _plugins/_anomaly_detection/stats GET _plugins/_anomaly_detection/stats
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -2644,7 +2644,7 @@ For example, to get the `ad_execute_request_count` value for node `SWD7ihu9TaaW1
GET _plugins/_anomaly_detection/SWD7ihu9TaaW1zKwFZNVNg/stats/ad_execute_request_count GET _plugins/_anomaly_detection/SWD7ihu9TaaW1zKwFZNVNg/stats/ad_execute_request_count
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -2670,7 +2670,7 @@ For example:
GET _plugins/_anomaly_detection/stats/ad_executing_batch_task_count GET _plugins/_anomaly_detection/stats/ad_executing_batch_task_count
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -2900,7 +2900,7 @@ You can use this data to estimate how much memory is required for anomaly detect
For a single-entity detector: For a single-entity detector:
#### Sample response #### Example response
```json ```json
{ {
@ -3257,7 +3257,7 @@ DELETE _plugins/_anomaly_detection/detectors/results
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -3389,7 +3389,7 @@ POST _plugins/_alerting/monitors
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -103,7 +103,7 @@ If you use a custom webhook for your destination and need to embed JSON in the m
Optionally, to specify a backend role, you can add the `rbac_roles` parameter and backend role names to the bottom of your create monitor request. Optionally, to specify a backend role, you can add the `rbac_roles` parameter and backend role names to the bottom of your create monitor request.
#### Sample request #### Example request
The following request creates a query-level monitor and provides two backend roles, `role1` and `role2`. The section at the bottom of the request shows the line that specifies the roles with this syntax: `"rbac_roles": ["role1", "role2"]`. The following request creates a query-level monitor and provides two backend roles, `role1` and `role2`. The section at the bottom of the request shows the line that specifies the roles with this syntax: `"rbac_roles": ["role1", "role2"]`.
@ -173,7 +173,7 @@ POST _plugins/_alerting/monitors
To learn more about using backend roles to limit access, see [(Advanced) Limit access by backend role]({{site.url}}{{site.baseurl}}/monitoring-plugins/alerting/security/#advanced-limit-access-by-backend-role). To learn more about using backend roles to limit access, see [(Advanced) Limit access by backend role]({{site.url}}{{site.baseurl}}/monitoring-plugins/alerting/security/#advanced-limit-access-by-backend-role).
#### Sample response #### Example response
```json ```json
{ {
@ -443,7 +443,7 @@ POST _plugins/_alerting/monitors
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
"_id" : "Dfxr63sBwex6DxEhHV5N", "_id" : "Dfxr63sBwex6DxEhHV5N",
@ -732,7 +732,7 @@ If you run a document-level query while the index is getting reindexed, the API
Introduced 1.0 Introduced 1.0
{: .label .label-purple } {: .label .label-purple }
When updating a monitor, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing monitor or the monitor doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the sample response). When updating a monitor, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing monitor or the monitor doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).
#### Request #### Request
@ -842,7 +842,7 @@ PUT _plugins/_alerting/monitors/<monitor_id>?if_seq_no=3&if_primary_term=1
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -916,7 +916,7 @@ Introduced 1.0
GET _plugins/_alerting/monitors/<monitor_id> GET _plugins/_alerting/monitors/<monitor_id>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -995,7 +995,7 @@ GET _plugins/_alerting/<node-id>/stats
GET _plugins/_alerting/<node-id>/stats/<metric> GET _plugins/_alerting/<node-id>/stats/<metric>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1181,7 +1181,7 @@ Introduced 1.0
DELETE _plugins/_alerting/monitors/<monitor_id> DELETE _plugins/_alerting/monitors/<monitor_id>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1220,7 +1220,7 @@ GET _plugins/_alerting/monitors/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1315,7 +1315,7 @@ You can add the optional `?dryrun=true` parameter to the URL to show the results
POST _plugins/_alerting/monitors/<monitor_id>/_execute POST _plugins/_alerting/monitors/<monitor_id>/_execute
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1422,7 +1422,7 @@ POST _plugins/_alerting/monitors/<monitor-id>/_acknowledge/alerts
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1491,7 +1491,7 @@ POST _plugins/_alerting/destinations
// The email_account_id and email_group_id will be the document IDs of the email_account and email_group you have created. // The email_account_id and email_group_id will be the document IDs of the email_account and email_group you have created.
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1517,7 +1517,7 @@ POST _plugins/_alerting/destinations
Introduced 1.0 Introduced 1.0
{: .label .label-purple } {: .label .label-purple }
When updating a destination, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing destination or the destination doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the sample response). When updating a destination, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing destination or the destination doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).
#### Request #### Request
@ -1541,7 +1541,7 @@ PUT _plugins/_alerting/destinations/<destination-id>?if_seq_no=3&if_primary_term
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1575,7 +1575,7 @@ Retrieve one destination.
GET _plugins/_alerting/destinations/<destination-id> GET _plugins/_alerting/destinations/<destination-id>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1622,7 +1622,7 @@ Retrieve all destinations.
GET _plugins/_alerting/destinations GET _plugins/_alerting/destinations
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1667,7 +1667,7 @@ Introduced 1.0
DELETE _plugins/_alerting/destinations/<destination-id> DELETE _plugins/_alerting/destinations/<destination-id>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1704,7 +1704,7 @@ POST _plugins/_alerting/destinations/email_accounts
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
"_id" : "email_account_id", "_id" : "email_account_id",
@ -1726,7 +1726,7 @@ POST _plugins/_alerting/destinations/email_accounts
Introduced 1.0 Introduced 1.0
{: .label .label-purple } {: .label .label-purple }
When updating an email account, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing email account or the email account doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the sample response). When updating an email account, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing email account or the email account doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).
#### Request #### Request
```json ```json
@ -1748,7 +1748,7 @@ PUT _plugins/_alerting/destinations/email_accounts/<email_account_id>?if_seq_no=
"method": "ssl" "method": "ssl"
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
"_id" : "email_account_id", "_id" : "email_account_id",
@ -1781,7 +1781,7 @@ GET _plugins/_alerting/destinations/email_accounts/<email_account_id>
"method": "ssl" "method": "ssl"
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
"_id" : "email_account_id", "_id" : "email_account_id",
@ -1807,7 +1807,7 @@ Introduced 1.0
``` ```
DELETE _plugins/_alerting/destinations/email_accounts/<email_account_id> DELETE _plugins/_alerting/destinations/email_accounts/<email_account_id>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1849,7 +1849,7 @@ POST _plugins/_alerting/destinations/email_accounts/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1911,7 +1911,7 @@ POST _plugins/_alerting/destinations/email_groups
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1935,7 +1935,7 @@ POST _plugins/_alerting/destinations/email_groups
Introduced 1.0 Introduced 1.0
{: .label .label-purple } {: .label .label-purple }
When updating an email group, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing email group or the email group doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the sample response). When updating an email group, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing email group or the email group doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).
#### Request #### Request
@ -1956,7 +1956,7 @@ PUT _plugins/_alerting/destinations/email_groups/<email_group_id>?if_seq_no=16&i
}] }]
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1990,7 +1990,7 @@ GET _plugins/_alerting/destinations/email_groups/<email_group_id>
}] }]
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -2018,7 +2018,7 @@ Introduced 1.0
``` ```
DELETE _plugins/_alerting/destinations/email_groups/<email_group_id> DELETE _plugins/_alerting/destinations/email_groups/<email_group_id>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -2060,7 +2060,7 @@ POST _plugins/_alerting/destinations/email_groups/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -86,7 +86,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -121,7 +121,7 @@ GET /my_index/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -319,7 +319,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -373,7 +373,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -429,7 +429,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -499,7 +499,7 @@ GET shakespeare/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
"aggregations" : { "aggregations" : {
@ -622,7 +622,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -716,7 +716,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -783,7 +783,7 @@ GET opensearch_dashboards_sample_data_logs/_search
The response includes the `from` key values and excludes the `to` key values: The response includes the `from` key values and excludes the `to` key values:
#### Sample response #### Example response
```json ```json
... ...
@ -838,7 +838,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -885,7 +885,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -955,7 +955,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -1008,7 +1008,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -1071,7 +1071,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -1196,7 +1196,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -1259,7 +1259,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -1335,7 +1335,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1467,7 +1467,7 @@ GET logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -1522,7 +1522,7 @@ GET logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...

View File

@ -12,7 +12,7 @@ OpenSearch supports the following parameters for all REST operations:
To convert output units to human-readable values (for example, `1h` for 1 hour and `1kb` for 1,024 bytes), add `?human=true` to the request URL. To convert output units to human-readable values (for example, `1h` for 1 hour and `1kb` for 1,024 bytes), add `?human=true` to the request URL.
### Sample request ### Example request
The following request requires response values to be in human-readable format: The following request requires response values to be in human-readable format:
@ -25,7 +25,7 @@ GET <index_name>/_search?human=true
To get back JSON responses in a readable format, add `?pretty=true` to the request URL. To get back JSON responses in a readable format, add `?pretty=true` to the request URL.
### Sample request ### Example request
The following request requires the response to be displayed in pretty JSON format: The following request requires the response to be displayed in pretty JSON format:
@ -38,7 +38,7 @@ GET <index_name>/_search?pretty=true
To specify the type of content in the request body, use the `Content-Type` key name in the request header. Most operations support JSON, YAML, and CBOR formats. To specify the type of content in the request body, use the `Content-Type` key name in the request header. Most operations support JSON, YAML, and CBOR formats.
### Sample request ### Example request
The following request specifies JSON format for the request body: The following request specifies JSON format for the request body:
@ -52,7 +52,7 @@ curl -H "Content-type: application/json" -XGET localhost:9200/_scripts/<template
If the client library does not accept a request body for non-POST requests, use the `source` query string parameter to pass the request body. Also, specify the `source_content_type` parameter with a supported media type such as `application/json`. If the client library does not accept a request body for non-POST requests, use the `source` query string parameter to pass the request body. Also, specify the `source_content_type` parameter with a supported media type such as `application/json`.
### Sample request ### Example request
The following request searches the documents in the `shakespeare` index for a specific field and value: The following request searches the documents in the `shakespeare` index for a specific field and value:
@ -65,7 +65,7 @@ GET shakespeare/search?source={"query":{"exists":{"field":"speaker"}}}&source_co
To include the error stack trace in the response when an exception is raised, add `error_trace=true` to the request URL. To include the error stack trace in the response when an exception is raised, add `error_trace=true` to the request URL.
### Sample request ### Example request
The following request sets `error_trace` to `true` so that the response returns exception-triggered errors: The following request sets `error_trace` to `true` so that the response returns exception-triggered errors:
@ -78,7 +78,7 @@ GET <index_name>/_search?error_trace=true
To reduce the response size use the `filter_path` parameter to filter the fields that are returned. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field's name. You can also exclude fields with `-`. To reduce the response size use the `filter_path` parameter to filter the fields that are returned. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field's name. You can also exclude fields with `-`.
### Sample request ### Example request
The following request specifies filters to limit the fields returned in the response: The following request specifies filters to limit the fields returned in the response:

View File

@ -85,7 +85,7 @@ To see information about a specific data stream:
GET _data_stream/logs-nginx GET _data_stream/logs-nginx
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -117,7 +117,7 @@ To see more insights about the data stream, use the `_stats` endpoint:
GET _data_stream/logs-nginx/_stats GET _data_stream/logs-nginx/_stats
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -174,7 +174,7 @@ GET logs-redis/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -218,7 +218,7 @@ To perform manual rollover operation on the data stream:
POST logs-redis/_rollover POST logs-redis/_rollover
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -132,7 +132,7 @@ To list the mapping of aliases to indexes, run the following command:
GET _cat/aliases?v GET _cat/aliases?v
``` ```
#### Sample response #### Example response
```json ```json
alias index filter routing.index routing.search alias index filter routing.index routing.search
@ -145,7 +145,7 @@ To check which indexes an alias points to, run the following command:
GET _alias/alias1 GET _alias/alias1
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -221,7 +221,7 @@ POST movies/_update/2
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -281,7 +281,7 @@ PUT logs-2020-01-01
GET logs-2020-01-01 GET logs-2020-01-01
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -76,7 +76,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -128,7 +128,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -160,7 +160,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -258,7 +258,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -338,7 +338,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -378,7 +378,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -413,7 +413,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
"aggregations" : { "aggregations" : {
@ -459,7 +459,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...

View File

@ -66,7 +66,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -149,7 +149,7 @@ POST opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -224,7 +224,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -241,7 +241,7 @@ GET opensearch_dashboards_sample_data_logs/_search
The `extended_stats` aggregation is an extended version of the `stats` aggregation. Apart from including basic stats, `extended_stats` also provides stats such as `sum_of_squares`, `variance`, and `std_deviation`. The `extended_stats` aggregation is an extended version of the `stats` aggregation. Apart from including basic stats, `extended_stats` also provides stats such as `sum_of_squares`, `variance`, and `std_deviation`.
#### Sample response #### Example response
```json ```json
"stats_monthly_visits" : { "stats_monthly_visits" : {
@ -343,7 +343,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
"aggregations" : { "aggregations" : {
@ -439,7 +439,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
"aggregations" : { "aggregations" : {
@ -529,7 +529,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
"aggregations" : { "aggregations" : {
@ -602,7 +602,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -687,7 +687,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -767,7 +767,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -866,7 +866,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -942,7 +942,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
"aggregations" : { "aggregations" : {
@ -1060,7 +1060,7 @@ GET opensearch_dashboards_sample_data_logs/_search
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -1137,7 +1137,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...
@ -1220,7 +1220,7 @@ GET opensearch_dashboards_sample_data_logs/_search
} }
``` ```
#### Sample response #### Example response
```json ```json
... ...

View File

@ -46,13 +46,13 @@ routing | String | Specifies to route search requests to a specific shard. Optio
expand_wildcards | String | The type of index that can match the wildcard pattern. Supports comma-separated values. Valid values are the following:<br>- `all`: Match any index or data stream, including hidden ones. <br>- `open`: Match open, non-hidden indexes or non-hidden data streams. <br>- `closed`: Match closed, non-hidden indexes or non-hidden data streams. <br>- `hidden`: Match hidden indexes or data streams. Must be combined with `open`, `closed` or both `open` and `closed`.<br>- `none`: No wildcard patterns are accepted.<br> Optional. Default is `open`. expand_wildcards | String | The type of index that can match the wildcard pattern. Supports comma-separated values. Valid values are the following:<br>- `all`: Match any index or data stream, including hidden ones. <br>- `open`: Match open, non-hidden indexes or non-hidden data streams. <br>- `closed`: Match closed, non-hidden indexes or non-hidden data streams. <br>- `hidden`: Match hidden indexes or data streams. Must be combined with `open`, `closed` or both `open` and `closed`.<br>- `none`: No wildcard patterns are accepted.<br> Optional. Default is `open`.
allow_partial_pit_creation | Boolean | Specifies whether to create a PIT with partial failures. Optional. Default is `true`. allow_partial_pit_creation | Boolean | Specifies whether to create a PIT with partial failures. Optional. Default is `true`.
#### Sample request #### Example request
```json ```json
POST /my-index-1/_search/point_in_time?keep_alive=100m POST /my-index-1/_search/point_in_time?keep_alive=100m
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -114,13 +114,13 @@ Returns all PITs in the OpenSearch cluster.
The List All PITs API returns only local PITs or mixed PITs (PITs created in both local and remote clusters). It does not return fully remote PITs. The List All PITs API returns only local PITs or mixed PITs (PITs created in both local and remote clusters). It does not return fully remote PITs.
#### Sample request #### Example request
```json ```json
GET /_search/point_in_time/_all GET /_search/point_in_time/_all
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -179,7 +179,7 @@ Field | Data type | Description
:--- | :--- | :--- :--- | :--- | :---
pit_id | [Base64 encoded binary]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/binary) or an array of binaries | The PIT IDs of the PITs to be deleted. Required. pit_id | [Base64 encoded binary]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/binary) or an array of binaries | The PIT IDs of the PITs to be deleted. Required.
#### Sample request: Delete PITs by ID #### Example request: Delete PITs by ID
```json ```json
DELETE /_search/point_in_time DELETE /_search/point_in_time
@ -192,7 +192,7 @@ DELETE /_search/point_in_time
} }
``` ```
#### Sample response #### Example response
For each PIT, the response contains a JSON object with a PIT ID and a `successful` field that specifies whether the deletion was successful. Partial failures are treated as failures. For each PIT, the response contains a JSON object with a PIT ID and a `successful` field that specifies whether the deletion was successful. Partial failures are treated as failures.
@ -224,7 +224,7 @@ Introduced 2.4
Similarly to the [CAT Segments API]({{site.url}}{{site.baseurl}}/api-reference/cat/cat-segments), the PIT Segments API provides low-level information about the disk utilization of a PIT by describing its Lucene segments. The PIT Segments API supports listing segment information of a specific PIT by ID or of all PITs at once. Similarly to the [CAT Segments API]({{site.url}}{{site.baseurl}}/api-reference/cat/cat-segments), the PIT Segments API provides low-level information about the disk utilization of a PIT by describing its Lucene segments. The PIT Segments API supports listing segment information of a specific PIT by ID or of all PITs at once.
#### Sample request: PIT segments of all PITs #### Example request: PIT segments of all PITs
```json ```json
GET /_cat/pit_segments/_all GET /_cat/pit_segments/_all
@ -238,7 +238,7 @@ Field | Data type | Description
:--- | :--- | :--- :--- | :--- | :---
pit_id | [Base64 encoded binary]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/binary) or an array of binaries | The PIT IDs of the PITs whose segments are to be listed. Required. pit_id | [Base64 encoded binary]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/binary) or an array of binaries | The PIT IDs of the PITs whose segments are to be listed. Required.
#### Sample request: PIT segments of PITs by ID #### Example request: PIT segments of PITs by ID
```json ```json
GET /_cat/pit_segments GET /_cat/pit_segments
@ -251,7 +251,7 @@ GET /_cat/pit_segments
} }
``` ```
#### Sample response #### Example response
```json ```json
index shard prirep ip segment generation docs.count docs.deleted size size.memory committed searchable version compound index shard prirep ip segment generation docs.count docs.deleted size size.memory committed searchable version compound

View File

@ -6,7 +6,7 @@ nav_order: 96
# Popular APIs # Popular APIs
This page contains sample requests for popular OpenSearch operations. This page contains example requests for popular OpenSearch operations.
--- ---

View File

@ -31,7 +31,7 @@ Options | Description | Default value | Required
`keep_on_completion` | Whether you want to save the results in the cluster after the search is complete. You can examine the stored results at a later time. | `false` | No `keep_on_completion` | Whether you want to save the results in the cluster after the search is complete. You can examine the stored results at a later time. | `false` | No
`keep_alive` | The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query overruns this time, the process cancels this query automatically. | 12 hours | No `keep_alive` | The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query overruns this time, the process cancels this query automatically. | 12 hours | No
#### Sample request #### Example request
```json ```json
POST _plugins/_asynchronous_search/?pretty&size=10&wait_for_completion_timeout=1ms&keep_on_completion=true&request_cache=false POST _plugins/_asynchronous_search/?pretty&size=10&wait_for_completion_timeout=1ms&keep_on_completion=true&request_cache=false
@ -47,7 +47,7 @@ POST _plugins/_asynchronous_search/?pretty&size=10&wait_for_completion_timeout=1
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -122,7 +122,7 @@ After you submit an asynchronous search request, you can request partial respons
GET _plugins/_asynchronous_search/<ID>?pretty GET _plugins/_asynchronous_search/<ID>?pretty
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -203,7 +203,7 @@ DELETE _plugins/_asynchronous_search/<ID>?pretty
- If the search is complete, OpenSearch deletes the saved results. - If the search is complete, OpenSearch deletes the saved results.
#### Sample response #### Example response
```json ```json
{ {
@ -221,7 +221,7 @@ You can use the stats API operation to monitor asynchronous searches that are ru
GET _plugins/_asynchronous_search/stats GET _plugins/_asynchronous_search/stats
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -72,7 +72,7 @@ To learn more about the dynamic searches you can perform with the score script p
In a Boolean query that uses post-filtering, you can join a k-NN query with a filter using a `bool` `must` query clause. In a Boolean query that uses post-filtering, you can join a k-NN query with a filter using a `bool` `must` query clause.
#### Sample request #### Example request
The following k-NN query uses a Boolean query clause to filter results: The following k-NN query uses a Boolean query clause to filter results:
@ -118,7 +118,7 @@ POST /hotels-index/_search
} }
} }
``` ```
#### Sample response #### Example response
The Boolean query filter returns the following results in the response: The Boolean query filter returns the following results in the response:
@ -291,7 +291,7 @@ Make sure to specify "hnsw" method and "lucene" engine in the `knn_vector` field
} }
``` ```
#### Sample request #### Example request
The following request creates a new index called "hotels-index": The following request creates a new index called "hotels-index":
@ -325,7 +325,7 @@ PUT /hotels-index
} }
} }
``` ```
#### Sample response #### Example response
Upon success, you should receive a "200-OK" status with the following response: Upon success, you should receive a "200-OK" status with the following response:
@ -341,7 +341,7 @@ Upon success, you should receive a "200-OK" status with the following response:
Next, add data to your index with a PUT HTTP request. Make sure that the search criteria is defined in the body of the request. Next, add data to your index with a PUT HTTP request. Make sure that the search criteria is defined in the body of the request.
#### Sample request #### Example request
The following request adds 12 hotel documents that contain criteria such as feedback ratings and whether or not parking is available: The following request adds 12 hotel documents that contain criteria such as feedback ratings and whether or not parking is available:
@ -373,7 +373,7 @@ POST /_bulk
{ "location": [5.0, 1.0], "parking" : "true", "rating" : 3 } { "location": [5.0, 1.0], "parking" : "true", "rating" : 3 }
``` ```
#### Sample response #### Example response
Upon success, you should receive a "200-OK" status with entries for each document ID added to the index. The following response is truncated to only show one document: Upon success, you should receive a "200-OK" status with entries for each document ID added to the index. The following response is truncated to only show one document:
@ -410,7 +410,7 @@ Now you can create a k-NN search that specifies filters by using query DSL Boole
To learn more about how to specify ranges with query DSL, see [Range query]({{site.url}}{{site.baseurl}}/opensearch/query-dsl/term/#range). To learn more about how to specify ranges with query DSL, see [Range query]({{site.url}}{{site.baseurl}}/opensearch/query-dsl/term/#range).
{: .note } {: .note }
#### Sample request #### Example request
The following request creates a k-NN query that only returns the top hotels rated between 8 and 10 and that provide parking. The filter criteria to indicate the range for the feedback ratings uses a `range` query and a `term` query clause to indicate "parking": The following request creates a k-NN query that only returns the top hotels rated between 8 and 10 and that provide parking. The filter criteria to indicate the range for the feedback ratings uses a `range` query and a `term` query clause to indicate "parking":
@ -523,7 +523,7 @@ The following response indicates that only three hotels met the filter criteria:
Depending on how restrictive you want your filter to be, you can add multiple query types to a single request, such as `term`, `wildcard`, `regexp`, or `range`. You can then filter out the search results with the Boolean clauses `must`, `should`, and `must_not`. Depending on how restrictive you want your filter to be, you can add multiple query types to a single request, such as `term`, `wildcard`, `regexp`, or `range`. You can then filter out the search results with the Boolean clauses `must`, `should`, and `must_not`.
#### Sample request #### Example request
The following request returns hotels that provide parking. This request illustrates multiple alternative mechanisms to obtain the parking filter criteria. It uses a regular expression for the value `true`, a term query for the key-value pair `"parking":"true"`, a wildcard for the characters that spell "true", and the `must_not` clause to eliminate hotels with "parking" set to `false`: The following request returns hotels that provide parking. This request illustrates multiple alternative mechanisms to obtain the parking filter criteria. It uses a regular expression for the value `true`, a term query for the key-value pair `"parking":"true"`, a wildcard for the characters that spell "true", and the `must_not` clause to eliminate hotels with "parking" set to `false`:
@ -583,7 +583,7 @@ POST /hotels-index/_search
} }
} }
``` ```
#### Sample response #### Example response
The following response indicates a few results for the search with filters: The following response indicates a few results for the search with filters:

View File

@ -13,7 +13,7 @@ The SQL plugin provides the `jdbc`, `csv`, `raw`, and `json` response formats th
By default, the SQL plugin returns the response in the standard JDBC format. This format is provided for the JDBC driver and clients that need both the schema and the result set to be well formatted. By default, the SQL plugin returns the response in the standard JDBC format. This format is provided for the JDBC driver and clients that need both the schema and the result set to be well formatted.
#### Sample request #### Example request
The following query does not specify the response format, so the format is set to `jdbc`: The following query does not specify the response format, so the format is set to `jdbc`:
@ -24,7 +24,7 @@ POST _plugins/_sql
} }
``` ```
#### Sample response #### Example response
In the response, the `schema` contains the field names and types, and the `datarows` field contains the result set: In the response, the `schema` contains the field names and types, and the `datarows` field contains the result set:
@ -89,7 +89,7 @@ The response contains the error message and the cause of the error:
If you set the format to `json`, the original OpenSearch response is returned in JSON format. Because this is the native response from OpenSearch, extra effort is needed to parse and interpret it. If you set the format to `json`, the original OpenSearch response is returned in JSON format. Because this is the native response from OpenSearch, extra effort is needed to parse and interpret it.
#### Sample request #### Example request
The following query sets the response format to `json`: The following query sets the response format to `json`:
@ -100,7 +100,7 @@ POST _plugins/_sql?format=json
} }
``` ```
#### Sample response #### Example response
The response is the original response from OpenSearch: The response is the original response from OpenSearch:
@ -157,7 +157,7 @@ The response is the original response from OpenSearch:
You can also specify to return results in CSV format. You can also specify to return results in CSV format.
#### Sample request #### Example request
```json ```json
POST /_plugins/_sql?format=csv POST /_plugins/_sql?format=csv
@ -166,7 +166,7 @@ POST /_plugins/_sql?format=csv
} }
``` ```
#### Sample response #### Example response
```text ```text
firstname,lastname,age firstname,lastname,age
@ -231,7 +231,7 @@ The response contains the results in the original CSV format:
You can use the raw format to pipe the results to other command line tools for post-processing. You can use the raw format to pipe the results to other command line tools for post-processing.
#### Sample request #### Example request
```json ```json
POST /_plugins/_sql?format=raw POST /_plugins/_sql?format=raw
@ -240,7 +240,7 @@ POST /_plugins/_sql?format=raw
} }
``` ```
#### Sample response #### Example response
```text ```text
Nanette|Bates|28 Nanette|Bates|28

View File

@ -40,7 +40,7 @@ query | String | The query to be executed. Required.
[filter](#filtering-results) | JSON object | The filter for the results. Optional. [filter](#filtering-results) | JSON object | The filter for the results. Optional.
[fetch_size](#paginating-results) | integer | The number of results to return in one response. Used for paginating results. Default is 1,000. Optional. Only supported for the `jdbc` response format. [fetch_size](#paginating-results) | integer | The number of results to return in one response. Used for paginating results. Default is 1,000. Optional. Only supported for the `jdbc` response format.
#### Sample request #### Example request
```json ```json
POST /_plugins/_sql POST /_plugins/_sql
@ -49,7 +49,7 @@ POST /_plugins/_sql
} }
``` ```
#### Sample response #### Example response
The response contains the schema and the results: The response contains the schema and the results:

View File

@ -20,7 +20,7 @@ POST _plugins/_sql
If a query isn't behaving the way you expect, use the `_explain` API to see the translated query, which you can then troubleshoot. For most operations, `_explain` returns OpenSearch query DSL. For `UNION`, `MINUS`, and `JOIN`, it returns something more akin to a SQL execution plan. If a query isn't behaving the way you expect, use the `_explain` API to see the translated query, which you can then troubleshoot. For most operations, `_explain` returns OpenSearch query DSL. For `UNION`, `MINUS`, and `JOIN`, it returns something more akin to a SQL execution plan.
#### Sample request #### Example request
```json ```json
POST _plugins/_sql/_explain POST _plugins/_sql/_explain
@ -30,7 +30,7 @@ POST _plugins/_sql/_explain
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -31,13 +31,13 @@ Parameter | Description
`startIndex` | The pagination indicator. Optional. `startIndex` | The pagination indicator. Optional.
`searchString` | The alert attribute you want returned in the search. Optional. `searchString` | The alert attribute you want returned in the search. Optional.
### Sample request ### Example request
```json ```json
GET /_plugins/_security_analytics/alerts?detectorType=windows GET /_plugins/_security_analytics/alerts?detectorType=windows
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -84,7 +84,7 @@ State | Description
--- ---
## Acknowledge Alerts ## Acknowledge Alerts
### Sample request ### Example request
```json ```json
POST /_plugins/_security_analytics/<detector_id>/_acknowledge/alerts POST /_plugins/_security_analytics/<detector_id>/_acknowledge/alerts
@ -92,7 +92,7 @@ POST /_plugins/_security_analytics/<detector_id>/_acknowledge/alerts
{"alerts":["4dc7f5a9-2c82-4786-81ca-433a209d5205"]} {"alerts":["4dc7f5a9-2c82-4786-81ca-433a209d5205"]}
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -137,7 +137,7 @@ POST /_plugins/_security_analytics/<detector_id>/_acknowledge/alerts
The Get findings API based on detector attributes. The Get findings API based on detector attributes.
### Sample request ### Example request
```json ```json
GET /_plugins/_security_analytics/findings/_search?*detectorType*= GET /_plugins/_security_analytics/findings/_search?*detectorType*=

View File

@ -62,7 +62,7 @@ Parameter | Type | Description
`triggers`<br>&nbsp;&nbsp;&nbsp;&nbsp;`actions`<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`throttle`<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`unit` | String | In process `triggers`<br>&nbsp;&nbsp;&nbsp;&nbsp;`actions`<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`throttle`<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`unit` | String | In process
`triggers`<br>&nbsp;&nbsp;&nbsp;&nbsp;`actions`<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`throttle`<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`value` | Integer | In process `triggers`<br>&nbsp;&nbsp;&nbsp;&nbsp;`actions`<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`throttle`<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`value` | Integer | In process
### Sample request ### Example request
```json ```json
POST _plugins/_security_analytics/detectors POST _plugins/_security_analytics/detectors
@ -136,7 +136,7 @@ POST _plugins/_security_analytics/detectors
} }
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -224,7 +224,7 @@ The Update detector API is used for updating a detector.
PUT /_plugins/_security_analytics/detectors/<detector_Id> PUT /_plugins/_security_analytics/detectors/<detector_Id>
``` ```
### Sample request ### Example request
```json ```json
PUT /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR PUT /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
@ -270,7 +270,7 @@ PUT /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
} }
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -313,7 +313,7 @@ PUT /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
This API is used for deleting a detector. This API is used for deleting a detector.
### Sample request ### Example request
```json ```json
DELETE /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR DELETE /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
@ -324,13 +324,13 @@ DELETE /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
The Get detector API retrieves the detector details. The Get detector API retrieves the detector details.
### Sample request ### Example request
```json ```json
GET /_plugins/_security_analytics/detectors/MFRg1IMByX0LvTiGHtcN GET /_plugins/_security_analytics/detectors/MFRg1IMByX0LvTiGHtcN
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -368,7 +368,7 @@ GET /_plugins/_security_analytics/detectors/MFRg1IMByX0LvTiGHtcN
The Search detector API searches for detector matches by detector ID. The Search detector API searches for detector matches by detector ID.
### Sample request ### Example request
```json ```json
POST /_plugins/_security_analytics/detectors/_search POST /_plugins/_security_analytics/detectors/_search
@ -383,7 +383,7 @@ Body:
} }
``` ```
### Sample response ### Example response
```json ```json
{ {

View File

@ -11,7 +11,7 @@ The following APIs can be used for a number of tasks related to mappings, from c
## Get Mappings View ## Get Mappings View
### Sample request ### Example request
```json ```json
GET /_plugins/_security_analytics/mappings/view GET /_plugins/_security_analytics/mappings/view
@ -22,7 +22,7 @@ GET /_plugins/_security_analytics/mappings/view
} }
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -66,7 +66,7 @@ GET /_plugins/_security_analytics/mappings/view
--- ---
## Create Mappings ## Create Mappings
### Sample request ### Example request
```json ```json
POST /_plugins/_security_analytics/mappings POST /_plugins/_security_analytics/mappings
@ -86,7 +86,7 @@ POST /_plugins/_security_analytics/mappings
} }
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -97,13 +97,13 @@ POST /_plugins/_security_analytics/mappings
--- ---
## Get Mappings ## Get Mappings
### Sample request ### Example request
```json ```json
GET /_plugins/_security_analytics/mappings GET /_plugins/_security_analytics/mappings
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -127,7 +127,7 @@ GET /_plugins/_security_analytics/mappings
--- ---
## Update Mappings ## Update Mappings
### Sample request ### Example request
```json ```json
PUT /_plugins/_security_analytics/mappings PUT /_plugins/_security_analytics/mappings
@ -139,7 +139,7 @@ PUT /_plugins/_security_analytics/mappings
} }
``` ```
### Sample response ### Example response
```json ```json
{ {

View File

@ -17,7 +17,7 @@ The Create custom rule API uses Sigma security rule formatting to create a custo
POST /_plugins/_security_analytics/rules?category=windows POST /_plugins/_security_analytics/rules?category=windows
``` ```
### Sample request ### Example request
```yml ```yml
Header: Header:
@ -52,7 +52,7 @@ falsepositives:
- Unknown - Unknown
``` ```
### Sample response ### Example response
**Sample 1:** **Sample 1:**
@ -120,7 +120,7 @@ falsepositives:
--- ---
## Update Custom Rule (not forced) ## Update Custom Rule (not forced)
### Sample request ### Example request
```json ```json
PUT /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI?category=windows PUT /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI?category=windows
@ -156,7 +156,7 @@ falsepositives:
- Unknown - Unknown
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -181,7 +181,7 @@ falsepositives:
--- ---
## Update Custom Rule (forced) ## Update Custom Rule (forced)
### Sample request ### Example request
```json ```json
PUT /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI?category=windows&forced=true PUT /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI?category=windows&forced=true
@ -217,7 +217,7 @@ falsepositives:
- Unknown - Unknown
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -261,7 +261,7 @@ falsepositives:
--- ---
## Search Pre-Packaged Rules ## Search Pre-Packaged Rules
### Sample request ### Example request
```json ```json
POST /_plugins/_security_analytics/rules/_search?pre_packaged=true POST /_plugins/_security_analytics/rules/_search?pre_packaged=true
@ -284,7 +284,7 @@ POST /_plugins/_security_analytics/rules/_search?pre_packaged=true
} }
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -356,7 +356,7 @@ POST /_plugins/_security_analytics/rules/_search?pre_packaged=true
--- ---
## Search Custom Rules ## Search Custom Rules
### Sample request ### Example request
```json ```json
POST /_plugins/_security_analytics/rules/_search?pre_packaged=false POST /_plugins/_security_analytics/rules/_search?pre_packaged=false
@ -381,7 +381,7 @@ Body:
} }
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -453,13 +453,13 @@ Body:
--- ---
## Delete Custom Rule (not forced) ## Delete Custom Rule (not forced)
### Sample request ### Example request
```json ```json
DELETE /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI DELETE /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI
``` ```
### Sample response ### Example response
```json ```json
{ {
@ -484,13 +484,13 @@ DELETE /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI
--- ---
## Delete Custom Rule (forced) ## Delete Custom Rule (forced)
### Sample request ### Example request
```json ```json
DELETE /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI?forced=true DELETE /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI?forced=true
``` ```
### Sample response ### Example response
```json ```json
{ {

View File

@ -106,7 +106,7 @@ Returns account details for the current user. For example, if you sign the reque
GET _plugins/_security/api/account GET _plugins/_security/api/account
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -150,7 +150,7 @@ PUT _plugins/_security/api/account
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -177,7 +177,7 @@ Retrieves one action group.
GET _plugins/_security/api/actiongroups/<action-group> GET _plugins/_security/api/actiongroups/<action-group>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -210,7 +210,7 @@ GET _plugins/_security/api/actiongroups/
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -240,7 +240,7 @@ Introduced 1.0
DELETE _plugins/_security/api/actiongroups/<action-group> DELETE _plugins/_security/api/actiongroups/<action-group>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -272,7 +272,7 @@ PUT _plugins/_security/api/actiongroups/<action-group>
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -299,7 +299,7 @@ PATCH _plugins/_security/api/actiongroups/<action-group>
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -329,7 +329,7 @@ PATCH _plugins/_security/api/actiongroups
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -357,7 +357,7 @@ GET _plugins/_security/api/internalusers/<username>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -383,7 +383,7 @@ Introduced 1.0
GET _plugins/_security/api/internalusers/ GET _plugins/_security/api/internalusers/
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -409,7 +409,7 @@ Introduced 1.0
DELETE _plugins/_security/api/internalusers/<username> DELETE _plugins/_security/api/internalusers/<username>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -442,7 +442,7 @@ PUT _plugins/_security/api/internalusers/<username>
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -475,7 +475,7 @@ PATCH _plugins/_security/api/internalusers/<username>
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -507,7 +507,7 @@ PATCH _plugins/_security/api/internalusers
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -534,7 +534,7 @@ Retrieves one role.
GET _plugins/_security/api/roles/<role> GET _plugins/_security/api/roles/<role>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -582,7 +582,7 @@ Retrieves all roles.
GET _plugins/_security/api/roles/ GET _plugins/_security/api/roles/
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -622,7 +622,7 @@ Introduced 1.0
DELETE _plugins/_security/api/roles/<role> DELETE _plugins/_security/api/roles/<role>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -669,7 +669,7 @@ PUT _plugins/_security/api/roles/<role>
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -708,7 +708,7 @@ PATCH _plugins/_security/api/roles/<role>
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -741,7 +741,7 @@ PATCH _plugins/_security/api/roles
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -767,7 +767,7 @@ Retrieves one role mapping.
GET _plugins/_security/api/rolesmapping/<role> GET _plugins/_security/api/rolesmapping/<role>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -792,7 +792,7 @@ Retrieves all role mappings.
GET _plugins/_security/api/rolesmapping GET _plugins/_security/api/rolesmapping
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -817,7 +817,7 @@ Deletes the specified role mapping.
DELETE _plugins/_security/api/rolesmapping/<role> DELETE _plugins/_security/api/rolesmapping/<role>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -844,7 +844,7 @@ PUT _plugins/_security/api/rolesmapping/<role>
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -874,7 +874,7 @@ PATCH _plugins/_security/api/rolesmapping/<role>
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -904,7 +904,7 @@ PATCH _plugins/_security/api/rolesmapping
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -930,7 +930,7 @@ Retrieves one tenant.
GET _plugins/_security/api/tenants/<tenant> GET _plugins/_security/api/tenants/<tenant>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -956,7 +956,7 @@ Retrieves all tenants.
GET _plugins/_security/api/tenants/ GET _plugins/_security/api/tenants/
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -988,7 +988,7 @@ Deletes the specified tenant.
DELETE _plugins/_security/api/tenants/<tenant> DELETE _plugins/_security/api/tenants/<tenant>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1013,7 +1013,7 @@ PUT _plugins/_security/api/tenants/<tenant>
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1040,7 +1040,7 @@ PATCH _plugins/_security/api/tenants/<tenant>
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1076,7 +1076,7 @@ PATCH _plugins/_security/api/tenants/
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1152,7 +1152,7 @@ PUT _plugins/_security/api/securityconfig/config
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1185,7 +1185,7 @@ PATCH _plugins/_security/api/securityconfig
] ]
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1217,7 +1217,7 @@ Retrieves all distinguished names in the allow list.
GET _plugins/_security/api/nodesdn GET _plugins/_security/api/nodesdn
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1237,7 +1237,7 @@ To get the distinguished names from a specific cluster's or node's allow list, i
GET _plugins/_security/api/nodesdn/<cluster-name> GET _plugins/_security/api/nodesdn/<cluster-name>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1265,7 +1265,7 @@ PUT _plugins/_security/api/nodesdn/<cluster-name>
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1285,7 +1285,7 @@ Deletes all distinguished names in the specified cluster's or node's allow list.
DELETE _plugins/_security/api/nodesdn/<cluster-name> DELETE _plugins/_security/api/nodesdn/<cluster-name>
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1311,7 +1311,7 @@ Retrieves the cluster's security certificates.
GET _plugins/_security/api/ssl/certs GET _plugins/_security/api/ssl/certs
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1350,7 +1350,7 @@ PUT _opendistro/_security/api/ssl/transport/reloadcerts
PUT _opendistro/_security/api/ssl/http/reloadcerts PUT _opendistro/_security/api/ssl/http/reloadcerts
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1375,7 +1375,7 @@ DELETE _plugins/_security/api/cache
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1403,7 +1403,7 @@ GET _plugins/_security/health
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -1470,7 +1470,7 @@ Changes to the `_readonly` property result in a 409 error, as indicated in the r
} }
``` ```
#### Sample request #### Example request
**GET** **GET**
@ -1534,7 +1534,7 @@ curl -X PATCH -k -i --cert <admin_cert file name> --key <admin_cert_key file nam
The OpenSearch Dashboards dev tool does not currently support the PATCH method. You can use [curl](https://curl.se/), [Postman](https://www.postman.com/), or another alternative process to update the configuration using this method. To follow the GitHub issue for support of the PATCH method in Dashboards, see [issue #2343](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2343). The OpenSearch Dashboards dev tool does not currently support the PATCH method. You can use [curl](https://curl.se/), [Postman](https://www.postman.com/), or another alternative process to update the configuration using this method. To follow the GitHub issue for support of the PATCH method in Dashboards, see [issue #2343](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2343).
{: .note} {: .note}
#### Sample response #### Example response
The GET call produces a response that appears similar to the following: The GET call produces a response that appears similar to the following:

View File

@ -47,7 +47,7 @@ You can now assign your certificate's common name (CN) to a role. For this step,
After deciding which role you want to map your certificate's CN to, you can use [OpenSearch Dashboards]({{site.url}}{{site.baseurl}}/security/access-control/users-roles/#map-users-to-roles), [`roles_mapping.yml`]({{site.url}}{{site.baseurl}}/security/configuration/yaml/#roles_mappingyml), or the [REST API]({{site.url}}{{site.baseurl}}/security/access-control/api/#create-role-mapping) to map your certificate's CN to the role. The following example uses the `REST API` to map the common name `CLIENT1` to the role `readall`. After deciding which role you want to map your certificate's CN to, you can use [OpenSearch Dashboards]({{site.url}}{{site.baseurl}}/security/access-control/users-roles/#map-users-to-roles), [`roles_mapping.yml`]({{site.url}}{{site.baseurl}}/security/configuration/yaml/#roles_mappingyml), or the [REST API]({{site.url}}{{site.baseurl}}/security/access-control/api/#create-role-mapping) to map your certificate's CN to the role. The following example uses the `REST API` to map the common name `CLIENT1` to the role `readall`.
**Sample request** **Example request**
```json ```json
PUT _plugins/_security/api/rolesmapping/readall PUT _plugins/_security/api/rolesmapping/readall
@ -58,7 +58,7 @@ PUT _plugins/_security/api/rolesmapping/readall
} }
``` ```
**Sample response** **Example response**
```json ```json
{ {

View File

@ -101,7 +101,7 @@ Introduced 2.4
You can use the [nodes stats API operation]({{site.url}}{{site.baseurl}}/opensearch/query-dsl/text-analyzers/#how-to-use-text-analyzers) to monitor server-side request cancellations. You can use the [nodes stats API operation]({{site.url}}{{site.baseurl}}/opensearch/query-dsl/text-analyzers/#how-to-use-text-analyzers) to monitor server-side request cancellations.
#### Sample request #### Example request
To retrieve the statistics, use the following request: To retrieve the statistics, use the following request:
@ -109,7 +109,7 @@ To retrieve the statistics, use the following request:
GET _nodes/stats/search_backpressure GET _nodes/stats/search_backpressure
``` ```
#### Sample response #### Example response
The response contains server-side request cancellation statistics: The response contains server-side request cancellation statistics:

View File

@ -27,7 +27,7 @@ GET _nodes/_local/stats/shard_indexing_pressure
If `enforced` is `true`: If `enforced` is `true`:
#### Sample response #### Example response
```json ```json
{ {
@ -134,7 +134,7 @@ If `enforced` is `true`:
If `enforced` is `false`: If `enforced` is `false`:
#### Sample response #### Example response
```json ```json
{ {
@ -247,7 +247,7 @@ To include all the shards with both active and previous write operations perform
GET _nodes/_local/stats/shard_indexing_pressure?include_all GET _nodes/_local/stats/shard_indexing_pressure?include_all
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -362,7 +362,7 @@ GET _nodes/_local/stats/shard_indexing_pressure?top
If `enforced` is `true`: If `enforced` is `true`:
#### Sample response #### Example response
```json ```json
{ {
@ -405,7 +405,7 @@ If `enforced` is `true`:
If `enforced` is `false`: If `enforced` is `false`:
#### Sample response #### Example response
```json ```json
{ {
@ -454,7 +454,7 @@ To get the shard-level breakup of rejections for every node (only includes shard
GET _nodes/stats/shard_indexing_pressure GET _nodes/stats/shard_indexing_pressure
``` ```
#### Sample response #### Example response
```json ```json
{ {

View File

@ -83,7 +83,7 @@ The following task types are supported:
- `restore-snapshot` - `restore-snapshot`
- `cluster-reroute-api` - `cluster-reroute-api`
#### Sample request #### Example request
The following request sets the throttling threshold for the `put-mapping` task type to 100: The following request sets the throttling threshold for the `put-mapping` task type to 100:

View File

@ -44,7 +44,7 @@ Options | Description | Type | Required
`leader_index` | The index on the leader cluster that you want to replicate. | `string` | Yes `leader_index` | The index on the leader cluster that you want to replicate. | `string` | Yes
`use_roles` | The roles to use for all subsequent backend replication tasks between the indexes. Specify a `leader_cluster_role` and `follower_cluster_role`. See [Map the leader and follower cluster roles]({{site.url}}{{site.baseurl}}/replication-plugin/permissions/#map-the-leader-and-follower-cluster-roles). | `string` | If security plugin is enabled `use_roles` | The roles to use for all subsequent backend replication tasks between the indexes. Specify a `leader_cluster_role` and `follower_cluster_role`. See [Map the leader and follower cluster roles]({{site.url}}{{site.baseurl}}/replication-plugin/permissions/#map-the-leader-and-follower-cluster-roles). | `string` | If security plugin is enabled
#### Sample response #### Example response
```json ```json
{ {
@ -65,7 +65,7 @@ POST /_plugins/_replication/<follower-index>/_stop
{} {}
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -88,7 +88,7 @@ POST /_plugins/_replication/<follower-index>/_pause
You can't resume replication after it's been paused for more than 12 hours. You must [stop replication]({{site.url}}{{site.baseurl}}/replication-plugin/api/#stop-replication), delete the follower index, and restart replication of the leader. You can't resume replication after it's been paused for more than 12 hours. You must [stop replication]({{site.url}}{{site.baseurl}}/replication-plugin/api/#stop-replication), delete the follower index, and restart replication of the leader.
#### Sample response #### Example response
```json ```json
{ {
@ -109,7 +109,7 @@ POST /_plugins/_replication/<follower-index>/_resume
{} {}
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -129,7 +129,7 @@ Gets the status of index replication. Possible statuses are `SYNCING`, `BOOTSTRA
GET /_plugins/_replication/<follower-index>/_status GET /_plugins/_replication/<follower-index>/_status
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -161,7 +161,7 @@ Gets information about replicated leader indexes on a specified cluster.
GET /_plugins/_replication/leader_stats GET /_plugins/_replication/leader_stats
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -208,7 +208,7 @@ Gets information about follower (syncing) indexes on a specified cluster.
GET /_plugins/_replication/follower_stats GET /_plugins/_replication/follower_stats
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -266,7 +266,7 @@ Gets information about auto-follow activity and any replication rules configured
GET /_plugins/_replication/autofollow_stats GET /_plugins/_replication/autofollow_stats
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -309,7 +309,7 @@ PUT /_plugins/_replication/<follower-index>/_update
} }
``` ```
#### Sample response #### Example response
```json ```json
{ {
@ -352,7 +352,7 @@ Options | Description | Type | Required
`pattern` | An array of index patterns to match against indexes in the specified leader cluster. Supports wildcard characters. For example, `leader-*`. | `string` | Yes `pattern` | An array of index patterns to match against indexes in the specified leader cluster. Supports wildcard characters. For example, `leader-*`. | `string` | Yes
`use_roles` | The roles to use for all subsequent backend replication tasks between the indexes. Specify a `leader_cluster_role` and `follower_cluster_role`. See [Map the leader and follower cluster roles]({{site.url}}{{site.baseurl}}/replication-plugin/permissions/#map-the-leader-and-follower-cluster-roles). | `string` | If security plugin is enabled `use_roles` | The roles to use for all subsequent backend replication tasks between the indexes. Specify a `leader_cluster_role` and `follower_cluster_role`. See [Map the leader and follower cluster roles]({{site.url}}{{site.baseurl}}/replication-plugin/permissions/#map-the-leader-and-follower-cluster-roles). | `string` | If security plugin is enabled
#### Sample response #### Example response
```json ```json
{ {
@ -385,7 +385,7 @@ Options | Description | Type | Required
`leader_alias` | The name of the cross-cluster connection. You define this alias when you [set up a cross-cluster connection]({{site.url}}{{site.baseurl}}/replication-plugin/get-started/#set-up-a-cross-cluster-connection). | `string` | Yes `leader_alias` | The name of the cross-cluster connection. You define this alias when you [set up a cross-cluster connection]({{site.url}}{{site.baseurl}}/replication-plugin/get-started/#set-up-a-cross-cluster-connection). | `string` | Yes
`name` | The name of the pattern. | `string` | Yes `name` | The name of the pattern. | `string` | Yes
#### Sample response #### Example response
```json ```json
{ {