Updating alert rules via API

Hi guys,

I am trying update 1000s of alerts that were added over the years and wanted to do it via API. I managed to create a script that will traverse through all namespaces,groups pull the alert definition and update the alerts by adding new labels. I need new labels as I have added new notification policies that will ship those alerts to a different endpoints externally.

The problem with this approach is that after I call provisioning API those alerts will become read only in UI and our devs want to be able to amend them via UI and not using terraform and again with API.

My question is is there a way to update those alerts programatically without using provisioning API and leave them editable in UI?

I am using grafana 10.4.0

2 Likes