Alerting & Response/Alert Events
POSTAlertingSince 1.0SynchronousAuth Required
ValidateAlertExpression
Validate a PromQL expression for syntax correctness
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
expressionStringRequiredPromQL expression to validate
Example: avg(cpu_usage_percent) > 90
Responses
Endpoint
POST/api/v1/alerting/dry-run/validate
/api/v1/alerting/dry-run/validate
Request Example
curl -X POST '{host}/api/v1/alerting/dry-run/validate' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"expression":"avg(cpu_usage_percent) > 90"}'
Response Example
200{
"valid": true,
"parseError": "connection refused",
"errorPosition": 20,
"suggestion": "consider increasing the threshold",
"exprType": "instant"
}Change History
This API has no change history records yet.
