Change sample to example (#2972)
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
This commit is contained in:
parent
ff99f21ceb
commit
3da7598c0c
|
@ -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.
|
||||
|
||||
#### Sample requests
|
||||
#### Example requests
|
||||
|
||||
[Analyze array of text strings](#analyze-array-of-text-strings)
|
||||
|
||||
|
|
|
@ -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`.
|
||||
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
|
||||
GET _cluster/health
|
||||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The response contains cluster health information:
|
||||
|
||||
|
|
|
@ -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`.
|
||||
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
|
||||
GET _cluster/settings?include_defaults=true
|
||||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
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.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:
|
||||
|
||||
|
@ -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/).
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -35,9 +35,9 @@ All query parameters are optional.
|
|||
| query | Boolean | If `true`, clears the query 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
|
||||
|
||||
|
@ -93,7 +93,7 @@ POST /_cache/clear
|
|||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The `POST /books,hockey/_cache/clear` request returns the following fields:
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ master_timeout | Time units | The amount of time to wait for the connection to t
|
|||
|
||||
## Examples
|
||||
|
||||
The following are sample requests and a sample response.
|
||||
The following are example requests and a example response.
|
||||
|
||||
#### Sample list
|
||||
|
||||
|
@ -71,7 +71,7 @@ POST /_dangling/msdjernajxAT23RT-BupMB?accept_data_loss=true
|
|||
DELETE /_dangling/msdjernajxAT23RT-BupMB?accept_data_loss=true
|
||||
````
|
||||
|
||||
#### Sample response body
|
||||
#### Example response body
|
||||
|
||||
````json
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ redirect_from:
|
|||
|
||||
# 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.
|
||||
{: .tip }
|
||||
|
|
|
@ -44,14 +44,14 @@ ignore_idle_threads | Boolean | Don’t show threads that are in known idle st
|
|||
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`.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
GET /_nodes/hot_threads
|
||||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```bash
|
||||
::: {opensearch}{F-ByTQzVQ3GQeYzQJArJGQ}{GxbcLdCATPWggOuQHJAoCw}{127.0.0.1}{127.0.0.1:9300}{dimr}{shard_indexing_pressure_enabled=true}
|
||||
|
|
|
@ -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`.
|
||||
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:
|
||||
|
||||
|
@ -86,7 +86,7 @@ GET /_nodes/cluster_manager:true/process,transport
|
|||
```
|
||||
{% 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`):
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
@ -43,7 +43,7 @@ POST _nodes/reload_secure_settings
|
|||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The following is an example response:
|
||||
|
||||
|
|
|
@ -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`.
|
||||
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
|
||||
GET _nodes/stats/
|
||||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ Parameter | Type | Description
|
|||
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`.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
The following request returns usage details for all nodes:
|
||||
|
||||
|
@ -45,7 +45,7 @@ GET _nodes/usage
|
|||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The following is an example response:
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ ignore_unlabeled | Defaults to `false`. Unlabeled documents are ignored when set
|
|||
template_id | Template ID.
|
||||
params | Parameters used in the template.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
````json
|
||||
GET shakespeare/_rank_eval
|
||||
|
@ -74,7 +74,7 @@ GET shakespeare/_rank_eval
|
|||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
````json
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
````json
|
||||
POST /shakespeare/_reload_search_analyzers
|
||||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
````json
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ All parameters are optional.
|
|||
| 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. |
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
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.
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The `PUT _scripts/my-first-script` request returns the following field:
|
||||
|
||||
|
|
|
@ -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`. |
|
||||
| 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:
|
||||
|
||||
|
@ -33,7 +33,7 @@ DELETE _scripts/my-script
|
|||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The `DELETE _scripts/my-first-script` request returns the following field:
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ POST /_scripts/painless/_execute
|
|||
| context | A context for the script. Optional. Default is `painless_test`. |
|
||||
| context_setup | Specifies additional parameters for the context. Optional.|
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
The following request uses the default `painless_context` for the script:
|
||||
|
||||
|
@ -42,7 +42,7 @@ GET /_scripts/painless/_execute
|
|||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -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 | 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.
|
||||
|
||||
|
@ -46,7 +46,7 @@ GET books/_search
|
|||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The `GET books/_search` request returns the following fields:
|
||||
|
||||
|
|
|
@ -9,14 +9,14 @@ nav_order: 5
|
|||
|
||||
Retrieves all contexts for stored scripts.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
````json
|
||||
GET _script_context
|
||||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The `GET _script_context` request returns the following fields:
|
||||
|
||||
|
|
|
@ -9,14 +9,14 @@ nav_order: 6
|
|||
|
||||
The get script language API operation retrieves all supported script languages and their contexts.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
GET _script_language
|
||||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The `GET _script_language` request returns the available contexts for each language:
|
||||
|
||||
|
|
|
@ -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`. |
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
The following retrieves the `my-first-script` stored script.
|
||||
|
||||
|
@ -30,7 +30,7 @@ GET _scripts/my-first-script
|
|||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The `GET _scripts/my-first-script` request returns the following fields:
|
||||
|
||||
|
|
|
@ -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.
|
||||
`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).
|
||||
|
||||
|
@ -75,7 +75,7 @@ PUT _snapshot/my-opensearch-repo
|
|||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
Upon success, the following JSON object is returned:
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ Field | Data type | Description
|
|||
`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
|
||||
|
||||
#### Sample requests
|
||||
#### Example requests
|
||||
|
||||
##### Request without a body
|
||||
|
||||
|
@ -70,7 +70,7 @@ PUT _snapshot/my-s3-repository/2
|
|||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample responses
|
||||
#### Example responses
|
||||
|
||||
Upon success, the response content depends on whether you include the `wait_for_completion` query parameter.
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Parameter | Data type | Description
|
|||
:--- | :--- | :---
|
||||
repository | String | Repository to delete. |
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
The following request deletes the `my-opensearch-repo` repository:
|
||||
|
||||
|
@ -28,7 +28,7 @@ DELETE _snapshot/my-opensearch-repo
|
|||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
Upon success, the response returns the following JSON object:
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Parameter | Data type | Description
|
|||
repository | String | Repostory that contains the snapshot. |
|
||||
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:
|
||||
|
||||
|
@ -31,7 +31,7 @@ DELETE _snapshot/my-opensearch-repo/my-first-snapshot
|
|||
```
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
Upon success, the response returns the following JSON object:
|
||||
|
||||
|
|
|
@ -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`.|
|
||||
| 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:
|
||||
|
||||
|
@ -36,7 +36,7 @@ GET /_snapshot/my-opensearch-repo
|
|||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
Upon success, the response returns repositry information. This sample is for an `s3` repository type.
|
||||
|
||||
|
|
|
@ -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`.|
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
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 %}
|
||||
|
||||
#### 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:
|
||||
|
||||
|
|
|
@ -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`.|
|
||||
| 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:
|
||||
|
||||
|
@ -32,7 +32,7 @@ GET _snapshot/my-opensearch-repo/my-first-snapshot
|
|||
````
|
||||
{% include copy-curl.html %}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
Upon success, the response returns snapshot information:
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ All request body parameters are optional.
|
|||
* Ingest pipelines
|
||||
* 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.
|
||||
|
||||
|
|
|
@ -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`. |
|
||||
| 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:
|
||||
|
||||
|
@ -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
|
||||
````
|
||||
|
||||
#### 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:
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ Then run a search:
|
|||
GET opensearch_dashboards_sample_data_ecommerce/_search
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -147,7 +147,7 @@ GET _plugins/_rollup/jobs/<rollup_id>
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ Deletes an index rollup job based on the `rollup_id`.
|
|||
DELETE _plugins/_rollup/jobs/<rollup_id>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
@ -196,7 +196,7 @@ POST _plugins/_rollup/jobs/<rollup_id>/_stop
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
@ -218,7 +218,7 @@ GET _plugins/_rollup/jobs/<rollup_id>/_explain
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ Introduced 1.0
|
|||
|
||||
Creates a policy.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
PUT _plugins/_ism/policies/policy_1
|
||||
|
@ -76,7 +76,7 @@ PUT _plugins/_ism/policies/policy_1
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
POST _plugins/_ism/add/index_1
|
||||
|
@ -153,7 +153,7 @@ POST _plugins/_ism/add/index_1
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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).
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
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
|
||||
{
|
||||
|
@ -297,14 +297,14 @@ Introduced 1.0
|
|||
|
||||
Gets the policy by `policy_id`.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
GET _plugins/_ism/policies/policy_1
|
||||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -369,14 +369,14 @@ Introduced 1.0
|
|||
|
||||
Removes any ISM policy from the index.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
POST _plugins/_ism/remove/index_1
|
||||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
POST _plugins/_ism/change_policy/index_1
|
||||
|
@ -414,7 +414,7 @@ POST _plugins/_ism/change_policy/index_1
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
POST _plugins/_ism/retry/index_1
|
||||
|
@ -442,7 +442,7 @@ POST _plugins/_ism/retry/index_1
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
GET _plugins/_ism/explain/index_1
|
||||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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).
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
GET _plugins/_ism/explain/index_1?show_policy=true
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -521,14 +521,14 @@ Introduced 1.0
|
|||
|
||||
Deletes the policy by `policy_id`.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
DELETE _plugins/_ism/policies/policy_1
|
||||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -564,7 +564,7 @@ PUT _cluster/settings
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The response contains an additional validate object with a validation message and status:
|
||||
|
||||
|
@ -650,7 +650,7 @@ Or:
|
|||
GET _plugins/_ism/explain/test-000001
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```bash
|
||||
PUT _cluster/settings
|
||||
|
@ -25,7 +25,7 @@ PUT _cluster/settings
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```bash
|
||||
GET _plugins/_ism/explain/test-000001?validate_action=true
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -137,7 +137,7 @@ Field | Data type | Description
|
|||
|
||||
### 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
|
||||
POST /_plugins/_ml/models/_upload
|
||||
|
|
|
@ -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. |
|
||||
| `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
|
||||
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`:
|
||||
|
@ -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.
|
||||
|
||||
|
||||
#### 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:
|
||||
|
@ -157,7 +157,7 @@ In this example request, OpenSearch loads the model into all available OpenSearc
|
|||
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:
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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`.
|
||||
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
|
||||
```json
|
||||
GET /_plugins/_ml/tasks/hA8P44MBhyWuIwnfvTKP
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -219,7 +219,7 @@ POST /_plugins/_ml/models/<model_id>/_predict
|
|||
```
|
||||
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
|
||||
```json
|
||||
|
@ -231,7 +231,7 @@ POST /_plugins/_ml/_predict/text_embedding/WWQI44MBbzI2oUKAvNUt
|
|||
}
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
|
||||
```json
|
||||
POST /_plugins/_ml/models/MGqJhYMBbbh0ushjm8p_/_unload
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
|
||||
```json
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```
|
||||
GET localhost:9600/_plugins/_performanceanalyzer/metrics?metrics=Latency,CPU_Utilization&agg=avg,max&dim=ShardID&nodes=all
|
||||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```
|
||||
GET localhost:9600/_plugins/_performanceanalyzer/metrics/units
|
||||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ redirect_from:
|
|||
|
||||
# RCA API
|
||||
|
||||
## Sample request
|
||||
## Example request
|
||||
|
||||
```
|
||||
# Request all available RCAs
|
||||
|
@ -21,7 +21,7 @@ GET localhost:9600/_plugins/_performanceanalyzer/rca?name=HighHeapUsageClusterRc
|
|||
```
|
||||
|
||||
|
||||
## Sample response
|
||||
## Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -83,7 +83,7 @@ POST _plugins/_anomaly_detection/detectors
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -222,7 +222,7 @@ POST _plugins/_anomaly_detection/detectors
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -419,7 +419,7 @@ POST _plugins/_anomaly_detection/detectors/_validate/detector
|
|||
|
||||
If the validate detector API doesn’t find any issue in the detector configuration, it returns an empty response:
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{}
|
||||
|
@ -427,7 +427,7 @@ If the validate detector API doesn’t 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 doesn’t exist in the data source:
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -544,7 +544,7 @@ Returns all information about a detector based on the `detector_id`.
|
|||
GET _plugins/_anomaly_detection/detectors/<detectorId>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -641,7 +641,7 @@ Use `job=true` to get real-time analysis task information.
|
|||
GET _plugins/_anomaly_detection/detectors/<detectorId>?job=true
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1104,7 +1104,7 @@ PUT _plugins/_anomaly_detection/detectors/<detectorId>
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1286,7 +1286,7 @@ POST _plugins/_anomaly_detection/detectors/_preview
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1430,7 +1430,7 @@ POST _plugins/_anomaly_detection/detectors/_preview
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1541,7 +1541,7 @@ POST _opendistro/_anomaly_detection/detectors/VEHKTXwBwf_U8gjUXY2s/_preview
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1663,7 +1663,7 @@ To start a real-time detector job:
|
|||
POST _plugins/_anomaly_detection/detectors/<detectorId>/_start
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1686,7 +1686,7 @@ POST _plugins/_anomaly_detection/detectors/<detectorId>/_start
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1715,7 +1715,7 @@ To stop a real-time detector job:
|
|||
POST _plugins/_anomaly_detection/detectors/<detectorId>/_stop
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1735,7 +1735,7 @@ Introduced 1.1
|
|||
POST _plugins/_anomaly_detection/detectors/<detectorId>/_stop?historical=true
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1772,7 +1772,7 @@ POST _plugins/_anomaly_detection/detectors/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1903,7 +1903,7 @@ POST _plugins/_anomaly_detection/detectors/tasks/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -2128,7 +2128,7 @@ POST _plugins/_anomaly_detection/detectors/tasks/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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).
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -2366,7 +2366,7 @@ POST _plugins/_anomaly_detection/detectors/results/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -2463,7 +2463,7 @@ GET _plugins/_anomaly_detection/detectors/<detectorId>/results/_topAnomalies?his
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -2520,7 +2520,7 @@ To get all stats:
|
|||
GET _plugins/_anomaly_detection/stats
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -2670,7 +2670,7 @@ For example:
|
|||
GET _plugins/_anomaly_detection/stats/ad_executing_batch_task_count
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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:
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -3257,7 +3257,7 @@ DELETE _plugins/_anomaly_detection/detectors/results
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -3389,7 +3389,7 @@ POST _plugins/_alerting/monitors
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
||||
#### 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"]`.
|
||||
|
||||
|
@ -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).
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -443,7 +443,7 @@ POST _plugins/_alerting/monitors
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
```json
|
||||
{
|
||||
"_id" : "Dfxr63sBwex6DxEhHV5N",
|
||||
|
@ -732,7 +732,7 @@ If you run a document-level query while the index is getting reindexed, the API
|
|||
Introduced 1.0
|
||||
{: .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
|
||||
|
||||
|
@ -842,7 +842,7 @@ PUT _plugins/_alerting/monitors/<monitor_id>?if_seq_no=3&if_primary_term=1
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -916,7 +916,7 @@ Introduced 1.0
|
|||
GET _plugins/_alerting/monitors/<monitor_id>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -995,7 +995,7 @@ GET _plugins/_alerting/<node-id>/stats
|
|||
GET _plugins/_alerting/<node-id>/stats/<metric>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1181,7 +1181,7 @@ Introduced 1.0
|
|||
DELETE _plugins/_alerting/monitors/<monitor_id>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1220,7 +1220,7 @@ GET _plugins/_alerting/monitors/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1422,7 +1422,7 @@ POST _plugins/_alerting/monitors/<monitor-id>/_acknowledge/alerts
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1517,7 +1517,7 @@ POST _plugins/_alerting/destinations
|
|||
Introduced 1.0
|
||||
{: .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
|
||||
|
||||
|
@ -1541,7 +1541,7 @@ PUT _plugins/_alerting/destinations/<destination-id>?if_seq_no=3&if_primary_term
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1575,7 +1575,7 @@ Retrieve one destination.
|
|||
GET _plugins/_alerting/destinations/<destination-id>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1622,7 +1622,7 @@ Retrieve all destinations.
|
|||
GET _plugins/_alerting/destinations
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1667,7 +1667,7 @@ Introduced 1.0
|
|||
DELETE _plugins/_alerting/destinations/<destination-id>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1704,7 +1704,7 @@ POST _plugins/_alerting/destinations/email_accounts
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
```json
|
||||
{
|
||||
"_id" : "email_account_id",
|
||||
|
@ -1726,7 +1726,7 @@ POST _plugins/_alerting/destinations/email_accounts
|
|||
Introduced 1.0
|
||||
{: .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
|
||||
```json
|
||||
|
@ -1748,7 +1748,7 @@ PUT _plugins/_alerting/destinations/email_accounts/<email_account_id>?if_seq_no=
|
|||
"method": "ssl"
|
||||
}
|
||||
```
|
||||
#### Sample response
|
||||
#### Example response
|
||||
```json
|
||||
{
|
||||
"_id" : "email_account_id",
|
||||
|
@ -1781,7 +1781,7 @@ GET _plugins/_alerting/destinations/email_accounts/<email_account_id>
|
|||
"method": "ssl"
|
||||
}
|
||||
```
|
||||
#### Sample response
|
||||
#### Example response
|
||||
```json
|
||||
{
|
||||
"_id" : "email_account_id",
|
||||
|
@ -1807,7 +1807,7 @@ Introduced 1.0
|
|||
```
|
||||
DELETE _plugins/_alerting/destinations/email_accounts/<email_account_id>
|
||||
```
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1849,7 +1849,7 @@ POST _plugins/_alerting/destinations/email_accounts/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1911,7 +1911,7 @@ POST _plugins/_alerting/destinations/email_groups
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1935,7 +1935,7 @@ POST _plugins/_alerting/destinations/email_groups
|
|||
Introduced 1.0
|
||||
{: .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
|
||||
|
||||
|
@ -1956,7 +1956,7 @@ PUT _plugins/_alerting/destinations/email_groups/<email_group_id>?if_seq_no=16&i
|
|||
}]
|
||||
}
|
||||
```
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1990,7 +1990,7 @@ GET _plugins/_alerting/destinations/email_groups/<email_group_id>
|
|||
}]
|
||||
}
|
||||
```
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -2018,7 +2018,7 @@ Introduced 1.0
|
|||
```
|
||||
DELETE _plugins/_alerting/destinations/email_groups/<email_group_id>
|
||||
```
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -2060,7 +2060,7 @@ POST _plugins/_alerting/destinations/email_groups/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -86,7 +86,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -121,7 +121,7 @@ GET /my_index/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -319,7 +319,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -373,7 +373,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -429,7 +429,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -499,7 +499,7 @@ GET shakespeare/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
"aggregations" : {
|
||||
|
@ -622,7 +622,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -716,7 +716,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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:
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -838,7 +838,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -885,7 +885,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -955,7 +955,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -1008,7 +1008,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -1071,7 +1071,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -1196,7 +1196,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -1259,7 +1259,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -1335,7 +1335,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1467,7 +1467,7 @@ GET logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -1522,7 +1522,7 @@ GET logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
|
|
@ -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.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
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.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
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.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
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`.
|
||||
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
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.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
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 `-`.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
The following request specifies filters to limit the fields returned in the response:
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ To see information about a specific data stream:
|
|||
GET _data_stream/logs-nginx
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ To see more insights about the data stream, use the `_stats` endpoint:
|
|||
GET _data_stream/logs-nginx/_stats
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ GET logs-redis/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ To perform manual rollover operation on the data stream:
|
|||
POST logs-redis/_rollover
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -132,7 +132,7 @@ To list the mapping of aliases to indexes, run the following command:
|
|||
GET _cat/aliases?v
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
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
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -221,7 +221,7 @@ POST movies/_update/2
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -281,7 +281,7 @@ PUT logs-2020-01-01
|
|||
GET logs-2020-01-01
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -76,7 +76,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -128,7 +128,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -160,7 +160,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -258,7 +258,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -338,7 +338,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -378,7 +378,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -413,7 +413,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
"aggregations" : {
|
||||
|
@ -459,7 +459,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
|
|
@ -66,7 +66,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -149,7 +149,7 @@ POST opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -224,7 +224,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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`.
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
"stats_monthly_visits" : {
|
||||
|
@ -343,7 +343,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
"aggregations" : {
|
||||
|
@ -439,7 +439,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
"aggregations" : {
|
||||
|
@ -529,7 +529,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
"aggregations" : {
|
||||
|
@ -602,7 +602,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -687,7 +687,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -767,7 +767,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -866,7 +866,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -942,7 +942,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
"aggregations" : {
|
||||
|
@ -1060,7 +1060,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -1137,7 +1137,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
@ -1220,7 +1220,7 @@ GET opensearch_dashboards_sample_data_logs/_search
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
...
|
||||
|
|
|
@ -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`.
|
||||
allow_partial_pit_creation | Boolean | Specifies whether to create a PIT with partial failures. Optional. Default is `true`.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
POST /my-index-1/_search/point_in_time?keep_alive=100m
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
GET /_search/point_in_time/_all
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
#### Sample request: Delete PITs by ID
|
||||
#### Example request: Delete PITs by ID
|
||||
|
||||
```json
|
||||
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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
#### Sample request: PIT segments of all PITs
|
||||
#### Example request: PIT segments of all PITs
|
||||
|
||||
```json
|
||||
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.
|
||||
|
||||
#### Sample request: PIT segments of PITs by ID
|
||||
#### Example request: PIT segments of PITs by ID
|
||||
|
||||
```json
|
||||
GET /_cat/pit_segments
|
||||
|
@ -251,7 +251,7 @@ GET /_cat/pit_segments
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
index shard prirep ip segment generation docs.count docs.deleted size size.memory committed searchable version compound
|
||||
|
|
|
@ -6,7 +6,7 @@ nav_order: 96
|
|||
|
||||
# Popular APIs
|
||||
|
||||
This page contains sample requests for popular OpenSearch operations.
|
||||
This page contains example requests for popular OpenSearch operations.
|
||||
|
||||
|
||||
---
|
||||
|
|
|
@ -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_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
|
||||
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
|
||||
{
|
||||
|
@ -122,7 +122,7 @@ After you submit an asynchronous search request, you can request partial respons
|
|||
GET _plugins/_asynchronous_search/<ID>?pretty
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -203,7 +203,7 @@ DELETE _plugins/_asynchronous_search/<ID>?pretty
|
|||
- If the search is complete, OpenSearch deletes the saved results.
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -221,7 +221,7 @@ You can use the stats API operation to monitor asynchronous searches that are ru
|
|||
GET _plugins/_asynchronous_search/stats
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
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:
|
||||
|
||||
|
@ -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":
|
||||
|
||||
|
@ -325,7 +325,7 @@ PUT /hotels-index
|
|||
}
|
||||
}
|
||||
```
|
||||
#### Sample response
|
||||
#### Example 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.
|
||||
|
||||
#### 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:
|
||||
|
||||
|
@ -373,7 +373,7 @@ POST /_bulk
|
|||
{ "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:
|
||||
|
||||
|
@ -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).
|
||||
{: .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":
|
||||
|
||||
|
@ -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`.
|
||||
|
||||
#### 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`:
|
||||
|
||||
|
@ -583,7 +583,7 @@ POST /hotels-index/_search
|
|||
}
|
||||
}
|
||||
```
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The following response indicates a few results for the search with filters:
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
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:
|
||||
|
||||
|
@ -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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
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:
|
||||
|
||||
|
@ -157,7 +157,7 @@ The response is the original response from OpenSearch:
|
|||
|
||||
You can also specify to return results in CSV format.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
POST /_plugins/_sql?format=csv
|
||||
|
@ -166,7 +166,7 @@ POST /_plugins/_sql?format=csv
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```text
|
||||
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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
POST /_plugins/_sql?format=raw
|
||||
|
@ -240,7 +240,7 @@ POST /_plugins/_sql?format=raw
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```text
|
||||
Nanette|Bates|28
|
||||
|
|
|
@ -40,7 +40,7 @@ query | String | The query to be executed. Required.
|
|||
[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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
POST /_plugins/_sql
|
||||
|
@ -49,7 +49,7 @@ POST /_plugins/_sql
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The response contains the schema and the results:
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
```json
|
||||
POST _plugins/_sql/_explain
|
||||
|
@ -30,7 +30,7 @@ POST _plugins/_sql/_explain
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -31,13 +31,13 @@ Parameter | Description
|
|||
`startIndex` | The pagination indicator. Optional.
|
||||
`searchString` | The alert attribute you want returned in the search. Optional.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
GET /_plugins/_security_analytics/alerts?detectorType=windows
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ State | Description
|
|||
---
|
||||
## Acknowledge Alerts
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
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"]}
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ POST /_plugins/_security_analytics/<detector_id>/_acknowledge/alerts
|
|||
|
||||
The Get findings API based on detector attributes.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
GET /_plugins/_security_analytics/findings/_search?*detectorType*=
|
||||
|
|
|
@ -62,7 +62,7 @@ Parameter | Type | Description
|
|||
`triggers`<br> `actions`<br> `throttle`<br> `unit` | String | In process
|
||||
`triggers`<br> `actions`<br> `throttle`<br> `value` | Integer | In process
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
POST _plugins/_security_analytics/detectors
|
||||
|
@ -136,7 +136,7 @@ POST _plugins/_security_analytics/detectors
|
|||
}
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -224,7 +224,7 @@ The Update detector API is used for updating a detector.
|
|||
PUT /_plugins/_security_analytics/detectors/<detector_Id>
|
||||
```
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
PUT /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
|
||||
|
@ -270,7 +270,7 @@ PUT /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
|
|||
}
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -313,7 +313,7 @@ PUT /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
|
|||
|
||||
This API is used for deleting a detector.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
DELETE /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
|
||||
|
@ -324,13 +324,13 @@ DELETE /_plugins/_security_analytics/detectors/J1RX1IMByX0LvTiGTddR
|
|||
|
||||
The Get detector API retrieves the detector details.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
GET /_plugins/_security_analytics/detectors/MFRg1IMByX0LvTiGHtcN
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -368,7 +368,7 @@ GET /_plugins/_security_analytics/detectors/MFRg1IMByX0LvTiGHtcN
|
|||
|
||||
The Search detector API searches for detector matches by detector ID.
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
POST /_plugins/_security_analytics/detectors/_search
|
||||
|
@ -383,7 +383,7 @@ Body:
|
|||
}
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ The following APIs can be used for a number of tasks related to mappings, from c
|
|||
|
||||
## Get Mappings View
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
GET /_plugins/_security_analytics/mappings/view
|
||||
|
@ -22,7 +22,7 @@ GET /_plugins/_security_analytics/mappings/view
|
|||
}
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ GET /_plugins/_security_analytics/mappings/view
|
|||
---
|
||||
## Create Mappings
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
POST /_plugins/_security_analytics/mappings
|
||||
|
@ -86,7 +86,7 @@ POST /_plugins/_security_analytics/mappings
|
|||
}
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -97,13 +97,13 @@ POST /_plugins/_security_analytics/mappings
|
|||
---
|
||||
## Get Mappings
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
GET /_plugins/_security_analytics/mappings
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -127,7 +127,7 @@ GET /_plugins/_security_analytics/mappings
|
|||
---
|
||||
## Update Mappings
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
PUT /_plugins/_security_analytics/mappings
|
||||
|
@ -139,7 +139,7 @@ PUT /_plugins/_security_analytics/mappings
|
|||
}
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```yml
|
||||
Header:
|
||||
|
@ -52,7 +52,7 @@ falsepositives:
|
|||
- Unknown
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
**Sample 1:**
|
||||
|
||||
|
@ -120,7 +120,7 @@ falsepositives:
|
|||
---
|
||||
## Update Custom Rule (not forced)
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
PUT /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI?category=windows
|
||||
|
@ -156,7 +156,7 @@ falsepositives:
|
|||
- Unknown
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ falsepositives:
|
|||
---
|
||||
## Update Custom Rule (forced)
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
PUT /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI?category=windows&forced=true
|
||||
|
@ -217,7 +217,7 @@ falsepositives:
|
|||
- Unknown
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -261,7 +261,7 @@ falsepositives:
|
|||
---
|
||||
## Search Pre-Packaged Rules
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
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
|
||||
{
|
||||
|
@ -356,7 +356,7 @@ POST /_plugins/_security_analytics/rules/_search?pre_packaged=true
|
|||
---
|
||||
## Search Custom Rules
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
POST /_plugins/_security_analytics/rules/_search?pre_packaged=false
|
||||
|
@ -381,7 +381,7 @@ Body:
|
|||
}
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -453,13 +453,13 @@ Body:
|
|||
---
|
||||
## Delete Custom Rule (not forced)
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
DELETE /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -484,13 +484,13 @@ DELETE /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI
|
|||
---
|
||||
## Delete Custom Rule (forced)
|
||||
|
||||
### Sample request
|
||||
### Example request
|
||||
|
||||
```json
|
||||
DELETE /_plugins/_security_analytics/rules/ZaFv1IMBdLpXWBiBa1XI?forced=true
|
||||
```
|
||||
|
||||
### Sample response
|
||||
### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -106,7 +106,7 @@ Returns account details for the current user. For example, if you sign the reque
|
|||
GET _plugins/_security/api/account
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ PUT _plugins/_security/api/account
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -177,7 +177,7 @@ Retrieves one action group.
|
|||
GET _plugins/_security/api/actiongroups/<action-group>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ GET _plugins/_security/api/actiongroups/
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -240,7 +240,7 @@ Introduced 1.0
|
|||
DELETE _plugins/_security/api/actiongroups/<action-group>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -272,7 +272,7 @@ PUT _plugins/_security/api/actiongroups/<action-group>
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -299,7 +299,7 @@ PATCH _plugins/_security/api/actiongroups/<action-group>
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -329,7 +329,7 @@ PATCH _plugins/_security/api/actiongroups
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -357,7 +357,7 @@ GET _plugins/_security/api/internalusers/<username>
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -383,7 +383,7 @@ Introduced 1.0
|
|||
GET _plugins/_security/api/internalusers/
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -409,7 +409,7 @@ Introduced 1.0
|
|||
DELETE _plugins/_security/api/internalusers/<username>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -442,7 +442,7 @@ PUT _plugins/_security/api/internalusers/<username>
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -475,7 +475,7 @@ PATCH _plugins/_security/api/internalusers/<username>
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -507,7 +507,7 @@ PATCH _plugins/_security/api/internalusers
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -534,7 +534,7 @@ Retrieves one role.
|
|||
GET _plugins/_security/api/roles/<role>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -582,7 +582,7 @@ Retrieves all roles.
|
|||
GET _plugins/_security/api/roles/
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -622,7 +622,7 @@ Introduced 1.0
|
|||
DELETE _plugins/_security/api/roles/<role>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -669,7 +669,7 @@ PUT _plugins/_security/api/roles/<role>
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -708,7 +708,7 @@ PATCH _plugins/_security/api/roles/<role>
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -741,7 +741,7 @@ PATCH _plugins/_security/api/roles
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -767,7 +767,7 @@ Retrieves one role mapping.
|
|||
GET _plugins/_security/api/rolesmapping/<role>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -792,7 +792,7 @@ Retrieves all role mappings.
|
|||
GET _plugins/_security/api/rolesmapping
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -817,7 +817,7 @@ Deletes the specified role mapping.
|
|||
DELETE _plugins/_security/api/rolesmapping/<role>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -844,7 +844,7 @@ PUT _plugins/_security/api/rolesmapping/<role>
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -874,7 +874,7 @@ PATCH _plugins/_security/api/rolesmapping/<role>
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -904,7 +904,7 @@ PATCH _plugins/_security/api/rolesmapping
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -930,7 +930,7 @@ Retrieves one tenant.
|
|||
GET _plugins/_security/api/tenants/<tenant>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -956,7 +956,7 @@ Retrieves all tenants.
|
|||
GET _plugins/_security/api/tenants/
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -988,7 +988,7 @@ Deletes the specified tenant.
|
|||
DELETE _plugins/_security/api/tenants/<tenant>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1013,7 +1013,7 @@ PUT _plugins/_security/api/tenants/<tenant>
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1040,7 +1040,7 @@ PATCH _plugins/_security/api/tenants/<tenant>
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1076,7 +1076,7 @@ PATCH _plugins/_security/api/tenants/
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1152,7 +1152,7 @@ PUT _plugins/_security/api/securityconfig/config
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1185,7 +1185,7 @@ PATCH _plugins/_security/api/securityconfig
|
|||
]
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1217,7 +1217,7 @@ Retrieves all distinguished names in the allow list.
|
|||
GET _plugins/_security/api/nodesdn
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1265,7 +1265,7 @@ PUT _plugins/_security/api/nodesdn/<cluster-name>
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1311,7 +1311,7 @@ Retrieves the cluster's security certificates.
|
|||
GET _plugins/_security/api/ssl/certs
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1350,7 +1350,7 @@ PUT _opendistro/_security/api/ssl/transport/reloadcerts
|
|||
PUT _opendistro/_security/api/ssl/http/reloadcerts
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1375,7 +1375,7 @@ DELETE _plugins/_security/api/cache
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1403,7 +1403,7 @@ GET _plugins/_security/health
|
|||
```
|
||||
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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**
|
||||
|
||||
|
@ -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).
|
||||
{: .note}
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The GET call produces a response that appears similar to the following:
|
||||
|
||||
|
|
|
@ -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`.
|
||||
|
||||
**Sample request**
|
||||
**Example request**
|
||||
|
||||
```json
|
||||
PUT _plugins/_security/api/rolesmapping/readall
|
||||
|
@ -58,7 +58,7 @@ PUT _plugins/_security/api/rolesmapping/readall
|
|||
}
|
||||
```
|
||||
|
||||
**Sample response**
|
||||
**Example response**
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
||||
#### Sample request
|
||||
#### Example 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
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
The response contains server-side request cancellation statistics:
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ GET _nodes/_local/stats/shard_indexing_pressure
|
|||
|
||||
If `enforced` is `true`:
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ If `enforced` is `true`:
|
|||
|
||||
If `enforced` is `false`:
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -362,7 +362,7 @@ GET _nodes/_local/stats/shard_indexing_pressure?top
|
|||
|
||||
If `enforced` is `true`:
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -405,7 +405,7 @@ If `enforced` is `true`:
|
|||
|
||||
If `enforced` is `false`:
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -83,7 +83,7 @@ The following task types are supported:
|
|||
- `restore-snapshot`
|
||||
- `cluster-reroute-api`
|
||||
|
||||
#### Sample request
|
||||
#### Example request
|
||||
|
||||
The following request sets the throttling threshold for the `put-mapping` task type to 100:
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ Options | Description | Type | Required
|
|||
`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
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ POST /_plugins/_replication/<follower-index>/_stop
|
|||
{}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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.
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ POST /_plugins/_replication/<follower-index>/_resume
|
|||
{}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -129,7 +129,7 @@ Gets the status of index replication. Possible statuses are `SYNCING`, `BOOTSTRA
|
|||
GET /_plugins/_replication/<follower-index>/_status
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -161,7 +161,7 @@ Gets information about replicated leader indexes on a specified cluster.
|
|||
GET /_plugins/_replication/leader_stats
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -208,7 +208,7 @@ Gets information about follower (syncing) indexes on a specified cluster.
|
|||
GET /_plugins/_replication/follower_stats
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -266,7 +266,7 @@ Gets information about auto-follow activity and any replication rules configured
|
|||
GET /_plugins/_replication/autofollow_stats
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -309,7 +309,7 @@ PUT /_plugins/_replication/<follower-index>/_update
|
|||
}
|
||||
```
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```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
|
||||
`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
|
||||
{
|
||||
|
@ -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
|
||||
`name` | The name of the pattern. | `string` | Yes
|
||||
|
||||
#### Sample response
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue