grafana-alert-rule-api
Installation
SKILL.md
Grafana Alert Rule Provisioning API
Overview
Editing Grafana-managed alert rules over /api/v1/provisioning/alert-rules has five traps that all return 200 (or a confusing 409) while doing the wrong thing. Every one has cost real debugging time.
The traps
1. provenance decides your headers — check per rule
Rules created via the API carry "provenance": "api"; rules created in the UI have no provenance field. A folder can contain both. Test before writing:
curl -s -H "Authorization: Bearer $TOKEN" \
"$GRAFANA/api/v1/provisioning/alert-rules/$RULE_UID" | jq 'has("provenance")'