Skip to main content
Alerting & Response/Alert Rules

ImportAlertRules

Import alert rules from a JSON bundle with conflict resolution

POST/api/v1/alerting/rules/import

Operation ID

ImportAlertRules

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

Body Fields

  • tenantId
    StringRequired

    Tenant identifier to import rules into

    Example: tenant-001

  • jsonContent
    StringRequired

    JSON content containing the rules to import

    Example: {...}

  • conflictAction
    StringRequired

    Conflict resolution strategy: skip, overwrite, or rename

    Example: skip

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • total
    Integer

    Total number of rules processed

    Example: 10

  • created
    Integer

    Number of rules successfully created

    Example: 7

  • updated
    Integer

    Number of rules updated (overwritten)

    Example: 2

  • skipped
    Integer

    Number of rules skipped due to conflicts

    Example: 20

  • renamed
    Integer

    Number of rules renamed to avoid conflicts

    Example: 1

  • failed
    Integer

    Number of rules that failed to import

    Example: 20

  • items
    List

    Per-rule import results

    Example: (nested array)

    • ruleName
      String

      Name of the rule that was processed

      Example: High CPU Usage

    • status
      String

      Import status: created, updated, skipped, or failed

      Example: created

    • error
      String

      Error message if the import failed for this rule

      Example: connection refused