From 622b81b1f3ab83039a54ca85b8b09b8e962a5704 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:27:49 -0800 Subject: [PATCH] Add datastream examples (#3429) (#3443) (cherry picked from commit 683239bf9473ec921c59f13a8be37f7eb97a1b68) Co-authored-by: Lisa Cawley --- .../indices/downsample/RequestExample1.yaml | 6 ++++++ .../IndicesExplainDataLifecycleResponseExample1.yaml | 5 +++-- .../IndicesExplainDataLifecycleResponseExample2.yaml | 12 ++++++++++++ .../IndicesGetDataLifecycleResponseExample1.yaml | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 specification/indices/downsample/RequestExample1.yaml create mode 100644 specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample2.yaml diff --git a/specification/indices/downsample/RequestExample1.yaml b/specification/indices/downsample/RequestExample1.yaml new file mode 100644 index 0000000000..9fb58afbac --- /dev/null +++ b/specification/indices/downsample/RequestExample1.yaml @@ -0,0 +1,6 @@ +# summary: +# method_request: POST /my-time-series-index/_downsample/my-downsampled-time-series-index +# description: '' +# type: request +value: + fixed_interval: 1d diff --git a/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml index 33e6bc7cdf..44ca833647 100644 --- a/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml +++ b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample1.yaml @@ -1,5 +1,6 @@ -# summary: '' -description: A successful response for retrieving data stream lifecycle status for a data stream backing index. +summary: Successful response +description: > + A successful response from `GET .ds-metrics-2023.03.22-000001/_lifecycle/explain`, which retrieves the lifecycle status for a data stream backing index. If the index is managed by a data stream lifecycle, the API will show the `managed_by_lifecycle` field set to `true` and the rest of the response will contain information about the lifecycle execution status for this index. # type: response # response_code: 200 value: diff --git a/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample2.yaml b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample2.yaml new file mode 100644 index 0000000000..0cc3d2197f --- /dev/null +++ b/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponseExample2.yaml @@ -0,0 +1,12 @@ +summary: Successful response with error messages +description: The API reports any errors related to the lifecycle execution for the target index. +# type: response +# response_code: '' +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 \"lifecycle\" : {\n \"enabled\": true\n },\n \ + \ \"error\": \"{\\\"type\\\":\\\"validation_exception\\\",\\\"reason\\\":\\\"\ + Validation Failed: 1: this action would add [2] shards, but this cluster\ncurrently\ + \ has [4]/[3] maximum normal shards open;\\\"}\"\n }\n}" diff --git a/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml index b50b49f023..135c33c797 100644 --- a/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml +++ b/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponseExample1.yaml @@ -1,5 +1,5 @@ # summary: -description: A successful response of getting the lifecycle of a set of data streams. +description: A successful response from `GET _lifecycle/stats?human&pretty`. # type: response # response_code: 200 value: