Update the data stream lifecycle of the specified data streams.
Path parameters
-
Comma-separated list of data streams used to limit the request. Supports wildcards (
*). To target all data streams use*or_all.
Query parameters
-
Type of data stream that wildcard patterns can match. Supports comma-separated values, such as
open,hidden. Valid values are:all,hidden,open,closed,none.Values are
all,open,closed,hidden, ornone. -
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1or0. -
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1or0.
Body
-
A duration. Units can be
nanos,micros,ms(milliseconds),s(seconds),m(minutes),h(hours) andd(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
If defined, it turns data stream lifecycle on/off (
true/false) for this data stream. A data stream lifecycle that's disabled (enabled:false) will have no effect on the data stream.
PUT _data_stream/my-data-stream/_lifecycle
{ } <1>
curl \
--request PUT 'http://api.example.com/_data_stream/{name}/_lifecycle' \
--header "Content-Type: application/json" \
--data '"{ } \u003c1\u003e"'
{ } <1>
{
"data_retention": "7d"
}
{
"downsampling": [
{
"after": "1d",
"fixed_interval": "10m"
},
{
"after": "7d",
"fixed_interval": "1d"
}
]
}
{
"acknowledged": true
}