Updating Notification Policy Tree

Hello all,

For version v10.3.3, I am attempting to update my notification policy tree from Postman in order to test an automation engine I am building. I feel like I have ran over the documentation enough to be stumped and need some clarification.

My headers for this request have the Authorization Bearer token, Content-Type of application/json, and X-Disable-Provenance set to false. I am able to update/create alerts and contact points but the notification policy tree has been giving me trouble.

When I try to PUT the notification policy tree with the export from Grafana in Postman without making any edits, it comes back with this:
image

When I try to PUT the notification policy tree with what comes back from the GET in Postman without making any edits, it comes back with this:
image

Not too sure how exporting doesn’t work or what is returned from the GET request doesn’t work. I have tried to follow this documentation in order to get it exactly the same as what is expected with no resolution.

I feel the same with docs. Why climb the tree when you can bend it’s branch?

Took your advice but not sure I found the notification policy PUT statement. The closest I got looks like this:

Which doesn’t match any of the docs or swagger-ui format. If you nest down into the route property, that is the whole notification policy tree but then I am running back into the same issue of there being a missing receiver/bad request. On top of that, I guess our swagger isn’t configured correctly because it is doing /api/api instead of just /api which leads to resources not being found.

Based on all of this, makes me think that Grafana may be using the same API as from the docs but how they send in the request is parsed by some Grafana server-function that isn’t visible.

Question: The UI allows you to not set a receiver but it seems to me that the API requires there to be a receiver set. Is that true?

Found the solution but it is not one that I am too crazy about. It would appear that when provisioning, you MUST have a receiver attached to each node even though when you are in the UI, you can leave it blank and it is saved just fine and operates as expected.

Would this be cause for an issue within Grafana’s repo? I feel like it isn’t good to have required validation in one place and not the other and I would just let the end-user be able to leave it blank.