Skip to main content
Alerting & Response/Alert Rules
POSTAlertingSince 1.0SynchronousAuth Required

CreateAlertInhibitionRule

Create a new inhibition rule for correlating and suppressing alerts

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • nameStringRequired

    Human-readable rule name

    Example: Suppress disk alerts when host down

  • descriptionStringRequired

    Rule description

    Example: Suppress disk alerts when host is unreachable

  • sourceMatchStringRequired

    Source alert matcher expression

    Example: alertname=HostDown

  • targetMatchStringRequired

    Target alert matcher expression

    Example: alertname=DiskFull

  • equalLabelsStringRequired

    Labels that must match between source and target

    Example: host,cluster

Responses

200 OK

On success, this API returns the following response structure.

  • uuidString

    Unique identifier of the inhibition rule

    Example: inhib-001

  • nameString

    Human-readable rule name

    Example: Suppress disk alerts when host down

  • descriptionString

    Rule description

    Example: Suppress disk alerts when host is unreachable

  • sourceMatchString

    Source alert matcher expression

    Example: alertname=HostDown

  • targetMatchString

    Target alert matcher expression to suppress

    Example: alertname=DiskFull

  • equalLabelsString

    Comma-separated labels that must match between source and target

    Example: host,cluster

  • enabledBoolean

    Whether this inhibition rule is active

    Example: true

  • createDateString

    Timestamp when the rule was created

    Example: 2026-01-15T08:00:00Z

  • lastOpDateString

    Timestamp of the last modification

    Example: 2026-01-15T08:00:00Z

Endpoint

POST/api/v1/alerting/inhibition-rules

/api/v1/alerting/inhibition-rules

Operation ID

CreateAlertInhibitionRule

Permalink

Request Example

curl -X POST '{host}/api/v1/alerting/inhibition-rules' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"Suppress disk alerts when host down","description":"Suppress disk alerts when host is unreachable","sourceMatch":"alertname=HostDown","targetMatch":"alertname=DiskFull","equalLabels":"host,cluster"}'

Response Example

200
{
  "uuid": "inhib-001",
  "name": "Suppress disk alerts when host down",
  "description": "Suppress disk alerts when host is unreachable",
  "sourceMatch": "alertname=HostDown",
  "targetMatch": "alertname=DiskFull",
  "equalLabels": "host,cluster",
  "enabled": true,
  "createDate": "example"
}

Change History

This API has no change history records yet.

View all change history