Skip to main content
Alerting & Response/Alert Rules

DryRunAlertRuleUpdate

Dry-run an update to preview changes without persisting them

POST/api/v1/alerting/rules/{ruleId}/dry-run

Operation ID

DryRunAlertRuleUpdate

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

  • ruleId
    StringRequired

    UUID of the rule to dry-run update against

Body Fields

  • input
    ObjectRequired

    New rule input to validate against current state

    • name
      String

      Rule name to validate

      Example: High CPU Usage

    • promql
      String

      PromQL expression for the rule

      Example: avg(cpu_usage_percent) > 90

    • threshold
      Long

      Threshold value for the rule

      Example: 90

    • for
      String

      Duration string for the for clause

      Example: 5m

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • wouldSucceed
    Boolean

    Whether the update would succeed if applied

    Example: true

  • changedFields
    List

    Fields that would be changed by the update

    Example: (nested array)

    • field
      String

      Name of the field that changed

      Example: threshold

    • oldValue
      String

      Previous value of the field

      Example: 90

    • newValue
      String

      New value of the field

      Example: 85

  • validationErrors
    List

    Validation errors that would prevent the update

    Example: item1,item2

  • warnings
    List

    Non-blocking warnings about the update

    Example: item1,item2