diff --git a/_api-reference/analyze-apis/perform-text-analysis.md b/_api-reference/analyze-apis/perform-text-analysis.md index 519166747c..73d59c62ad 100644 --- a/_api-reference/analyze-apis/perform-text-analysis.md +++ b/_api-reference/analyze-apis/perform-text-analysis.md @@ -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) diff --git a/_api-reference/cluster-api/cluster-health.md b/_api-reference/cluster-api/cluster-health.md index 6a092ee24a..fac9afa439 100644 --- a/_api-reference/cluster-api/cluster-health.md +++ b/_api-reference/cluster-api/cluster-health.md @@ -51,15 +51,15 @@ wait_for_no_relocating_shards | Boolean | Whether to wait until there are no rel wait_for_no_initializing_shards | Boolean | Whether to wait until there are no initializing shards in the cluster. Default is false. wait_for_status | Enum | Wait until the cluster health reaches the specified status or better. Supported values are `green`, `yellow`, and `red`. -#### 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 ``` -#### Sample response +#### Example response The response contains cluster health information: diff --git a/_api-reference/cluster-api/cluster-settings.md b/_api-reference/cluster-api/cluster-settings.md index 7924e63a45..5b37e8dc12 100644 --- a/_api-reference/cluster-api/cluster-settings.md +++ b/_api-reference/cluster-api/cluster-settings.md @@ -30,14 +30,14 @@ include_defaults (GET only) | Boolean | Whether to include default settings as p master_timeout | Time unit | The amount of time to wait for a response from the master 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 @@ -105,7 +105,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:

`all` – Allows persistent tasks to be assigned to nodes.

`none` – No allocations are allowed for persistent tasks. This does not affect persistent tasks already running.

Default is `all`. | | cluster.persistent_tasks.allocation.recheck_interval | Time unit | The master node 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: @@ -121,7 +121,7 @@ PUT _cluster/settings For more information about transient settings, persistent settings, and precedence, see [OpenSearch configuration]({{site.url}}{{site.baseurl}}/opensearch/configuration/). -#### Sample response +#### Example response ```json { diff --git a/_api-reference/index-apis/clear-index-cache.md b/_api-reference/index-apis/clear-index-cache.md index 1845b55758..f1973b3059 100644 --- a/_api-reference/index-apis/clear-index-cache.md +++ b/_api-reference/index-apis/clear-index-cache.md @@ -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: diff --git a/_api-reference/index-apis/dangling-index.md b/_api-reference/index-apis/dangling-index.md index 592eec7275..5703c50dea 100644 --- a/_api-reference/index-apis/dangling-index.md +++ b/_api-reference/index-apis/dangling-index.md @@ -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 { diff --git a/_api-reference/index.md b/_api-reference/index.md index 8b6038778f..cd5a5ea844 100644 --- a/_api-reference/index.md +++ b/_api-reference/index.md @@ -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 } diff --git a/_api-reference/nodes-apis/nodes-hot-threads.md b/_api-reference/nodes-apis/nodes-hot-threads.md index 23019d800f..8be68c75be 100644 --- a/_api-reference/nodes-apis/nodes-hot-threads.md +++ b/_api-reference/nodes-apis/nodes-hot-threads.md @@ -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} diff --git a/_api-reference/nodes-apis/nodes-info.md b/_api-reference/nodes-apis/nodes-info.md index 7ade89c74a..ce54c5192c 100644 --- a/_api-reference/nodes-apis/nodes-info.md +++ b/_api-reference/nodes-apis/nodes-info.md @@ -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 master node: @@ -86,7 +86,7 @@ GET /_nodes/master:true/process,transport ``` {% include copy-curl.html %} -#### Sample response +#### Example response The response contains the metric groups specified in the `` request parameter (in this case, `process` and `transport`): diff --git a/_api-reference/nodes-apis/nodes-reload-secure.md b/_api-reference/nodes-apis/nodes-reload-secure.md index 467df77060..b7f72de6dd 100644 --- a/_api-reference/nodes-apis/nodes-reload-secure.md +++ b/_api-reference/nodes-apis/nodes-reload-secure.md @@ -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: diff --git a/_api-reference/nodes-apis/nodes-stats.md b/_api-reference/nodes-apis/nodes-stats.md index 8a3c8c1135..d11e1cc31b 100644 --- a/_api-reference/nodes-apis/nodes-stats.md +++ b/_api-reference/nodes-apis/nodes-stats.md @@ -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 { diff --git a/_api-reference/nodes-apis/nodes-usage.md b/_api-reference/nodes-apis/nodes-usage.md index 22a94c4af6..e8385ec7e8 100644 --- a/_api-reference/nodes-apis/nodes-usage.md +++ b/_api-reference/nodes-apis/nodes-usage.md @@ -36,7 +36,7 @@ Parameter | Type | Description timeout | Time | Sets the time limit for a response from the node. Default is `30s`. master_timeout | Time | Sets the time limit for a response from the master node. 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: diff --git a/_api-reference/rank-eval.md b/_api-reference/rank-eval.md index f51bf049d1..f6493b378b 100644 --- a/_api-reference/rank-eval.md +++ b/_api-reference/rank-eval.md @@ -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 { diff --git a/_api-reference/reload-search-analyzer.md b/_api-reference/reload-search-analyzer.md index f6f0f1d97b..74407561b7 100644 --- a/_api-reference/reload-search-analyzer.md +++ b/_api-reference/reload-search-analyzer.md @@ -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 { diff --git a/_api-reference/script-apis/create-stored-script.md b/_api-reference/script-apis/create-stored-script.md index c3dee4a22e..a5a45b6287 100644 --- a/_api-reference/script-apis/create-stored-script.md +++ b/_api-reference/script-apis/create-stored-script.md @@ -45,7 +45,7 @@ All parameters are optional. | lang | String | Scripting language. Required. | | source | String or Object | Required.

For scripts, a string with the contents of the script.

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: diff --git a/_api-reference/script-apis/delete-script.md b/_api-reference/script-apis/delete-script.md index 77107bef20..633162b478 100644 --- a/_api-reference/script-apis/delete-script.md +++ b/_api-reference/script-apis/delete-script.md @@ -24,7 +24,7 @@ Path parameters are optional. | master_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 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: diff --git a/_api-reference/script-apis/exec-script.md b/_api-reference/script-apis/exec-script.md index 361f9c60f5..70080411af 100644 --- a/_api-reference/script-apis/exec-script.md +++ b/_api-reference/script-apis/exec-script.md @@ -25,7 +25,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: @@ -43,7 +43,7 @@ GET /_scripts/painless/_execute ``` {% include copy-curl.html %} -#### Sample response +#### Example response The response contains the average of two script parameters: @@ -66,7 +66,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 diff --git a/_api-reference/script-apis/exec-stored-script.md b/_api-reference/script-apis/exec-stored-script.md index 3f5ad0103c..2433eb3dae 100644 --- a/_api-reference/script-apis/exec-stored-script.md +++ b/_api-reference/script-apis/exec-stored-script.md @@ -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: diff --git a/_api-reference/script-apis/get-script-contexts.md b/_api-reference/script-apis/get-script-contexts.md index 7df2b8559f..cec9be829c 100644 --- a/_api-reference/script-apis/get-script-contexts.md +++ b/_api-reference/script-apis/get-script-contexts.md @@ -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: diff --git a/_api-reference/script-apis/get-script-language.md b/_api-reference/script-apis/get-script-language.md index 7616dbc680..32d8bc1f71 100644 --- a/_api-reference/script-apis/get-script-language.md +++ b/_api-reference/script-apis/get-script-language.md @@ -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: diff --git a/_api-reference/script-apis/get-stored-script.md b/_api-reference/script-apis/get-stored-script.md index 14861fa6b4..ad958205b7 100644 --- a/_api-reference/script-apis/get-stored-script.md +++ b/_api-reference/script-apis/get-stored-script.md @@ -21,7 +21,7 @@ Retrieves a stored script. :--- | :--- | :--- | master_timeout | Time | Amount of time to wait for a connection to the master node. 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: diff --git a/_api-reference/snapshots/create-repository.md b/_api-reference/snapshots/create-repository.md index 37c0eb6ed0..9616958b5d 100644 --- a/_api-reference/snapshots/create-repository.md +++ b/_api-reference/snapshots/create-repository.md @@ -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: diff --git a/_api-reference/snapshots/create-snapshot.md b/_api-reference/snapshots/create-snapshot.md index a1e7c75a04..f70a83da6a 100644 --- a/_api-reference/snapshots/create-snapshot.md +++ b/_api-reference/snapshots/create-snapshot.md @@ -37,7 +37,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 @@ -63,7 +63,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. diff --git a/_api-reference/snapshots/delete-snapshot-repository.md b/_api-reference/snapshots/delete-snapshot-repository.md index f38e162a45..5dfafbdc24 100644 --- a/_api-reference/snapshots/delete-snapshot-repository.md +++ b/_api-reference/snapshots/delete-snapshot-repository.md @@ -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: diff --git a/_api-reference/snapshots/delete-snapshot.md b/_api-reference/snapshots/delete-snapshot.md index 31e45b6d85..58214174e5 100644 --- a/_api-reference/snapshots/delete-snapshot.md +++ b/_api-reference/snapshots/delete-snapshot.md @@ -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: diff --git a/_api-reference/snapshots/get-snapshot-repository.md b/_api-reference/snapshots/get-snapshot-repository.md index f77cb3eca9..14a7059d2f 100644 --- a/_api-reference/snapshots/get-snapshot-repository.md +++ b/_api-reference/snapshots/get-snapshot-repository.md @@ -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`.| | master_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. diff --git a/_api-reference/snapshots/get-snapshot-status.md b/_api-reference/snapshots/get-snapshot-status.md index 9c69103ad8..e12829bd96 100644 --- a/_api-reference/snapshots/get-snapshot-status.md +++ b/_api-reference/snapshots/get-snapshot-status.md @@ -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: diff --git a/_api-reference/snapshots/get-snapshot.md b/_api-reference/snapshots/get-snapshot.md index c69fe2d04f..288c6402e2 100644 --- a/_api-reference/snapshots/get-snapshot.md +++ b/_api-reference/snapshots/get-snapshot.md @@ -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: diff --git a/_api-reference/snapshots/restore-snapshot.md b/_api-reference/snapshots/restore-snapshot.md index da78ce0c48..8e6935c968 100644 --- a/_api-reference/snapshots/restore-snapshot.md +++ b/_api-reference/snapshots/restore-snapshot.md @@ -54,7 +54,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. diff --git a/_api-reference/snapshots/verify-snapshot-repository.md b/_api-reference/snapshots/verify-snapshot-repository.md index 701d4cb336..6e4cf62595 100644 --- a/_api-reference/snapshots/verify-snapshot-repository.md +++ b/_api-reference/snapshots/verify-snapshot-repository.md @@ -30,7 +30,7 @@ Path parameters are optional. | master_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&master_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&master_timeout=50s` request returns the following fields: diff --git a/_im-plugin/index-rollups/index.md b/_im-plugin/index-rollups/index.md index 26d718678a..57eed843b5 100644 --- a/_im-plugin/index-rollups/index.md +++ b/_im-plugin/index-rollups/index.md @@ -97,7 +97,7 @@ Then run a search: GET opensearch_dashboards_sample_data_ecommerce/_search ``` -#### Sample response +#### Example response ```json { diff --git a/_im-plugin/index-rollups/rollup-api.md b/_im-plugin/index-rollups/rollup-api.md index 7aa878d3d6..8099d792f5 100644 --- a/_im-plugin/index-rollups/rollup-api.md +++ b/_im-plugin/index-rollups/rollup-api.md @@ -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/ ``` -#### Sample response +#### Example response ```json { @@ -173,7 +173,7 @@ Deletes an index rollup job based on the `rollup_id`. DELETE _plugins/_rollup/jobs/ ``` -#### Sample response +#### Example response ```json 200 OK @@ -196,7 +196,7 @@ POST _plugins/_rollup/jobs//_stop ``` -#### Sample response +#### Example response ```json 200 OK @@ -218,7 +218,7 @@ GET _plugins/_rollup/jobs//_explain ``` -#### Sample response +#### Example response ```json { diff --git a/_im-plugin/ism/api.md b/_im-plugin/ism/api.md index bdc6a5652a..6e0eaf2882 100644 --- a/_im-plugin/ism/api.md +++ b/_im-plugin/ism/api.md @@ -25,7 +25,7 @@ Introduced 1.0 Creates a policy. -#### 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. -#### 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). -#### 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`. -#### 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. -#### 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. -#### 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. -#### 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. -#### 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). -#### 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`. -#### Request +#### Example request ```json DELETE _plugins/_ism/policies/policy_1 ``` -#### Sample response +#### Example response ```json { diff --git a/_monitoring-your-cluster/pa/api.md b/_monitoring-your-cluster/pa/api.md index 7aaddc8ff3..11f194728c 100644 --- a/_monitoring-your-cluster/pa/api.md +++ b/_monitoring-your-cluster/pa/api.md @@ -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 { diff --git a/_monitoring-your-cluster/pa/rca/api.md b/_monitoring-your-cluster/pa/rca/api.md index cb8762cd5f..a24e676722 100644 --- a/_monitoring-your-cluster/pa/rca/api.md +++ b/_monitoring-your-cluster/pa/rca/api.md @@ -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 { diff --git a/_observing-your-data/ad/api.md b/_observing-your-data/ad/api.md index 635914b99a..f9846bfc72 100644 --- a/_observing-your-data/ad/api.md +++ b/_observing-your-data/ad/api.md @@ -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/ ``` -#### Sample response +#### Example response ```json { @@ -641,7 +641,7 @@ Use `job=true` to get real-time analysis task information. GET _plugins/_anomaly_detection/detectors/?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/?task=true ``` -#### Sample response +#### Example response ```json { @@ -1104,7 +1104,7 @@ PUT _plugins/_anomaly_detection/detectors/ ``` -#### 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/ ``` -#### 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//_start ``` -#### Sample response +#### Example response ```json { @@ -1686,7 +1686,7 @@ POST _plugins/_anomaly_detection/detectors//_start } ``` -#### Sample response +#### Example response ```json { @@ -1715,7 +1715,7 @@ To stop a real-time detector job: POST _plugins/_anomaly_detection/detectors//_stop ``` -#### Sample response +#### Example response ```json { @@ -1735,7 +1735,7 @@ Introduced 1.1 POST _plugins/_anomaly_detection/detectors//_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//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 { diff --git a/_observing-your-data/alerting/api.md b/_observing-your-data/alerting/api.md index a439019937..26c85de408 100644 --- a/_observing-your-data/alerting/api.md +++ b/_observing-your-data/alerting/api.md @@ -101,7 +101,7 @@ If you use a custom webhook for your destination and need to embed JSON in the m } ``` -#### Sample response +#### Example response ```json { @@ -371,7 +371,7 @@ POST _plugins/_alerting/monitors } ``` -#### Sample response +#### Example response ```json { "_id" : "Dfxr63sBwex6DxEhHV5N", @@ -515,7 +515,7 @@ POST _plugins/_alerting/monitors 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 @@ -625,7 +625,7 @@ PUT _plugins/_alerting/monitors/?if_seq_no=3&if_primary_term=1 } ``` -#### Sample response +#### Example response ```json { @@ -699,7 +699,7 @@ Introduced 1.0 GET _plugins/_alerting/monitors/ ``` -#### Sample response +#### Example response ```json { @@ -778,7 +778,7 @@ GET _plugins/_alerting//stats GET _plugins/_alerting//stats/ ``` -#### Sample response +#### Example response ```json { @@ -964,7 +964,7 @@ Introduced 1.0 DELETE _plugins/_alerting/monitors/ ``` -#### Sample response +#### Example response ```json { @@ -1004,7 +1004,7 @@ GET _plugins/_alerting/monitors/_search } ``` -#### Sample response +#### Example response ```json { @@ -1099,7 +1099,7 @@ You can add the optional `?dryrun=true` parameter to the URL to show the results POST _plugins/_alerting/monitors//_execute ``` -#### Sample response +#### Example response ```json { @@ -1206,7 +1206,7 @@ POST _plugins/_alerting/monitors//_acknowledge/alerts } ``` -#### Sample response +#### Example response ```json { @@ -1275,7 +1275,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 { @@ -1301,7 +1301,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 @@ -1325,7 +1325,7 @@ PUT _plugins/_alerting/destinations/?if_seq_no=3&if_primary_term } ``` -#### Sample response +#### Example response ```json { @@ -1359,7 +1359,7 @@ Retrieve one destination. GET _plugins/_alerting/destinations/ ``` -#### Sample response +#### Example response ```json { @@ -1406,7 +1406,7 @@ Retrieve all destinations. GET _plugins/_alerting/destinations ``` -#### Sample response +#### Example response ```json { @@ -1451,7 +1451,7 @@ Introduced 1.0 DELETE _plugins/_alerting/destinations/ ``` -#### Sample response +#### Example response ```json { @@ -1488,7 +1488,7 @@ POST _plugins/_alerting/destinations/email_accounts } ``` -#### Sample response +#### Example response ```json { "_id" : "email_account_id", @@ -1510,7 +1510,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 @@ -1532,7 +1532,7 @@ PUT _plugins/_alerting/destinations/email_accounts/?if_seq_no= "method": "ssl" } ``` -#### Sample response +#### Example response ```json { "_id" : "email_account_id", @@ -1565,7 +1565,7 @@ GET _plugins/_alerting/destinations/email_accounts/ "method": "ssl" } ``` -#### Sample response +#### Example response ```json { "_id" : "email_account_id", @@ -1591,7 +1591,7 @@ Introduced 1.0 ``` DELETE _plugins/_alerting/destinations/email_accounts/ ``` -#### Sample response +#### Example response ```json { @@ -1633,7 +1633,7 @@ POST _plugins/_alerting/destinations/email_accounts/_search } ``` -#### Sample response +#### Example response ```json { @@ -1695,7 +1695,7 @@ POST _plugins/_alerting/destinations/email_groups } ``` -#### Sample response +#### Example response ```json { @@ -1719,7 +1719,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 @@ -1740,7 +1740,7 @@ PUT _plugins/_alerting/destinations/email_groups/?if_seq_no=16&i }] } ``` -#### Sample response +#### Example response ```json { @@ -1774,7 +1774,7 @@ GET _plugins/_alerting/destinations/email_groups/ }] } ``` -#### Sample response +#### Example response ```json { @@ -1802,7 +1802,7 @@ Introduced 1.0 ``` DELETE _plugins/_alerting/destinations/email_groups/ ``` -#### Sample response +#### Example response ```json { @@ -1844,7 +1844,7 @@ POST _plugins/_alerting/destinations/email_groups/_search } ``` -#### Sample response +#### Example response ```json { diff --git a/_opensearch/aggregations.md b/_opensearch/aggregations.md index 69c7cd0ba7..38305997b0 100644 --- a/_opensearch/aggregations.md +++ b/_opensearch/aggregations.md @@ -86,7 +86,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search } ``` -#### Sample response +#### Example response ```json { diff --git a/_opensearch/bucket-agg.md b/_opensearch/bucket-agg.md index 47f2ea7a97..3833b4b484 100644 --- a/_opensearch/bucket-agg.md +++ b/_opensearch/bucket-agg.md @@ -118,7 +118,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -172,7 +172,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -228,7 +228,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -298,7 +298,7 @@ GET shakespeare/_search } ``` -#### Sample response +#### Example response ```json "aggregations" : { @@ -421,7 +421,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -515,7 +515,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -583,7 +583,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 ... @@ -638,7 +638,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -685,7 +685,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -753,7 +753,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search } ``` -#### Sample response +#### Example response ```json ... @@ -806,7 +806,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -869,7 +869,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search } ``` -#### Sample response +#### Example response ```json ... @@ -994,7 +994,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -1057,7 +1057,7 @@ GET opensearch_dashboards_sample_data_logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -1133,7 +1133,7 @@ GET opensearch_dashboards_sample_data_ecommerce/_search } ``` -#### Sample response +#### Example response ```json { @@ -1265,7 +1265,7 @@ GET logs/_search } ``` -#### Sample response +#### Example response ```json ... @@ -1320,7 +1320,7 @@ GET logs/_search } ``` -#### Sample response +#### Example response ```json ... diff --git a/_opensearch/common-parameters.md b/_opensearch/common-parameters.md index bedd738539..b96bd95a24 100644 --- a/_opensearch/common-parameters.md +++ b/_opensearch/common-parameters.md @@ -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 /_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 /_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/