Ensure Grafana is running with unified alerting enabled (default in recent versions); confirm at /api/v1/provisioning/alert-rules returns a valid response
POST to '/api/v1/provisioning/alert-rules' with a JSON body containing 'title', 'ruleGroup', 'folderUID', 'condition' (the refId of the alert condition query), 'data' (array of query objects), and 'noDataState'/'execErrState' handling
Each query object in 'data' needs 'refId', 'datasourceUid', 'model' (raw datasource query), and optionally 'relativeTimeRange'
To update an existing rule, PUT to '/api/v1/provisioning/alert-rules/{uid}' with the full updated rule body including the existing UID
Configure notification policies via '/api/v1/provisioning/policies' to route alerts to contact points created at '/api/v1/provisioning/contact-points'
Known gotchas
Unified alerting rules are scoped to folders (not dashboard panels); legacy dashboard alerts are not migrated automatically and use a different API path
The 'condition' field must reference a refId that exists in the 'data' array and produces a single numeric value; referencing a time-series query directly causes evaluation errors
Provisioning API endpoints require an Admin service account token; Editor tokens are rejected even for creating rules in folders the editor has access to
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp