Alerting & Response/Alert Rules
POSTAlertingSince 1.0SynchronousAuth Required
CreateAlertRule
Create a new alert rule with threshold and notification settings
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
nameStringRequiredHuman-readable name for the new alert rule
Example: High CPU Usage
descriptionStringRequiredDetailed description of the rule purpose
Example: Alert when CPU exceeds 90%
resourceTypeStringRequiredResource type to monitor (e.g. vm, host)
Example: vm
metricNameStringRequiredMetric name to evaluate
Example: cpu_usage_percent
operatorStringRequiredComparison operator for threshold check
Example: >
Responses
Endpoint
POST/api/v1/alerting/rules
/api/v1/alerting/rules
Request Example
curl -X POST '{host}/api/v1/alerting/rules' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"High CPU Usage","description":"Alert when CPU exceeds 90%","resourceType":"vm","metricName":"cpu_usage_percent","operator":">","threshold":90.0,"duration":300,"severity":"critical","state":"enabled","notifyUrl":"https://example.com/callback","platformUuid":"plat-001-abc","type":"metric","logQuery":"level=error","logWindow":600,"actions":"(nested array)","labelSelectors":"(nested object)"}'
Response Example
200{
"uuid": "rule-abc123-def456",
"name": "High CPU Usage",
"description": "Triggers when CPU usage exceeds 90% for 5 minutes",
"resourceType": "vm",
"metricName": "cpu_usage_percent",
"operator": ">",
"threshold": 90.0,
"duration": 300
}Change History
This API has no change history records yet.
