Skip to main content
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

  • idStringRequired

    Unique identifier of the retention policy to update

Body Fields

  • nameStringRequired

    Updated display name

    Example: High CPU Auto-Restart v2

  • enabledBooleanRequired

    Whether the policy should be enabled

    Example: true

  • agentSelectorLinkedHashMapRequired

    Label selector to match target agents

    Example: (nested object)

  • conditionOpStringRequired

    Updated condition combinator

    Example: AND

  • conditionsListRequired

    Conditions for this resource

    Example: (nested array)

    • metricNameString

      Name of the metric to evaluate as a condition

      Example: cpu_usage_percent

    • operatorString

      Comparison operator (e.g. >, =, <=, ==)

      Example: >

    • thresholdLong

      Threshold value for the condition

      Example: 90

Responses

200 OK

On success, this API returns the following response structure.

  • dataObject

    The data value

    Example: (nested object)

Endpoint

PUT/api/v1/metrics/retention-policies/{id}

/api/v1/metrics/retention-policies/{id}

Operation ID

UpdatePolicy

Permalink

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.

View all change history