v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
Security Monitoring

Test a notification rule

Send a notification preview to test that a notification rule's targets are properly configured.

post/api/v2/security_monitoring/configuration/notification_rules/send_notification_preview

Request body

Example request

{
  "data": {
    "attributes": {
      "enabled": true,
      "name": "Rule 1",
      "routing": {
        "mode": "manual"
      },
      "selectors": {
        "query": "(source:production_service OR env:prod)",
        "rule_types": [
          "misconfiguration",
          "attack_path"
        ],
        "severities": [
          "critical"
        ],
        "trigger_source": "security_findings"
      },
      "targets": [
        "@john.doe@email.com"
      ],
      "time_aggregation": 86400
    },
    "type": "notification_rules"
  }
}

Response

OK

Example response

{
  "data": {
    "attributes": {
      "preview_results": [
        {
          "notification_status": "DEFAULT",
          "rule_type": "log_detection"
        }
      ]
    },
    "id": "rka-loa-zwu",
    "type": "notification_preview_response"
  }
}