Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 8.17] Add datastream API examples #3443

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions specification/indices/downsample/RequestExample1.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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}"
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Loading