From fe02053f6666d2e9c8d5ca69192d031ec738c217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 25 Sep 2024 16:49:57 +0200 Subject: [PATCH 01/16] Add indices API request and response examples - add block to close. --- .../indices/add_block/IndicesAddBlockResponseExample1.yaml | 6 ++++++ .../indices/analyze/indicesAnalyzeRequestExample1.yaml | 5 +++++ .../indices/clone/indicesCloneRequestExample1.yaml | 6 ++++++ .../indices/close/indicesCloseResponseExample1.yaml | 6 ++++++ 4 files changed, 23 insertions(+) create mode 100644 specification/indices/add_block/IndicesAddBlockResponseExample1.yaml create mode 100644 specification/indices/analyze/indicesAnalyzeRequestExample1.yaml create mode 100644 specification/indices/clone/indicesCloneRequestExample1.yaml create mode 100644 specification/indices/close/indicesCloseResponseExample1.yaml diff --git a/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml b/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml new file mode 100644 index 0000000000..2c9368902e --- /dev/null +++ b/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml @@ -0,0 +1,6 @@ +summary: A successful response for adding an index block to an index. +description: '' +type: response +response_code: 200 +value: "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true,\n \"indices\"\ + \ : [ {\n \"name\" : \"my-index-000001\",\n \"blocked\" : true\n } ]\n}" diff --git a/specification/indices/analyze/indicesAnalyzeRequestExample1.yaml b/specification/indices/analyze/indicesAnalyzeRequestExample1.yaml new file mode 100644 index 0000000000..0a34b3c469 --- /dev/null +++ b/specification/indices/analyze/indicesAnalyzeRequestExample1.yaml @@ -0,0 +1,5 @@ +summary: Perform analysis on a text string and returns the resulting tokens. +method_request: GET /_analyze +description: '' +type: request +value: "{\n \"analyzer\" : \"standard\",\n \"text\" : \"Quick Brown Foxes!\"\n}" diff --git a/specification/indices/clone/indicesCloneRequestExample1.yaml b/specification/indices/clone/indicesCloneRequestExample1.yaml new file mode 100644 index 0000000000..37924c052f --- /dev/null +++ b/specification/indices/clone/indicesCloneRequestExample1.yaml @@ -0,0 +1,6 @@ +summary: Clone an existing index. +method_request: POST /my_source_index/_clone/my_target_index +description: 'The API accepts `settings` and `aliases` parameters for the target index.' +type: request +value: "{\n \"settings\": {\n \"index.number_of_shards\": 5\n },\n \"aliases\"\ + : {\n \"my_search_indices\": {}\n }\n}" diff --git a/specification/indices/close/indicesCloseResponseExample1.yaml b/specification/indices/close/indicesCloseResponseExample1.yaml new file mode 100644 index 0000000000..92c9ca0176 --- /dev/null +++ b/specification/indices/close/indicesCloseResponseExample1.yaml @@ -0,0 +1,6 @@ +summary: A successful response for closing an index. +description: '' +type: response +response_code: 200 +value: "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"indices\"\ + : {\n \"my-index-000001\": {\n \"closed\": true\n }\n }\n}" From b91c04f99bbea4b4bf7b8d3ccf3b9c33c8dbef80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 2 Oct 2024 17:13:53 +0200 Subject: [PATCH 02/16] Adds index API requests and responses - part 1. --- .../create/indicesCreateRequestExample1.yaml | 6 ++++ .../create/indicesCreateRequestExample2.yaml | 6 ++++ ...ndicesDataStreamStatsResponseExample1.yaml | 12 +++++++ ...esDeleteDataLifecycleResponseExample1.yaml | 5 +++ ...sExplainDataLifecycleResponseExample1.yaml | 10 ++++++ ...dicesGetDataLifecycleResponseExample1.yaml | 9 ++++++ .../indicesGetDataStreamResponseExample1.yaml | 31 +++++++++++++++++++ .../open/indicesOpenResponseExample1.yaml | 5 +++ ...ndicesPutDataLifecycleRequestExample1.yaml | 5 +++ ...ndicesPutDataLifecycleRequestExample2.yaml | 7 +++++ ...dicesPutDataLifecycleResponseExample1.yaml | 5 +++ 11 files changed, 101 insertions(+) create mode 100644 specification/indices/create/indicesCreateRequestExample1.yaml create mode 100644 specification/indices/create/indicesCreateRequestExample2.yaml create mode 100644 specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml create mode 100644 specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml create mode 100644 specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml create mode 100644 specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml create mode 100644 specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml create mode 100644 specification/indices/open/indicesOpenResponseExample1.yaml create mode 100644 specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample1.yaml create mode 100644 specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml create mode 100644 specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml diff --git a/specification/indices/create/indicesCreateRequestExample1.yaml b/specification/indices/create/indicesCreateRequestExample1.yaml new file mode 100644 index 0000000000..94f1f775d7 --- /dev/null +++ b/specification/indices/create/indicesCreateRequestExample1.yaml @@ -0,0 +1,6 @@ +summary: Creates an index. +method_request: PUT /my-index-000001 +description: This request specifies the `number_of_shards` and `number_of_replicas`. +type: request +value: "{\n \"settings\": {\n \"number_of_shards\": 3,\n \"number_of_replicas\"\ + : 2\n }\n}" \ No newline at end of file diff --git a/specification/indices/create/indicesCreateRequestExample2.yaml b/specification/indices/create/indicesCreateRequestExample2.yaml new file mode 100644 index 0000000000..76a26250d6 --- /dev/null +++ b/specification/indices/create/indicesCreateRequestExample2.yaml @@ -0,0 +1,6 @@ +summary: Creates an index with mapping. +method_request: PUT /test +description: You can provide mapping definitions in the create index API requests. +type: request +value: "{\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n\ + \ \"properties\": {\n \"field1\": { \"type\": \"text\" }\n }\n }\n}" diff --git a/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml b/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml new file mode 100644 index 0000000000..e961981794 --- /dev/null +++ b/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml @@ -0,0 +1,12 @@ +summary: A successful response for retrieving statistics for a data stream. +description: '' +type: response +response_code: 200 +value: "{\n \"_shards\": {\n \"total\": 10,\n \"successful\": 5,\n \"failed\"\ + : 0\n },\n \"data_stream_count\": 2,\n \"backing_indices\": 5,\n \"total_store_size\"\ + : \"7kb\",\n \"total_store_size_bytes\": 7268,\n \"data_streams\": [\n {\n\ + \ \"data_stream\": \"my-data-stream\",\n \"backing_indices\": 3,\n \ + \ \"store_size\": \"3.7kb\",\n \"store_size_bytes\": 3772,\n \"maximum_timestamp\"\ + : 1607512028000\n },\n {\n \"data_stream\": \"my-data-stream-two\",\n\ + \ \"backing_indices\": 2,\n \"store_size\": \"3.4kb\",\n \"store_size_bytes\"\ + : 3496,\n \"maximum_timestamp\": 1607425567000\n }\n ]\n}" diff --git a/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml b/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml new file mode 100644 index 0000000000..6bd08372c7 --- /dev/null +++ b/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml @@ -0,0 +1,5 @@ +summary: A successful response for deleting a data stream lifecycle. +description: '' +type: response +response_code: 200 +value: "{\n \"acknowledged\": true\n}" diff --git a/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml new file mode 100644 index 0000000000..2522e90498 --- /dev/null +++ b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml @@ -0,0 +1,10 @@ +summary: A successful response for retrieving data stream lifecycle status for a data stream backing index. +description: '' +type: response +response_code: 200 +value: "{\n \"indices\": {\n \".ds-metrics-2023.03.22-000001\": {\n \"index\"\ + \ : \".ds-metrics-2023.03.22-000001\",\n \"managed_by_lifecycle\" : true,\n\ + \ \"index_creation_date_millis\" : 1679475563571,\n \"time_since_index_creation\"\ + \ : \"843ms\",\n \"rollover_date_millis\" : 1679475564293,\n \"time_since_rollover\"\ + \ : \"121ms\",\n \"lifecycle\" : { },\n \"generation_time\" : \"121ms\"\ + \n }\n}" diff --git a/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml new file mode 100644 index 0000000000..a010882251 --- /dev/null +++ b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml @@ -0,0 +1,9 @@ +summary: A successful response of getting the lifecycle of a set of data streams. +description: '' +type: response +response_code: 200 +value: "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \ + \ \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\":\ + \ \"7d\"\n }\n },\n {\n \"name\": \"my-data-stream-2\",\n \"\ + lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n\ + \ }\n }\n ]\n}" diff --git a/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml b/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml new file mode 100644 index 0000000000..95bc190e46 --- /dev/null +++ b/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml @@ -0,0 +1,31 @@ +summary: A successful response for retrieving information about a data stream. +description: '' +type: response +response_code: 200 +value: "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \ + \ \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"\ + indices\": [\n {\n \"index_name\": \".ds-my-data-stream-2099.03.07-000001\"\ + ,\n \"index_uuid\": \"xCEhwsp8Tey0-FLNFYVwSg\",\n \"prefer_ilm\"\ + : true,\n \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\"\ + : \"Index Lifecycle Management\"\n },\n {\n \"index_name\"\ + : \".ds-my-data-stream-2099.03.08-000002\",\n \"index_uuid\": \"PA_JquKGSiKcAKBA8DJ5gw\"\ + ,\n \"prefer_ilm\": true,\n \"ilm_policy\": \"my-lifecycle-policy\"\ + ,\n \"managed_by\": \"Index Lifecycle Management\"\n }\n ],\n\ + \ \"generation\": 2,\n \"_meta\": {\n \"my-meta-field\": \"foo\"\ + \n },\n \"status\": \"GREEN\",\n \"next_generation_managed_by\":\ + \ \"Index Lifecycle Management\",\n \"prefer_ilm\": true,\n \"template\"\ + : \"my-index-template\",\n \"ilm_policy\": \"my-lifecycle-policy\",\n \ + \ \"hidden\": false,\n \"system\": false,\n \"allow_custom_routing\":\ + \ false,\n \"replicated\": false,\n \"rollover_on_write\": false\n \ + \ },\n {\n \"name\": \"my-data-stream-two\",\n \"timestamp_field\"\ + : {\n \"name\": \"@timestamp\"\n },\n \"indices\": [\n {\n\ + \ \"index_name\": \".ds-my-data-stream-two-2099.03.08-000001\",\n \ + \ \"index_uuid\": \"3liBu2SYS5axasRt6fUIpA\",\n \"prefer_ilm\": true,\n\ + \ \"ilm_policy\": \"my-lifecycle-policy\",\n \"managed_by\": \"\ + Index Lifecycle Management\"\n }\n ],\n \"generation\": 1,\n \ + \ \"_meta\": {\n \"my-meta-field\": \"foo\"\n },\n \"status\"\ + : \"YELLOW\",\n \"next_generation_managed_by\": \"Index Lifecycle Management\"\ + ,\n \"prefer_ilm\": true,\n \"template\": \"my-index-template\",\n \ + \ \"ilm_policy\": \"my-lifecycle-policy\",\n \"hidden\": false,\n \"\ + system\": false,\n \"allow_custom_routing\": false,\n \"replicated\":\ + \ false,\n \"rollover_on_write\": false\n }\n ]\n}" diff --git a/specification/indices/open/indicesOpenResponseExample1.yaml b/specification/indices/open/indicesOpenResponseExample1.yaml new file mode 100644 index 0000000000..f4580dbdb8 --- /dev/null +++ b/specification/indices/open/indicesOpenResponseExample1.yaml @@ -0,0 +1,5 @@ +summary: A successful response for opening an index. +description: '' +type: response +response_code: 200 +value: "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true\n}" diff --git a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample1.yaml b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample1.yaml new file mode 100644 index 0000000000..db73d2ba6b --- /dev/null +++ b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample1.yaml @@ -0,0 +1,5 @@ +summary: Configures a data stream lifecycle. +method_request: PUT _data_stream/my-data-stream/_lifecycle +description: Sets the lifecycle of a data stream. +type: request +value: "{\n \"data_retention\": \"7d\"\n}" diff --git a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml new file mode 100644 index 0000000000..cf5194d887 --- /dev/null +++ b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml @@ -0,0 +1,7 @@ +summary: Configures a data stream lifecycle. +method_request: PUT _data_stream/my-weather-sensor-data-stream/_lifecycle +description: This example configures two downsampling rounds. +type: request +value: "{\n \"downsampling\": [\n {\n \"after\": \"1d\",\n \"\ + fixed_interval\": \"10m\"\n },\n {\n \"after\": \"7d\",\n \ + \ \"fixed_interval\": \"1d\"\n }\n ]\n}" diff --git a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml new file mode 100644 index 0000000000..f31b113f12 --- /dev/null +++ b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml @@ -0,0 +1,5 @@ +summary: A successful response for configuring a data stream lifecycle. +description: '' +type: response +response_code: 200 +value: "{\n \"acknowledged\": true\n}" From 02db0ac39ec032915a03953bf08bfd2ca89d52cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 2 Oct 2024 17:22:35 +0200 Subject: [PATCH 03/16] Fixes format. --- .../indices/add_block/IndicesAddBlockResponseExample1.yaml | 3 ++- specification/indices/clone/indicesCloneRequestExample1.yaml | 3 ++- .../indices/close/indicesCloseResponseExample1.yaml | 3 ++- .../indices/create/indicesCreateRequestExample1.yaml | 5 +++-- .../indices/create/indicesCreateRequestExample2.yaml | 3 ++- .../indicesDataStreamStatsResponseExample1.yaml | 3 ++- .../IndicesExplainDataLifecycleResponseExample1.yaml | 3 ++- .../IndicesGetDataLifecycleResponseExample1.yaml | 3 ++- .../indicesGetDataStreamResponseExample1.yaml | 3 ++- .../IndicesPutDataLifecycleRequestExample2.yaml | 3 ++- 10 files changed, 21 insertions(+), 11 deletions(-) diff --git a/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml b/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml index 2c9368902e..9b42ea2e47 100644 --- a/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml +++ b/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml @@ -2,5 +2,6 @@ summary: A successful response for adding an index block to an index. description: '' type: response response_code: 200 -value: "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true,\n \"indices\"\ +value: + "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true,\n \"indices\"\ \ : [ {\n \"name\" : \"my-index-000001\",\n \"blocked\" : true\n } ]\n}" diff --git a/specification/indices/clone/indicesCloneRequestExample1.yaml b/specification/indices/clone/indicesCloneRequestExample1.yaml index 37924c052f..52ed88b345 100644 --- a/specification/indices/clone/indicesCloneRequestExample1.yaml +++ b/specification/indices/clone/indicesCloneRequestExample1.yaml @@ -2,5 +2,6 @@ summary: Clone an existing index. method_request: POST /my_source_index/_clone/my_target_index description: 'The API accepts `settings` and `aliases` parameters for the target index.' type: request -value: "{\n \"settings\": {\n \"index.number_of_shards\": 5\n },\n \"aliases\"\ +value: + "{\n \"settings\": {\n \"index.number_of_shards\": 5\n },\n \"aliases\"\ : {\n \"my_search_indices\": {}\n }\n}" diff --git a/specification/indices/close/indicesCloseResponseExample1.yaml b/specification/indices/close/indicesCloseResponseExample1.yaml index 92c9ca0176..5a2b8094b1 100644 --- a/specification/indices/close/indicesCloseResponseExample1.yaml +++ b/specification/indices/close/indicesCloseResponseExample1.yaml @@ -2,5 +2,6 @@ summary: A successful response for closing an index. description: '' type: response response_code: 200 -value: "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"indices\"\ +value: + "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"indices\"\ : {\n \"my-index-000001\": {\n \"closed\": true\n }\n }\n}" diff --git a/specification/indices/create/indicesCreateRequestExample1.yaml b/specification/indices/create/indicesCreateRequestExample1.yaml index 94f1f775d7..af6c3011a2 100644 --- a/specification/indices/create/indicesCreateRequestExample1.yaml +++ b/specification/indices/create/indicesCreateRequestExample1.yaml @@ -2,5 +2,6 @@ summary: Creates an index. method_request: PUT /my-index-000001 description: This request specifies the `number_of_shards` and `number_of_replicas`. type: request -value: "{\n \"settings\": {\n \"number_of_shards\": 3,\n \"number_of_replicas\"\ - : 2\n }\n}" \ No newline at end of file +value: + "{\n \"settings\": {\n \"number_of_shards\": 3,\n \"number_of_replicas\"\ + : 2\n }\n}" diff --git a/specification/indices/create/indicesCreateRequestExample2.yaml b/specification/indices/create/indicesCreateRequestExample2.yaml index 76a26250d6..c6fe02528f 100644 --- a/specification/indices/create/indicesCreateRequestExample2.yaml +++ b/specification/indices/create/indicesCreateRequestExample2.yaml @@ -2,5 +2,6 @@ summary: Creates an index with mapping. method_request: PUT /test description: You can provide mapping definitions in the create index API requests. type: request -value: "{\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n\ +value: + "{\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n\ \ \"properties\": {\n \"field1\": { \"type\": \"text\" }\n }\n }\n}" diff --git a/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml b/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml index e961981794..ad5a403c94 100644 --- a/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml +++ b/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml @@ -2,7 +2,8 @@ summary: A successful response for retrieving statistics for a data stream. description: '' type: response response_code: 200 -value: "{\n \"_shards\": {\n \"total\": 10,\n \"successful\": 5,\n \"failed\"\ +value: + "{\n \"_shards\": {\n \"total\": 10,\n \"successful\": 5,\n \"failed\"\ : 0\n },\n \"data_stream_count\": 2,\n \"backing_indices\": 5,\n \"total_store_size\"\ : \"7kb\",\n \"total_store_size_bytes\": 7268,\n \"data_streams\": [\n {\n\ \ \"data_stream\": \"my-data-stream\",\n \"backing_indices\": 3,\n \ diff --git a/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml index 2522e90498..b01beef8bf 100644 --- a/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml +++ b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml @@ -2,7 +2,8 @@ summary: A successful response for retrieving data stream lifecycle status for a description: '' type: response response_code: 200 -value: "{\n \"indices\": {\n \".ds-metrics-2023.03.22-000001\": {\n \"index\"\ +value: + "{\n \"indices\": {\n \".ds-metrics-2023.03.22-000001\": {\n \"index\"\ \ : \".ds-metrics-2023.03.22-000001\",\n \"managed_by_lifecycle\" : true,\n\ \ \"index_creation_date_millis\" : 1679475563571,\n \"time_since_index_creation\"\ \ : \"843ms\",\n \"rollover_date_millis\" : 1679475564293,\n \"time_since_rollover\"\ diff --git a/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml index a010882251..43718d35e5 100644 --- a/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml +++ b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml @@ -2,7 +2,8 @@ summary: A successful response of getting the lifecycle of a set of data streams description: '' type: response response_code: 200 -value: "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \ +value: + "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \ \ \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\":\ \ \"7d\"\n }\n },\n {\n \"name\": \"my-data-stream-2\",\n \"\ lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n\ diff --git a/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml b/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml index 95bc190e46..72bccb3016 100644 --- a/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml +++ b/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml @@ -2,7 +2,8 @@ summary: A successful response for retrieving information about a data stream. description: '' type: response response_code: 200 -value: "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \ +value: + "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \ \ \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"\ indices\": [\n {\n \"index_name\": \".ds-my-data-stream-2099.03.07-000001\"\ ,\n \"index_uuid\": \"xCEhwsp8Tey0-FLNFYVwSg\",\n \"prefer_ilm\"\ diff --git a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml index cf5194d887..97092ef57a 100644 --- a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml +++ b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml @@ -2,6 +2,7 @@ summary: Configures a data stream lifecycle. method_request: PUT _data_stream/my-weather-sensor-data-stream/_lifecycle description: This example configures two downsampling rounds. type: request -value: "{\n \"downsampling\": [\n {\n \"after\": \"1d\",\n \"\ +value: + "{\n \"downsampling\": [\n {\n \"after\": \"1d\",\n \"\ fixed_interval\": \"10m\"\n },\n {\n \"after\": \"7d\",\n \ \ \"fixed_interval\": \"1d\"\n }\n ]\n}" From 40253634a61a1ac8b733843f4710bb3b512a8af4 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 2 Oct 2024 19:03:00 -0700 Subject: [PATCH 04/16] Add overlay for add block example --- docs/overlays/elasticsearch-shared-overlays.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 1f72f24ce9..57a397e5e1 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -185,4 +185,14 @@ actions: application/json: examples: graphExploreRequestExample1: - $ref: "../../specification/graph/explore/graphExploreRequestExample1.json" \ No newline at end of file + $ref: "../../specification/graph/explore/graphExploreRequestExample1.json" + - target: "$.paths['/{index}/_block/{block}']['put']" + description: "Add examples for add index block operation" + update: + responses: + 200: + content: + application/json: + examples: + indicesAddBlockResponseExample1: + $ref: "../../specification/indices/add_block/IndicesAddBlockResponseExample1.yaml" \ No newline at end of file From c2e215f43896198a0ca550e21f2f5f12c748ca2d Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 2 Oct 2024 19:11:24 -0700 Subject: [PATCH 05/16] Add overlay for analyze example --- docs/overlays/elasticsearch-shared-overlays.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 57a397e5e1..53424dfcd9 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -81,7 +81,7 @@ actions: content: application/json: examples: - asyncSearchSubmitResponseExample1: + asyncSearchSubmitRequestExample1: $ref: "../../specification/async_search/submit/AsyncSearchSubmitRequestExample1.json" - target: "$.components['responses']['async_search.submit#200']" description: "Add example for asynch search submit response" @@ -195,4 +195,12 @@ actions: application/json: examples: indicesAddBlockResponseExample1: - $ref: "../../specification/indices/add_block/IndicesAddBlockResponseExample1.yaml" \ No newline at end of file + $ref: "../../specification/indices/add_block/IndicesAddBlockResponseExample1.yaml" + - target: "$.components['requestBodies']['indices.analyze']" + description: "Add example for analyze API request" + update: + content: + application/json: + examples: + indicesAnalyzeRequestExample1: + $ref: "../../specification/indices/analyze/indicesAnalyzeRequestExample1.yaml" From 0103eae8e19b78c854e631e472392950a7ba2e50 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 2 Oct 2024 19:19:35 -0700 Subject: [PATCH 06/16] Add overlay for clone index example --- docs/overlays/elasticsearch-openapi-overlays.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index c83d58900c..d21b3b852d 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -226,4 +226,12 @@ actions: application/json: examples: removePolicyResponseExample1: - $ref: "../../specification/ilm/remove_policy/RemovePolicyResponseExample1.json" \ No newline at end of file + $ref: "../../specification/ilm/remove_policy/RemovePolicyResponseExample1.json" + - target: "$.components['requestBodies']['indices.clone']" + description: "Add examples for clone index request" + update: + content: + application/json: + examples: + indicesCloneRequestExample1: + $ref: "../../specification/indices/clone/indicesCloneRequestExample1.yaml" \ No newline at end of file From eec95d8d93e453970b0af0ed441901ff8ff37b47 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 2 Oct 2024 19:25:56 -0700 Subject: [PATCH 07/16] Add overlay for close index example --- docs/overlays/elasticsearch-openapi-overlays.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index d21b3b852d..f3f9767463 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -234,4 +234,14 @@ actions: application/json: examples: indicesCloneRequestExample1: - $ref: "../../specification/indices/clone/indicesCloneRequestExample1.yaml" \ No newline at end of file + $ref: "../../specification/indices/clone/indicesCloneRequestExample1.yaml" + - target: "$.paths['/{index}/_close']['post']" + description: "Add examples for close index response" + update: + responses: + 200: + content: + application/json: + examples: + indicesCloseResponseExample1: + $ref: "../../specification/indices/close/indicesCloseResponseExample1.yaml" \ No newline at end of file From 9729a327916908e675617a7a4e4322bdfed22363 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 2 Oct 2024 19:34:59 -0700 Subject: [PATCH 08/16] Add overlay for create index examples --- docs/overlays/elasticsearch-shared-overlays.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 53424dfcd9..45e14dacfd 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -204,3 +204,14 @@ actions: examples: indicesAnalyzeRequestExample1: $ref: "../../specification/indices/analyze/indicesAnalyzeRequestExample1.yaml" + - target: "$.paths['/{index}']['put']" + description: "Add examples for create index request" + update: + requestBody: + content: + application/json: + examples: + indicesCreateRequestExample1: + $ref: "../../specification/indices/create/indicesCreateRequestExample1.yaml" + indicesCreateRequestExample2: + $ref: "../../specification/indices/create/indicesCreateRequestExample2.yaml" \ No newline at end of file From e71f2a34e499ea3236578ed7ed6c0d4c37023172 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 3 Oct 2024 09:48:47 -0700 Subject: [PATCH 09/16] Add example overlay for data stream stats and delete lifecycle --- docs/overlays/elasticsearch-openapi-overlays.yaml | 10 +++++++++- docs/overlays/elasticsearch-shared-overlays.yaml | 12 +++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index f3f9767463..4f05a2e6e7 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -244,4 +244,12 @@ actions: application/json: examples: indicesCloseResponseExample1: - $ref: "../../specification/indices/close/indicesCloseResponseExample1.yaml" \ No newline at end of file + $ref: "../../specification/indices/close/indicesCloseResponseExample1.yaml" + - target: "$.components['responses']['indices.data_streams_stats#200']" + description: "Add example for data stream stats response" + update: + content: + application/json: + examples: + indicesDataStreamStatsResponseExample1: + $ref: "../../specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml" diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 45e14dacfd..473c3cac28 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -214,4 +214,14 @@ actions: indicesCreateRequestExample1: $ref: "../../specification/indices/create/indicesCreateRequestExample1.yaml" indicesCreateRequestExample2: - $ref: "../../specification/indices/create/indicesCreateRequestExample2.yaml" \ No newline at end of file + $ref: "../../specification/indices/create/indicesCreateRequestExample2.yaml" + - target: "$.paths['/_data_stream/{name}/_lifecycle']['delete']" + description: "Add example for delete data stream lifecycle response" + update: + responses: + 200: + content: + application/json: + examples: + indicesDeleteDataLifecycleResponseExample1: + $ref: "../../specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml" \ No newline at end of file From 4456048145c45012d2735bdaf998beab757735ec Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 3 Oct 2024 10:10:19 -0700 Subject: [PATCH 10/16] Add example overlays for open index, get data stream, get lifecycle --- .../elasticsearch-openapi-overlays.yaml | 11 ++++++++++ .../elasticsearch-shared-overlays.yaml | 22 +++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index 4f05a2e6e7..57a9442d3b 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -253,3 +253,14 @@ actions: examples: indicesDataStreamStatsResponseExample1: $ref: "../../specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml" + - target: "$.paths['/{index}/_open']['post']" + description: "Add examples for open index response" + update: + responses: + 200: + content: + application/json: + examples: + indicesOpenResponseExample1: + $ref: "../../specification/indices/open/indicesOpenResponseExample1.yaml" + diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 473c3cac28..b9621a01f4 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -117,7 +117,7 @@ actions: examples: previewTransformRequestExample1: $ref: "../../specification/transform/preview_transform/PreviewTransformRequestExample1.json" - - target: "$.components['reponses']['transform.preview_transform#200']" + - target: "$.components['responses']['transform.preview_transform#200']" description: "Add examples for preview transform operation" update: content: @@ -224,4 +224,22 @@ actions: application/json: examples: indicesDeleteDataLifecycleResponseExample1: - $ref: "../../specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml" \ No newline at end of file + $ref: "../../specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml" + - target: "$.paths['/_data_stream/{name}/_lifecycle']['get']" + description: "Add example for get data stream lifecycle response" + update: + responses: + 200: + content: + application/json: + examples: + indicesGetDataLifecycleResponseExample1: + $ref: "../../specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml" + - target: "$.components['responses']['indices.get_data_stream#200']" + description: "Add example for get data stream response" + update: + content: + application/json: + examples: + indicesGetDataStreamResponseExample: + $ref: "../../specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml" From d2d7eefcd0f5f0489959f919241b232797507c8e Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 3 Oct 2024 13:07:14 -0700 Subject: [PATCH 11/16] Add example overlays for update data stream lifecycle --- .../elasticsearch-shared-overlays.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index b9621a01f4..92257ad2a3 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -243,3 +243,21 @@ actions: examples: indicesGetDataStreamResponseExample: $ref: "../../specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml" + - target: "$.paths['/_data_stream/{name}/_lifecycle']['put']" + description: "Add examples update data stream lifecycle request and response" + update: + requestBody: + content: + application/json: + examples: + indicesPutDataLifecycleRequestExample1: + $ref: "../../specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample1.yaml" + indicesPutLifecycleRequestExample2: + $ref: "../../specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml" + responses: + 200: + content: + application/json: + examples: + indicesPutDataLifecycleResponseExample1: + $ref: "../../specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml" \ No newline at end of file From d46dc04dac5403ddccd12aa96f646445e79a82ec Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 3 Oct 2024 13:13:37 -0700 Subject: [PATCH 12/16] Add example overlay for explain data stream lifecycle --- docs/overlays/elasticsearch-shared-overlays.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 92257ad2a3..b6db415512 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -260,4 +260,14 @@ actions: application/json: examples: indicesPutDataLifecycleResponseExample1: - $ref: "../../specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml" \ No newline at end of file + $ref: "../../specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml" + - target: "$.paths['/{index}/_lifecycle/explain']['get']" + description: "Add example for explain data stream lifecycle response" + update: + responses: + 200: + content: + application/json: + examples: + indicesExplainDataLifecycleResponseExample: + $ref: "../../specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml" \ No newline at end of file From eaa911efc4ee806f71d2cd770e32154232a8f00a Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 3 Oct 2024 13:34:47 -0700 Subject: [PATCH 13/16] Comment out extra example fields --- .../add_block/IndicesAddBlockResponseExample1.yaml | 8 ++++---- .../indices/analyze/indicesAnalyzeRequestExample1.yaml | 4 ++-- .../indices/clone/indicesCloneRequestExample1.yaml | 7 ++++--- .../indices/close/indicesCloseResponseExample1.yaml | 8 ++++---- .../indices/create/indicesCreateRequestExample1.yaml | 4 ++-- .../indices/create/indicesCreateRequestExample2.yaml | 4 ++-- .../indicesDataStreamStatsResponseExample1.yaml | 8 ++++---- .../IndicesDeleteDataLifecycleResponseExample1.yaml | 8 ++++---- .../IndicesExplainDataLifecycleResponseExample1.yaml | 8 ++++---- .../IndicesGetDataLifecycleResponseExample1.yaml | 8 ++++---- .../indicesGetDataStreamResponseExample1.yaml | 8 ++++---- .../indices/open/indicesOpenResponseExample1.yaml | 8 ++++---- 12 files changed, 42 insertions(+), 41 deletions(-) diff --git a/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml b/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml index 9b42ea2e47..fec4fafd17 100644 --- a/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml +++ b/specification/indices/add_block/IndicesAddBlockResponseExample1.yaml @@ -1,7 +1,7 @@ -summary: A successful response for adding an index block to an index. -description: '' -type: response -response_code: 200 +# summary: '' +description: 'A successful response for adding an index block to an index.' +# type: response +# response_code: 200 value: "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true,\n \"indices\"\ \ : [ {\n \"name\" : \"my-index-000001\",\n \"blocked\" : true\n } ]\n}" diff --git a/specification/indices/analyze/indicesAnalyzeRequestExample1.yaml b/specification/indices/analyze/indicesAnalyzeRequestExample1.yaml index 0a34b3c469..4b6f322b7a 100644 --- a/specification/indices/analyze/indicesAnalyzeRequestExample1.yaml +++ b/specification/indices/analyze/indicesAnalyzeRequestExample1.yaml @@ -1,5 +1,5 @@ summary: Perform analysis on a text string and returns the resulting tokens. method_request: GET /_analyze -description: '' -type: request +# description: '' +# type: request value: "{\n \"analyzer\" : \"standard\",\n \"text\" : \"Quick Brown Foxes!\"\n}" diff --git a/specification/indices/clone/indicesCloneRequestExample1.yaml b/specification/indices/clone/indicesCloneRequestExample1.yaml index 52ed88b345..6578cc0db6 100644 --- a/specification/indices/clone/indicesCloneRequestExample1.yaml +++ b/specification/indices/clone/indicesCloneRequestExample1.yaml @@ -1,7 +1,8 @@ summary: Clone an existing index. -method_request: POST /my_source_index/_clone/my_target_index -description: 'The API accepts `settings` and `aliases` parameters for the target index.' -type: request +# method_request: POST /my_source_index/_clone/my_target_index +description: > + Clone `my_source_index` into a new index called `my_target_index` with `POST /my_source_index/_clone/my_target_index`. The API accepts `settings` and `aliases` parameters for the target index. +# type: request value: "{\n \"settings\": {\n \"index.number_of_shards\": 5\n },\n \"aliases\"\ : {\n \"my_search_indices\": {}\n }\n}" diff --git a/specification/indices/close/indicesCloseResponseExample1.yaml b/specification/indices/close/indicesCloseResponseExample1.yaml index 5a2b8094b1..bd3bcd0dc7 100644 --- a/specification/indices/close/indicesCloseResponseExample1.yaml +++ b/specification/indices/close/indicesCloseResponseExample1.yaml @@ -1,7 +1,7 @@ -summary: A successful response for closing an index. -description: '' -type: response -response_code: 200 +# summary: '' +description: A successful response for closing an index. +# type: response +# response_code: 200 value: "{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"indices\"\ : {\n \"my-index-000001\": {\n \"closed\": true\n }\n }\n}" diff --git a/specification/indices/create/indicesCreateRequestExample1.yaml b/specification/indices/create/indicesCreateRequestExample1.yaml index af6c3011a2..21a40348d1 100644 --- a/specification/indices/create/indicesCreateRequestExample1.yaml +++ b/specification/indices/create/indicesCreateRequestExample1.yaml @@ -1,7 +1,7 @@ summary: Creates an index. -method_request: PUT /my-index-000001 +# method_request: PUT /my-index-000001 description: This request specifies the `number_of_shards` and `number_of_replicas`. -type: request +# type: request value: "{\n \"settings\": {\n \"number_of_shards\": 3,\n \"number_of_replicas\"\ : 2\n }\n}" diff --git a/specification/indices/create/indicesCreateRequestExample2.yaml b/specification/indices/create/indicesCreateRequestExample2.yaml index c6fe02528f..a64d16b63f 100644 --- a/specification/indices/create/indicesCreateRequestExample2.yaml +++ b/specification/indices/create/indicesCreateRequestExample2.yaml @@ -1,7 +1,7 @@ summary: Creates an index with mapping. -method_request: PUT /test +# method_request: PUT /test description: You can provide mapping definitions in the create index API requests. -type: request +# type: request value: "{\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n\ \ \"properties\": {\n \"field1\": { \"type\": \"text\" }\n }\n }\n}" diff --git a/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml b/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml index ad5a403c94..9f2a04a082 100644 --- a/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml +++ b/specification/indices/data_streams_stats/indicesDataStreamStatsResponseExample1.yaml @@ -1,7 +1,7 @@ -summary: A successful response for retrieving statistics for a data stream. -description: '' -type: response -response_code: 200 +# summary: '' +description: A successful response for retrieving statistics for a data stream. +# type: response +# response_code: 200 value: "{\n \"_shards\": {\n \"total\": 10,\n \"successful\": 5,\n \"failed\"\ : 0\n },\n \"data_stream_count\": 2,\n \"backing_indices\": 5,\n \"total_store_size\"\ diff --git a/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml b/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml index 6bd08372c7..2a7ab3248b 100644 --- a/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml +++ b/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponseExample1.yaml @@ -1,5 +1,5 @@ -summary: A successful response for deleting a data stream lifecycle. -description: '' -type: response -response_code: 200 +# summary: '' +description: A successful response for deleting a data stream lifecycle. +# type: response +# response_code: 200 value: "{\n \"acknowledged\": true\n}" diff --git a/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml index b01beef8bf..33e6bc7cdf 100644 --- a/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml +++ b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml @@ -1,7 +1,7 @@ -summary: A successful response for retrieving data stream lifecycle status for a data stream backing index. -description: '' -type: response -response_code: 200 +# summary: '' +description: A successful response for retrieving data stream lifecycle status for a data stream backing index. +# type: response +# response_code: 200 value: "{\n \"indices\": {\n \".ds-metrics-2023.03.22-000001\": {\n \"index\"\ \ : \".ds-metrics-2023.03.22-000001\",\n \"managed_by_lifecycle\" : true,\n\ diff --git a/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml index 43718d35e5..8b09062590 100644 --- a/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml +++ b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml @@ -1,7 +1,7 @@ -summary: A successful response of getting the lifecycle of a set of data streams. -description: '' -type: response -response_code: 200 +# summary: +description: A successful response of getting the lifecycle of a set of data streams. +# type: response +# response_code: 200 value: "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \ \ \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\":\ diff --git a/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml b/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml index 72bccb3016..8d4e633ebe 100644 --- a/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml +++ b/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml @@ -1,7 +1,7 @@ -summary: A successful response for retrieving information about a data stream. -description: '' -type: response -response_code: 200 +# summary: +description: A successful response for retrieving information about a data stream. +# type: response +# response_code: 200 value: "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \ \ \"timestamp_field\": {\n \"name\": \"@timestamp\"\n },\n \"\ diff --git a/specification/indices/open/indicesOpenResponseExample1.yaml b/specification/indices/open/indicesOpenResponseExample1.yaml index f4580dbdb8..40da9f543e 100644 --- a/specification/indices/open/indicesOpenResponseExample1.yaml +++ b/specification/indices/open/indicesOpenResponseExample1.yaml @@ -1,5 +1,5 @@ -summary: A successful response for opening an index. -description: '' -type: response -response_code: 200 +# summary: +description: A successful response for opening an index. +# type: response +# response_code: 200 value: "{\n \"acknowledged\" : true,\n \"shards_acknowledged\" : true\n}" From f5f399eaff9e07fcd130268b394af4853e4a4f38 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 3 Oct 2024 13:37:38 -0700 Subject: [PATCH 14/16] Fix extra spaces --- .../IndicesGetDataLifecycleResponseExample1.yaml | 2 +- .../get_data_stream/indicesGetDataStreamResponseExample1.yaml | 2 +- specification/indices/open/indicesOpenResponseExample1.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml index 8b09062590..b50b49f023 100644 --- a/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml +++ b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml @@ -1,4 +1,4 @@ -# summary: +# summary: description: A successful response of getting the lifecycle of a set of data streams. # type: response # response_code: 200 diff --git a/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml b/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml index 8d4e633ebe..0b992d9afb 100644 --- a/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml +++ b/specification/indices/get_data_stream/indicesGetDataStreamResponseExample1.yaml @@ -1,4 +1,4 @@ -# summary: +# summary: description: A successful response for retrieving information about a data stream. # type: response # response_code: 200 diff --git a/specification/indices/open/indicesOpenResponseExample1.yaml b/specification/indices/open/indicesOpenResponseExample1.yaml index 40da9f543e..10eb656f86 100644 --- a/specification/indices/open/indicesOpenResponseExample1.yaml +++ b/specification/indices/open/indicesOpenResponseExample1.yaml @@ -1,4 +1,4 @@ -# summary: +# summary: description: A successful response for opening an index. # type: response # response_code: 200 From 4d4d23acca9565b7e278d78f168a3344a0a7db39 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 3 Oct 2024 13:53:22 -0700 Subject: [PATCH 15/16] Comment out more example fields --- .../IndicesPutDataLifecycleRequestExample1.yaml | 8 ++++---- .../IndicesPutDataLifecycleRequestExample2.yaml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample1.yaml b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample1.yaml index db73d2ba6b..86309ad5a5 100644 --- a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample1.yaml +++ b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample1.yaml @@ -1,5 +1,5 @@ -summary: Configures a data stream lifecycle. -method_request: PUT _data_stream/my-data-stream/_lifecycle -description: Sets the lifecycle of a data stream. -type: request +summary: Set the data stream lifecycle retention +# method_request: PUT _data_stream/my-data-stream/_lifecycle +# description: Sets the lifecycle of a data stream. +# type: request value: "{\n \"data_retention\": \"7d\"\n}" diff --git a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml index 97092ef57a..1b318274b1 100644 --- a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml +++ b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequestExample2.yaml @@ -1,7 +1,7 @@ -summary: Configures a data stream lifecycle. -method_request: PUT _data_stream/my-weather-sensor-data-stream/_lifecycle +summary: Set the data stream lifecycle downsampling +# method_request: PUT _data_stream/my-weather-sensor-data-stream/_lifecycle description: This example configures two downsampling rounds. -type: request +# type: request value: "{\n \"downsampling\": [\n {\n \"after\": \"1d\",\n \"\ fixed_interval\": \"10m\"\n },\n {\n \"after\": \"7d\",\n \ From 76455d6e5768d2a35739ada2de7e833c4ff72be3 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 3 Oct 2024 13:55:01 -0700 Subject: [PATCH 16/16] Comment out more example fields --- .../IndicesPutDataLifecycleResponseExample1.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml index f31b113f12..02815ba8ec 100644 --- a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml +++ b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponseExample1.yaml @@ -1,5 +1,5 @@ -summary: A successful response for configuring a data stream lifecycle. -description: '' -type: response -response_code: 200 +# summary: +description: A successful response for configuring a data stream lifecycle. +# type: response +# response_code: 200 value: "{\n \"acknowledged\": true\n}"