diff --git a/_api-reference/analyze-apis/perform-text-analysis.md b/_api-reference/analyze-apis/perform-text-analysis.md index 25b81a87..cca29a3d 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 42475cc3..9d8fa2f5 100644 --- a/_api-reference/cluster-api/cluster-health.md +++ b/_api-reference/cluster-api/cluster-health.md @@ -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: diff --git a/_api-reference/cluster-api/cluster-settings.md b/_api-reference/cluster-api/cluster-settings.md index ade188b5..9d533f4f 100644 --- a/_api-reference/cluster-api/cluster-settings.md +++ b/_api-reference/cluster-api/cluster-settings.md @@ -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:

`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 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 { diff --git a/_api-reference/index-apis/clear-index-cache.md b/_api-reference/index-apis/clear-index-cache.md index f44504a9..56f3e2e9 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 f654b108..653e8189 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 8b603877..cd5a5ea8 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 23019d80..8be68c75 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 b04f06ec..c36bdfde 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 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 `` 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 467df770..b7f72de6 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 fbd0511b..ca6f9797 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 d9a1af24..ef65b914 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`. 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: diff --git a/_api-reference/rank-eval.md b/_api-reference/rank-eval.md index f2c5d931..db12693b 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 d8e21739..a07267d6 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 f50e6d50..e782be23 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 be53a081..a9cb3ca9 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. | 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: diff --git a/_api-reference/script-apis/exec-script.md b/_api-reference/script-apis/exec-script.md index 073eae4b..18e18478 100644 --- a/_api-reference/script-apis/exec-script.md +++ b/_api-reference/script-apis/exec-script.md @@ -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 diff --git a/_api-reference/script-apis/exec-stored-script.md b/_api-reference/script-apis/exec-stored-script.md index 9a640365..8fcaf8a3 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 e39dadc0..f9ca8052 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 1405191e..6fb566b7 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 35eba7b2..37422262 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. :--- | :--- | :--- | 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: diff --git a/_api-reference/snapshots/create-repository.md b/_api-reference/snapshots/create-repository.md index 22c96152..b0313e1b 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 f0cbed4a..e41dd5d0 100644 --- a/_api-reference/snapshots/create-snapshot.md +++ b/_api-reference/snapshots/create-snapshot.md @@ -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. diff --git a/_api-reference/snapshots/delete-snapshot-repository.md b/_api-reference/snapshots/delete-snapshot-repository.md index 49173bc6..5f4d4462 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 a3f896e7..4dd25c49 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 d365b93d..2ebe6921 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`.| | 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. diff --git a/_api-reference/snapshots/get-snapshot-status.md b/_api-reference/snapshots/get-snapshot-status.md index a79c3c14..99f30b8f 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 f65a43eb..1b875e09 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 80b1950c..8d86f9d6 100644 --- a/_api-reference/snapshots/restore-snapshot.md +++ b/_api-reference/snapshots/restore-snapshot.md @@ -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. diff --git a/_api-reference/snapshots/verify-snapshot-repository.md b/_api-reference/snapshots/verify-snapshot-repository.md index ccb9d543..5d7a325e 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. | 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: diff --git a/_im-plugin/index-rollups/index.md b/_im-plugin/index-rollups/index.md index c8dd46ae..ae10a109 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 dabfcbda..17ad0580 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 b75d38b7..441f737e 100644 --- a/_im-plugin/ism/api.md +++ b/_im-plugin/ism/api.md @@ -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 { diff --git a/_im-plugin/ism/error-prevention/api.md b/_im-plugin/ism/error-prevention/api.md index 192b0c6d..a273d25c 100644 --- a/_im-plugin/ism/error-prevention/api.md +++ b/_im-plugin/ism/error-prevention/api.md @@ -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 { diff --git a/_ml-commons-plugin/api.md b/_ml-commons-plugin/api.md index 91c575f1..0b11a63f 100644 --- a/_ml-commons-plugin/api.md +++ b/_ml-commons-plugin/api.md @@ -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 diff --git a/_ml-commons-plugin/model-serving-framework.md b/_ml-commons-plugin/model-serving-framework.md index 571ffdc5..a21c23ba 100644 --- a/_ml-commons-plugin/model-serving-framework.md +++ b/_ml-commons-plugin/model-serving-framework.md @@ -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//_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//_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//_unload ``` -### Sample request +### Example request ```json POST /_plugins/_ml/models/MGqJhYMBbbh0ushjm8p_/_unload ``` -### Sample response +### Example response ```json diff --git a/_monitoring-your-cluster/pa/api.md b/_monitoring-your-cluster/pa/api.md index 8ead2b47..98738274 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 cb8762cd..a24e6767 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 635914b9..f9846bfc 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 811743d8..fc81c22d 100644 --- a/_observing-your-data/alerting/api.md +++ b/_observing-your-data/alerting/api.md @@ -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/?if_seq_no=3&if_primary_term=1 } ``` -#### Sample response +#### Example response ```json { @@ -916,7 +916,7 @@ Introduced 1.0 GET _plugins/_alerting/monitors/ ``` -#### Sample response +#### Example response ```json { @@ -995,7 +995,7 @@ GET _plugins/_alerting//stats GET _plugins/_alerting//stats/ ``` -#### Sample response +#### Example response ```json { @@ -1181,7 +1181,7 @@ Introduced 1.0 DELETE _plugins/_alerting/monitors/ ``` -#### 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//_execute ``` -#### Sample response +#### Example response ```json { @@ -1422,7 +1422,7 @@ POST _plugins/_alerting/monitors//_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/?if_seq_no=3&if_primary_term } ``` -#### Sample response +#### Example response ```json { @@ -1575,7 +1575,7 @@ Retrieve one destination. GET _plugins/_alerting/destinations/ ``` -#### 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/ ``` -#### 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/?if_seq_no= "method": "ssl" } ``` -#### Sample response +#### Example response ```json { "_id" : "email_account_id", @@ -1781,7 +1781,7 @@ GET _plugins/_alerting/destinations/email_accounts/ "method": "ssl" } ``` -#### Sample response +#### Example response ```json { "_id" : "email_account_id", @@ -1807,7 +1807,7 @@ Introduced 1.0 ``` DELETE _plugins/_alerting/destinations/email_accounts/ ``` -#### 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/?if_seq_no=16&i }] } ``` -#### Sample response +#### Example response ```json { @@ -1990,7 +1990,7 @@ GET _plugins/_alerting/destinations/email_groups/ }] } ``` -#### Sample response +#### Example response ```json { @@ -2018,7 +2018,7 @@ Introduced 1.0 ``` DELETE _plugins/_alerting/destinations/email_groups/ ``` -#### Sample response +#### Example response ```json { @@ -2060,7 +2060,7 @@ POST _plugins/_alerting/destinations/email_groups/_search } ``` -#### Sample response +#### Example response ```json { diff --git a/_opensearch/aggregations.md b/_opensearch/aggregations.md index 69c7cd0b..38305997 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 49301420..35a0a3bc 100644 --- a/_opensearch/bucket-agg.md +++ b/_opensearch/bucket-agg.md @@ -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 ... diff --git a/_opensearch/common-parameters.md b/_opensearch/common-parameters.md index bedd7385..b96bd95a 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/