cs3org / OCM-API

OpenCloudMesh API
38 stars 11 forks source link

Notifications endpoint might also return a 202 accepted #31

Closed dvh closed 1 month ago

dvh commented 7 years ago

At the moment we assume that the only valid success response is a 201 Created. However, if the receiver wants to process the notification in another way, it might also return a 202 Accepted response to inform the sender that the notification has been received but it's not possible for the receiver to fetch the notification later, because the receiver implemented it's own notification handler.

michielbdejong commented 1 month ago

The side-effects of notifications have always been a slightly confusing part of OCM. I interpret the word 'notification' to mean that no report of completion of the actions it triggers is necessary. In fact, we consider those triggered actions as 'side effects' and not as 'completion of the request'.

For example if I notify you "your house is on fire" you may respond "201 thanks for the heads-up!", that's a notification. But if I send you "please extinguish the fire in your house" then that is not a notification but an API request, and you may respond "202 accepted".

With that analysis, and as @glpatcern mentioned in #77 this would be a breaking change, let's keep things as they are for now, closing.

michielbdejong commented 1 month ago

(see also discussion of notifications as a general collection for "anything you might do")