From e99f0d5ab940c85cbd44cac77b20828c6402f0b1 Mon Sep 17 00:00:00 2001 From: lcawl Date: Fri, 6 Jun 2025 16:11:53 -0700 Subject: [PATCH 1/5] Add since and method_request to data stream settings --- .../cluster/get_settings/ClusterGetSettingsRequest.ts | 3 ++- .../IndicesGetDataStreamSettingsResponseExample1.yaml | 1 + .../IndicesPutDataStreamSettingsRequest.ts | 2 +- .../IndicesPutDataStreamSettingsResponseExample1.yaml | 1 + .../IndicesPutDataStreamSettingsResponseExample2.yaml | 1 + .../IndicesPutDataStreamSettingsResponseExample3.yaml | 1 + .../request/IndicesPutDataStreamSettingsRequestExample1.yaml | 2 +- 7 files changed, 8 insertions(+), 3 deletions(-) diff --git a/specification/cluster/get_settings/ClusterGetSettingsRequest.ts b/specification/cluster/get_settings/ClusterGetSettingsRequest.ts index cb1c176f44..f3a2686ccb 100644 --- a/specification/cluster/get_settings/ClusterGetSettingsRequest.ts +++ b/specification/cluster/get_settings/ClusterGetSettingsRequest.ts @@ -22,9 +22,10 @@ import { Duration } from '@_types/Time' /** * Get cluster-wide settings. + * * By default, it returns only settings that have been explicitly defined. * @rest_spec_name cluster.get_settings - * @availability stack stability=stable + * @availability stack since=9.1.0 stability=stable * @availability serverless stability=stable visibility=private * @cluster_privileges monitor * @doc_id cluster-get-settings diff --git a/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml b/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml index 242ca1c231..cfc2c2399f 100644 --- a/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml +++ b/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml @@ -4,6 +4,7 @@ description: > `effective_settings` field shows additional settings that are pulled from its template. # type: response # response_code: 200 +method_request: GET /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts index 3eb1e02b06..c09dcda447 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts @@ -30,7 +30,7 @@ import { IndexSettings } from '@indices/_types/IndexSettings' * only certain settings are allowed. If possible, the setting change is applied to all * backing indices. Otherwise, it will be applied when the data stream is next rolled over. * @rest_spec_name indices.put_data_stream_settings - * @availability stack stability=stable visibility=public + * @availability stack since=9.1.0 stability=stable visibility=public * @availability serverless stability=stable visibility=public * @index_privileges manage * @doc_id indices-put-data-stream-settings diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml index 5a64c1bc15..392a207645 100644 --- a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml @@ -5,6 +5,7 @@ description: > the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices. # type: response # response_code: 200 +method_request: PUT /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml index e2f3a5408e..ba5dd5808f 100644 --- a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml @@ -5,6 +5,7 @@ description: > reports that the setting was not successfully applied to that index. # type: response # response_code: 200 +method_request: PUT /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml index aa84c40da1..c6746ec8b4 100644 --- a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml @@ -4,6 +4,7 @@ description: > not allowed on a data stream. As a result, no change was applied to the data stream. # type: response # response_code: 200 +method_request: PUT /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ diff --git a/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml b/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml index 15331dc534..cb15d12db5 100644 --- a/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml +++ b/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml @@ -1,5 +1,5 @@ summary: Change a data stream setting -# method_request: PUT /_data_stream/my-data-stream/_settings +method_request: PUT /_data_stream/my-data-stream/_settings description: > This is a request to change two settings on a data stream. # type: request From 5b38639fa73252b4ef03ceabc6c4877bc7f48789 Mon Sep 17 00:00:00 2001 From: lcawl Date: Fri, 6 Jun 2025 16:19:47 -0700 Subject: [PATCH 2/5] Generate output --- output/openapi/elasticsearch-openapi.json | 10 ++++++++-- .../openapi/elasticsearch-serverless-openapi.json | 8 +++++++- output/schema/schema.json | 13 ++++++++++--- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 5d448233b1..75d92b88d4 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -5108,7 +5108,7 @@ } } }, - "x-state": "Generally available", + "x-state": "Generally available; Added in 9.1.0", "x-codeSamples": [ { "lang": "Console", @@ -17077,7 +17077,13 @@ } } }, - "x-state": "Generally available" + "x-state": "Generally available; Added in 9.1.0", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_data_stream/my-data-stream/_settings\n{\n \"index.lifecycle.name\" : \"new-test-policy\",\n \"index.number_of_shards\": 11\n}" + } + ] } }, "/_mapping/field/{fields}": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index b4d771eb84..c3769bc551 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -9229,7 +9229,13 @@ } } }, - "x-state": "Generally available" + "x-state": "Generally available", + "x-codeSamples": [ + { + "lang": "Console", + "source": "PUT /_data_stream/my-data-stream/_settings\n{\n \"index.lifecycle.name\" : \"new-test-policy\",\n \"index.number_of_shards\": 11\n}" + } + ] } }, "/_index_template": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 00f9daab15..927319aa47 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -2517,10 +2517,11 @@ "visibility": "private" }, "stack": { + "since": "9.1.0", "stability": "stable" } }, - "description": "Get cluster-wide settings.\nBy default, it returns only settings that have been explicitly defined.", + "description": "Get cluster-wide settings.\n\nBy default, it returns only settings that have been explicitly defined.", "docId": "cluster-get-settings", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings", "extDocId": "stack-settings", @@ -8429,6 +8430,7 @@ "visibility": "public" }, "stack": { + "since": "9.1.0", "stability": "stable", "visibility": "public" } @@ -115457,7 +115459,7 @@ "body": { "kind": "no_body" }, - "description": "Get cluster-wide settings.\nBy default, it returns only settings that have been explicitly defined.", + "description": "Get cluster-wide settings.\n\nBy default, it returns only settings that have been explicitly defined.", "examples": { "ClusterGetSettingsExample1": { "method_request": "GET /_cluster/settings?filter_path=persistent.cluster.remote" @@ -115528,7 +115530,7 @@ } } ], - "specLocation": "cluster/get_settings/ClusterGetSettingsRequest.ts#L23-L64" + "specLocation": "cluster/get_settings/ClusterGetSettingsRequest.ts#L23-L65" }, { "kind": "response", @@ -145345,6 +145347,7 @@ "examples": { "IndicesGetDataStreamSettingsResponseExample1": { "description": "This is a response to `GET /_data_stream/my-data-stream/_settings` where my-data-stream that has two settings set. The `effective_settings` field shows additional settings that are pulled from its template.\n", + "method_request": "GET /_data_stream/my-data-stream/_settings", "summary": "Get data stream settings on a data stream", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n }\n }\n ]\n}" } @@ -147534,6 +147537,7 @@ "examples": { "IndicesPutDataStreamSettingsRequestExample1": { "description": "This is a request to change two settings on a data stream.\n", + "method_request": "PUT /_data_stream/my-data-stream/_settings", "summary": "Change a data stream setting", "value": "{\n \"index.lifecycle.name\" : \"new-test-policy\",\n \"index.number_of_shards\": 11\n}" } @@ -147629,16 +147633,19 @@ "examples": { "IndicesPutDataStreamSettingsResponseExample1": { "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when two settings are successfully updated on the data stream. In this case, `index.number_of_shards` is only applied to the data stream -- it will be applied to the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices.\n", + "method_request": "PUT /_data_stream/my-data-stream/_settings", "summary": "Change data stream settings on a data stream", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ]\n }\n }\n ]\n}" }, "IndicesPutDataStreamSettingsResponseExample2": { "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a setting is successfully applied to the data stream, but one of the backing indices, `.ds-my-data-stream-2025.05.28-000001`, has a write block. The response reports that the setting was not successfully applied to that index.\n", + "method_request": "PUT /_data_stream/my-data-stream/_settings", "summary": "Change data stream settings on a data stream that has an index with a metadata block", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ],\n \"errors\": [\n {\n \"index\": \".ds-my-data-stream-2025.05.28-000001\",\n \"error\": \"index [.ds-my-data-stream-2025.05.28-000001] blocked by: [FORBIDDEN/9/index metadata (api)];\"\n }\n ]\n }\n }\n ]\n}" }, "IndicesPutDataStreamSettingsResponseExample3": { "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a user attempts to set a setting that is not allowed on a data stream. As a result, no change was applied to the data stream.\n", + "method_request": "PUT /_data_stream/my-data-stream/_settings", "summary": "Attempt to change a data stream setting that is not allowed", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": false,\n \"error\": \"Cannot set the following settings on a data stream: [index.number_of_replicas]\",\n \"settings\": {},\n \"effective_settings\": {},\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [],\n \"applied_to_data_stream_and_backing_indices\": []\n }\n }\n ]\n}" } From 9b7392bdd0c342f39b49d9cedbc11f2eb1c6e6e1 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 11 Jun 2025 16:08:03 -0700 Subject: [PATCH 3/5] Reflect changes to example generation --- specification/cluster/get_settings/ClusterGetSettingsRequest.ts | 2 +- .../IndicesGetDataStreamSettingsRequest.ts | 2 +- .../IndicesGetDataStreamSettingsResponseExample1.yaml | 1 - .../request/IndicesGetDataStreamSettingsRequestExample1.yaml | 1 + .../IndicesPutDataStreamSettingsResponseExample1.yaml | 2 +- .../IndicesPutDataStreamSettingsResponseExample2.yaml | 2 +- .../IndicesPutDataStreamSettingsResponseExample3.yaml | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 specification/indices/get_data_stream_settings/examples/request/IndicesGetDataStreamSettingsRequestExample1.yaml diff --git a/specification/cluster/get_settings/ClusterGetSettingsRequest.ts b/specification/cluster/get_settings/ClusterGetSettingsRequest.ts index f3a2686ccb..3412b4675c 100644 --- a/specification/cluster/get_settings/ClusterGetSettingsRequest.ts +++ b/specification/cluster/get_settings/ClusterGetSettingsRequest.ts @@ -25,7 +25,7 @@ import { Duration } from '@_types/Time' * * By default, it returns only settings that have been explicitly defined. * @rest_spec_name cluster.get_settings - * @availability stack since=9.1.0 stability=stable + * @availability stack stability=stable * @availability serverless stability=stable visibility=private * @cluster_privileges monitor * @doc_id cluster-get-settings diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts index ed09b3bd04..db07d90880 100644 --- a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts @@ -26,7 +26,7 @@ import { Duration } from '@_types/Time' * * Get setting information for one or more data streams. * @rest_spec_name indices.get_data_stream_settings - * @availability stack stability=stable visibility=public + * @availability stack since=9.1.0 stability=stable visibility=public * @availability serverless stability=stable visibility=public * @index_privileges view_index_metadata * @doc_id indices-get-data-stream-settings diff --git a/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml b/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml index cfc2c2399f..242ca1c231 100644 --- a/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml +++ b/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml @@ -4,7 +4,6 @@ description: > `effective_settings` field shows additional settings that are pulled from its template. # type: response # response_code: 200 -method_request: GET /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ diff --git a/specification/indices/get_data_stream_settings/examples/request/IndicesGetDataStreamSettingsRequestExample1.yaml b/specification/indices/get_data_stream_settings/examples/request/IndicesGetDataStreamSettingsRequestExample1.yaml new file mode 100644 index 0000000000..851227fe07 --- /dev/null +++ b/specification/indices/get_data_stream_settings/examples/request/IndicesGetDataStreamSettingsRequestExample1.yaml @@ -0,0 +1 @@ +method_request: GET /_data_stream/my-data-stream/_settings diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml index 392a207645..639e57d32c 100644 --- a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml @@ -5,7 +5,7 @@ description: > the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices. # type: response # response_code: 200 -method_request: PUT /_data_stream/my-data-stream/_settings +# method_request: PUT /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml index ba5dd5808f..a14a0dc908 100644 --- a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml @@ -5,7 +5,7 @@ description: > reports that the setting was not successfully applied to that index. # type: response # response_code: 200 -method_request: PUT /_data_stream/my-data-stream/_settings +# method_request: PUT /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml index c6746ec8b4..ca5ff0b357 100644 --- a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml @@ -4,7 +4,7 @@ description: > not allowed on a data stream. As a result, no change was applied to the data stream. # type: response # response_code: 200 -method_request: PUT /_data_stream/my-data-stream/_settings +# method_request: PUT /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ From dc8b00b3854c9fd722500d58dc94a41f75c84b8a Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 11 Jun 2025 16:08:59 -0700 Subject: [PATCH 4/5] Regenerate output --- output/openapi/elasticsearch-openapi.json | 10 ++++++++-- output/openapi/elasticsearch-serverless-openapi.json | 8 +++++++- output/schema/schema.json | 11 ++++++----- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 75d92b88d4..e3c3f834c8 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -5108,7 +5108,7 @@ } } }, - "x-state": "Generally available; Added in 9.1.0", + "x-state": "Generally available", "x-codeSamples": [ { "lang": "Console", @@ -16968,7 +16968,13 @@ } } }, - "x-state": "Generally available" + "x-state": "Generally available; Added in 9.1.0", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_data_stream/my-data-stream/_settings\n" + } + ] }, "put": { "tags": [ diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index c3769bc551..8d4e4aca76 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -9120,7 +9120,13 @@ } } }, - "x-state": "Generally available" + "x-state": "Generally available", + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_data_stream/my-data-stream/_settings\n" + } + ] }, "put": { "tags": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 927319aa47..0356a7cab9 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -2517,7 +2517,6 @@ "visibility": "private" }, "stack": { - "since": "9.1.0", "stability": "stable" } }, @@ -7791,6 +7790,7 @@ "visibility": "public" }, "stack": { + "since": "9.1.0", "stability": "stable", "visibility": "public" } @@ -145282,6 +145282,11 @@ "kind": "no_body" }, "description": "Get data stream settings.\n\nGet setting information for one or more data streams.", + "examples": { + "IndicesGetDataStreamSettingsRequestExample1": { + "method_request": "GET /_data_stream/my-data-stream/_settings" + } + }, "inherits": { "type": { "name": "RequestBase", @@ -145347,7 +145352,6 @@ "examples": { "IndicesGetDataStreamSettingsResponseExample1": { "description": "This is a response to `GET /_data_stream/my-data-stream/_settings` where my-data-stream that has two settings set. The `effective_settings` field shows additional settings that are pulled from its template.\n", - "method_request": "GET /_data_stream/my-data-stream/_settings", "summary": "Get data stream settings on a data stream", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n }\n }\n ]\n}" } @@ -147633,19 +147637,16 @@ "examples": { "IndicesPutDataStreamSettingsResponseExample1": { "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when two settings are successfully updated on the data stream. In this case, `index.number_of_shards` is only applied to the data stream -- it will be applied to the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices.\n", - "method_request": "PUT /_data_stream/my-data-stream/_settings", "summary": "Change data stream settings on a data stream", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ]\n }\n }\n ]\n}" }, "IndicesPutDataStreamSettingsResponseExample2": { "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a setting is successfully applied to the data stream, but one of the backing indices, `.ds-my-data-stream-2025.05.28-000001`, has a write block. The response reports that the setting was not successfully applied to that index.\n", - "method_request": "PUT /_data_stream/my-data-stream/_settings", "summary": "Change data stream settings on a data stream that has an index with a metadata block", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ],\n \"errors\": [\n {\n \"index\": \".ds-my-data-stream-2025.05.28-000001\",\n \"error\": \"index [.ds-my-data-stream-2025.05.28-000001] blocked by: [FORBIDDEN/9/index metadata (api)];\"\n }\n ]\n }\n }\n ]\n}" }, "IndicesPutDataStreamSettingsResponseExample3": { "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a user attempts to set a setting that is not allowed on a data stream. As a result, no change was applied to the data stream.\n", - "method_request": "PUT /_data_stream/my-data-stream/_settings", "summary": "Attempt to change a data stream setting that is not allowed", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": false,\n \"error\": \"Cannot set the following settings on a data stream: [index.number_of_replicas]\",\n \"settings\": {},\n \"effective_settings\": {},\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [],\n \"applied_to_data_stream_and_backing_indices\": []\n }\n }\n ]\n}" } From 21caf425e25e99301417251f42faab73ff13e879 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 11 Jun 2025 16:12:24 -0700 Subject: [PATCH 5/5] Revert changes to response examples --- .../IndicesPutDataStreamSettingsResponseExample1.yaml | 1 - .../IndicesPutDataStreamSettingsResponseExample2.yaml | 1 - .../IndicesPutDataStreamSettingsResponseExample3.yaml | 1 - 3 files changed, 3 deletions(-) diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml index 639e57d32c..5a64c1bc15 100644 --- a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml @@ -5,7 +5,6 @@ description: > the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices. # type: response # response_code: 200 -# method_request: PUT /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml index a14a0dc908..e2f3a5408e 100644 --- a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml @@ -5,7 +5,6 @@ description: > reports that the setting was not successfully applied to that index. # type: response # response_code: 200 -# method_request: PUT /_data_stream/my-data-stream/_settings value: |- { "data_streams": [ diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml index ca5ff0b357..aa84c40da1 100644 --- a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml @@ -4,7 +4,6 @@ description: > not allowed on a data stream. As a result, no change was applied to the data stream. # type: response # response_code: 200 -# method_request: PUT /_data_stream/my-data-stream/_settings value: |- { "data_streams": [