Create contact point non provisioned

Hello team,

I want to create contact point in grafana using non provisioned as provisioned will not allow us to edit or modify.

Any curl post http API which will help to create the non provisioned contact point in grafana.

when I tried to create manually and I inspected the UI network and saw the POST call to create it ip:3000/api/alertmanager/grafana/config/api/v1/alerts

The same API i tried to create the contact point but it failed

Can anyone help me?

Thanks in Advance

Thanks& regards,
Bharath Kumar.

Doc is your friend:

By default, you cannot edit API-provisioned alerting resources in Grafana. To enable editing these resources in the Grafana UI, add the X-Disable-Provenance header to the following requests in the API: …

Thank you so much.

Hello @jangaraj

response=$(curl -s -w “\nHTTP_STATUS_CODE:%{http_code}” -X POST
-H “X-Disable-Provenance”
-H “Authorization: Bearer $GRAFANA_TOKEN”
-H “Content-Type: application/json”
-d “$payload”
“$GRAFANA_URL/api/v1/provisioning/contact-points”)

payload:
{
“name”: “test-alert-1”,
“type”: “webhook”,
“settings”: {
“url”: “http://alert_persistent_proxy_server:5000/alerts”,
“httpMethod”: “POST”
},
“overwrite”: true
}

Even though I added X-Disable-Provenance, still i am not able to edit or modify and after executing this API I am able to see the contact point created in Grafana.

I tried other alternatives which didn’t worked?

Could you please help me if any config I am missing?

Thanks.

Try:

-H "X-Disable-Provenance: true"