diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index e0764a1372..f1d43dfd3f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -5042,7 +5042,8 @@ } } } - } + }, + "x-state": "Added in 9.1.0" }, "put": { "tags": [ @@ -16295,7 +16296,13 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_data_stream/my-data-stream/_settings\n" + } + ] }, "put": { "tags": [ @@ -16403,7 +16410,14 @@ } } } - } + }, + "x-state": "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 499565918f..12b7fee90b 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -8797,7 +8797,13 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "Console", + "source": "GET /_data_stream/my-data-stream/_settings\n" + } + ] }, "put": { "tags": [ @@ -8905,7 +8911,14 @@ } } } - } + }, + "x-state": "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}" + } + ] } }, "/_index_template": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 743c5af16b..293d37a715 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", "name": "cluster.get_settings", @@ -8425,6 +8426,7 @@ "visibility": "public" }, "stack": { + "since": "9.1.0", "stability": "stable", "visibility": "public" } @@ -115229,7 +115231,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.", "inherits": { "type": { "name": "RequestBase", @@ -115295,7 +115297,7 @@ } } ], - "specLocation": "cluster/get_settings/ClusterGetSettingsRequest.ts#L23-L63" + "specLocation": "cluster/get_settings/ClusterGetSettingsRequest.ts#L23-L64" }, { "kind": "response", @@ -144786,6 +144788,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}" } @@ -146919,6 +146922,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}" } @@ -147014,16 +147018,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}" } diff --git a/specification/cluster/get_settings/ClusterGetSettingsRequest.ts b/specification/cluster/get_settings/ClusterGetSettingsRequest.ts index 60ac4bac6f..ed7c183af3 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