Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,48 @@ export class Response {
}

class DataStreamLifecycleExplain {
/*
* The name of the backing index.
*/
index: IndexName
/*
* Indicates if the index is managed by the data stream lifecycle.
*/
managed_by_lifecycle: boolean
/*
* The creation date of the index in milliseconds.
*/
index_creation_date_millis?: EpochTime<UnitMillis>
/*
* The time since the index was created.
*/
time_since_index_creation?: Duration
/*
* The rollover date of the index in milliseconds.
*/
rollover_date_millis?: EpochTime<UnitMillis>
/*
* The time since the index was rolled over.
*/
time_since_rollover?: Duration
/*
* The lifecycle of the index.
*/
lifecycle?: DataStreamLifecycleWithRollover
/*
* The generation time of the index.
*/
generation_time?: Duration
error?: string
/*
* @availability stack since=9.6.0 stability=stable
* The status of the frozen transition.
*/
frozen_transition_status?: string
Comment thread
lcawl marked this conversation as resolved.
Resolved
/*
* @availability stack since=9.6.0 stability=stable
* @availability serverless
* The reason if the index is not managed by the lifecycle.
*/
unmanaged_reason?: string
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
availability: [stack]
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.
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 status for this 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\
\ \"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}"
value: |-
{
"indices": {
".ds-my-data-stream-test-4-2026.10.20-000001": {
"index": ".ds-my-data-stream-test-4-2026.10.20-000001",
"managed_by_lifecycle": true,
"index_creation_date_millis": 1792460913455,
"time_since_index_creation": "1.31m",
"lifecycle": {
"enabled": true,
"data_retention": "7d",
"effective_retention": "7d",
"retention_determined_by": "data_stream_configuration",
"frozen_after": "30d"
},
"frozen_transition_status": "waiting"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,41 @@ 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}"
value: |-
{
"indices": {
".ds-my-data-stream-test-2026.10.17-000001": {
"index": ".ds-my-data-stream-test-2026.10.17-000001",
"managed_by_lifecycle": true,
"index_creation_date_millis": 1792195511314,
"time_since_index_creation": "3.07d",
"rollover_date_millis": 1792440980120,
"time_since_rollover": "5.51h",
"generation_time": "5.51h",
"lifecycle": {
"enabled": true,
"data_retention": "30d",
"effective_retention": "30d",
"retention_determined_by": "data_stream_configuration"
},
"error": {
"first_occurrence_millis": 1792441580075,
"message": """{"type":"exception","reason":"Force merge request only had 1 successful shards out of a total of 2"}""",
"last_recorded_millis": 1792460779960,
"retry_count": 52
}
},
".ds-my-data-stream-test-2026.10.19-000002": {
"index": ".ds-my-data-stream-test-2026.10.19-000002",
"managed_by_lifecycle": true,
"index_creation_date_millis": 1792440980129,
"time_since_index_creation": "5.51h",
"lifecycle": {
"enabled": true,
"data_retention": "30d",
"effective_retention": "30d",
"retention_determined_by": "data_stream_configuration"
}
}
}
}
Loading