Infrastructure/Metrics Catalog
PUTInfrastructureSince 1.0SynchronousAuth Required
UpdatePolicy
Update the configuration of an existing retention policy.
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
idStringRequiredUnique identifier of the retention policy to update
Body Fields
nameStringRequiredUpdated display name
Example: High CPU Auto-Restart v2
enabledBooleanRequiredWhether the policy should be enabled
Example: true
agentSelectorLinkedHashMapRequiredLabel selector to match target agents
Example: (nested object)
conditionOpStringRequiredUpdated condition combinator
Example: AND
conditionsListRequiredConditions for this resource
Example: (nested array)
metricNameStringName of the metric to evaluate as a condition
Example: cpu_usage_percent
operatorStringComparison operator (e.g. >, =, <=, ==)
Example: >
thresholdLongThreshold value for the condition
Example: 90
Responses
Endpoint
PUT/api/v1/metrics/retention-policies/{id}
/api/v1/metrics/retention-policies/{id}
Request Example
curl -X PUT '{host}/api/v1/metrics/retention-policies/{id}' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"High CPU Auto-Restart v2","enabled":true,"agentSelector":"(nested object)","conditionOp":"AND","conditions":"(nested array)","action":"restart_service","actionParams":"(nested object)","cooldownSec":600,"verifyAfterSec":60,"maxRetries":5}'
Response Example
200{
"data": null
}Change History
This API has no change history records yet.
