Edit alerts created by file provisioning

Hi,

I’m currently working on upgrading an old Grafana instance to the new unified alerting. The old instance used the legacy alerting and therefore provisioned alerts indirectly using the dashboards and file provisioning.
It was and still is possible for dashboards to be editable in the UI, even though they were initially provisioned by setting allowUiUpdates to true. This allowed us to change dashboards and therefore alerts in the UI. The same is true for datasources by setting editable to true.

We are now using the new unified alerting and file provisioning to provision the alerts. However, I’m unable to find a way to allow the editing of alerts that are provisioned.
Is there currently a way to enabling this functionality similar to datasources and dashboards?

welcome to the :grafana: community @gh7531

try to modify the alert via API using this header in your request :

x-disable-provenance

note; i am not sure it will work because it needs to be used when the resource is created

Thank you for the suggestion, but it does not seem to work.

I tried the following statements:

request

curl --location --request PUT 'xxx/api/v1/provisioning/alert-rules/ccqpFcf4k' \
--header 'x-disable-provenance;' \
--header 'Content-Type: application/json' \
--header 'Cookie: SESSION=xxx' \
--data '{
    "id": 1,
    "uid": "ccqpFcf4k",
    ...
}'

response

{
    "message": "cannot changed provenance from 'file' to ''",
    "traceID": ""
}`

request

curl --location --request PUT 'xxx/api/v1/provisioning/alert-rules/ccqpFcf4k' \
--header 'Content-Type: application/json' \
--header 'Cookie: SESSION=xxx' \
--data '{
    "id": 1,
    "uid": "ccqpFcf4k",
    ...
}'

response

{
    "message": "cannot changed provenance from 'file' to 'api'",
    "traceID": ""
}