The PUT call on /v1/notification/rule seems to be unable to use any supplied providerConfig or notifyOn values.
A second POST call is needed to add those properties after the rule is created with a PUT.
I do not get a HTTP 400 Bad Request, when i try to include providerConfig or notifyOn in the PUT request, those are silently ignored and do not show up in the result.
The only hint at this strange behaviour is the documentation for Notifications, which states:
Once the alert is created it can be configured. Start with selecting from the list of available notification groups to notify on.
This looks like a hint about the UI flow, but actually describes the backend API behaviour, which is surprising.
This python code demonstrates the behaviour, the first PUT fails to set the notifyOn and providerConfig values.
The PUT call should accept AND process all parameters of the provided NotificationRule. It should not silently ignore parameters given in the NotificationRule object.
This should at least work for:
notifyOn
providerConfig
which are always necessary for a useful NotificationRule.
This would align the actual API behaviour with the OpenAPI documentation for createNotificationRule.
It would also better fit the PUT semantics.
It would improve performance as it reduces the amount of necessary API calls.
Current Behavior
The
PUT
call on/v1/notification/rule
seems to be unable to use any suppliedproviderConfig
ornotifyOn
values. A secondPOST
call is needed to add those properties after the rule is created with aPUT
.I do not get a HTTP 400 Bad Request, when i try to include
providerConfig
ornotifyOn
in thePUT
request, those are silently ignored and do not show up in the result.The only hint at this strange behaviour is the documentation for Notifications, which states:
This looks like a hint about the UI flow, but actually describes the backend API behaviour, which is surprising.
This python code demonstrates the behaviour, the first PUT fails to set the
notifyOn
andproviderConfig
values.Proposed Behavior
The
PUT
call should accept AND process all parameters of the providedNotificationRule
. It should not silently ignore parameters given in the NotificationRule object.This should at least work for:
notifyOn
providerConfig
which are always necessary for a useful
NotificationRule
.createNotificationRule
.PUT
semantics.Checklist