/v1/series/{uuid}/lifecycle-policyReplace a series lifecycle policy
operation ID: put_v1_series_by_uuid_lifecycle_policy
Overview
Replace a series lifecycle policy. Series-storage operations expose registered series, direct stored data, gap and chunk metadata, and lifecycle controls.
When to use it
- Use it when an application needs to replace a series lifecycle policy.
- Use it when a diagnostic or maintenance tool needs storage-level series data instead of model-resolved attributes.
Quick example
Set the base URL and replace generated identifiers or credentials with values from your installation.
cURL
curl --request PUT \
--url "$ORDINATE_URL/v1/series/00000000-0000-4000-8000-000000000001/lifecycle-policy" \
--header "Authorization: Bearer $ORDINATE_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"schema": "ordinate-lifecycle-policy/v1",
"raw": {
"keep": "forever"
},
"rollups": {
"keep": "forever"
},
"annotations": {
"keep": "forever"
}
}'Expected output · 204
Lifecycle policy stored
No response body.
The cURL request sends the smallest contract-derived body and asks OrdinateDB to replace a series lifecycle policy. The documented 204 response is lifecycle policy stored.
How it works
These routes address a stable series UUID directly. Use resolved-read routes when an application should follow model bindings across time.
Reference
- Required capability
- model-edit
- Authorization scope
- handler-resolved target
Parameters
| Name | In | Required | Type and constraints |
|---|---|---|---|
uuid | path | yes | stringformat: uuid |
Request body
application/json
annotationsobjectrequired- unknown fields rejected
keepstringrequired
rawone ofrequiredone of
option 1
keepstringrequired
option 2
keep_daysintegerrequired- minimum: 0
thenstringrequired
rollupsobjectrequired- unknown fields rejected
keepstringrequired
schemastringrequiredswinging_doorobjectoptional- unknown fields rejected
maxdev_percent_of_rangenumberrequired- format: double
range_maxnumberrequired- format: double
range_minnumberrequired- format: double
Example request body
{
"schema": "ordinate-lifecycle-policy/v1",
"raw": {
"keep": "forever"
},
"rollups": {
"keep": "forever"
},
"annotations": {
"keep": "forever"
}
}Responses
204Lifecycle policy stored
No response body.
400Malformed or invalid lifecycle policy
text/plain
string401Authentication required
application/json
ErrorEnvelope
codestringrequiredcorrelation_idstringrequired- format: uuid
detailsobjectoptionalerrorstringrequired
Example 401 output
{
"error": "string",
"code": "account-sealed",
"correlation_id": "00000000-0000-4000-8000-000000000001"
}403Model-edit capability is not granted for this series
application/json
ErrorEnvelope
codestringrequiredcorrelation_idstringrequired- format: uuid
detailsobjectoptionalerrorstringrequired
Example 403 output
{
"error": "string",
"code": "account-sealed",
"correlation_id": "00000000-0000-4000-8000-000000000001"
}Code examples
These examples are generated from the source contract. Replace the base URL, credentials, identifiers, and minimal generated values for your instance.
JavaScript
const ordinateUrl = "http://localhost:8080";
const token = "<bearer-token>";
const response = await fetch(`${ordinateUrl}/v1/series/00000000-0000-4000-8000-000000000001/lifecycle-policy`, {
method: "PUT",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"schema": "ordinate-lifecycle-policy/v1",
"raw": {
"keep": "forever"
},
"rollups": {
"keep": "forever"
},
"annotations": {
"keep": "forever"
}
})
});
if (!response.ok) {
throw new Error(`OrdinateDB returned ${response.status}: ${await response.text()}`);
}
const data = null;
console.log(data);Related topics
- Wire conventions — Understand the prerequisite concepts and transport behavior for this operation.
- REST endpoint index — Find other operations in Series storage.