Skip to main content
Infrastructure/Metrics Catalog

UpdatePolicy

Update the configuration of an existing retention policy.

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

Operation ID

UpdatePolicy

Since

1.0.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Path Parameters

  • id
    StringRequired

    Unique identifier of the retention policy to update

Body Fields

  • name
    StringRequired

    Updated display name

    Example: High CPU Auto-Restart v2

  • enabled
    BooleanRequired

    Whether the policy should be enabled

    Example: true

  • agentSelector
    LinkedHashMapRequired

    Label selector to match target agents

    Example: (nested object)

  • conditionOp
    StringRequired

    Updated condition combinator

    Example: AND

  • conditions
    ListRequired

    Conditions for this resource

    Example: (nested array)

    • metricName
      String

      Name of the metric to evaluate as a condition

      Example: cpu_usage_percent

    • operator
      String

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

      Example: >

    • threshold
      Long

      Threshold value for the condition

      Example: 90

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • data
    Object

    The data value

    Example: (nested object)