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

ImportAlertRules

Import alert rules from a JSON bundle with conflict resolution

Execution Availability

Try It Out

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

Request Inputs

Body Fields

  • tenantIdStringRequired

    Tenant identifier to import rules into

    Example: tenant-001

  • jsonContentStringRequired

    JSON content containing the rules to import

    Example: {...}

  • conflictActionStringRequired

    Conflict resolution strategy: skip, overwrite, or rename

    Example: skip

Responses

200 OK

On success, this API returns the following response structure.

  • totalInteger

    Total number of rules processed

    Example: 10

  • createdInteger

    Number of rules successfully created

    Example: 7

  • updatedInteger

    Number of rules updated (overwritten)

    Example: 2

  • skippedInteger

    Number of rules skipped due to conflicts

    Example: 20

  • renamedInteger

    Number of rules renamed to avoid conflicts

    Example: 1

  • failedInteger

    Number of rules that failed to import

    Example: 20

  • itemsList

    Per-rule import results

    Example: (nested array)

    • ruleNameString

      Name of the rule that was processed

      Example: High CPU Usage

    • statusString

      Import status: created, updated, skipped, or failed

      Example: created

    • errorString

      Error message if the import failed for this rule

      Example: connection refused

Endpoint

POST/api/v1/alerting/rules/import

/api/v1/alerting/rules/import

Operation ID

ImportAlertRules

Permalink

Request Example

curl -X POST '{host}/api/v1/alerting/rules/import' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"tenantId":"tenant-001","jsonContent":"{...}","conflictAction":"skip"}'

Response Example

200
{
  "total": 10,
  "created": 7,
  "updated": 2,
  "skipped": 20,
  "renamed": 1,
  "failed": 20,
  "items": [
    {}
  ]
}

Change History

This API has no change history records yet.

View all change history