Webhook add a payload wrapper with more information #15238
Replies: 2 comments 3 replies
-
Hi @royberris, Thanks for your input here 😄 While we agree with the principle in this feature request, we believe it would be a mistake to go about it with a wrapper object. This wouldn't solve the deserialization issue on the receiving and, only (perhaps) make it slightly smaller. Another issue with the wrapper is that it very quickly turns into something core specific (i.e. Instead we suggest adding custom request headers to the webhook requests. We could then add default headers containing the triggering event, the retry count, maybe also the category and the request timestamp (as individual headers, of course). And at a later stage, each webhook implementation could supply its own custom headers too, i.e. adding the content type header for content related events. Thoughts? |
Beta Was this translation helpful? Give feedback.
-
A little update is due here. When executing a webhook we already append an As an example, the triggering event could be |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
With the introduction of the Webhook feature in Umbraco 13 I am missing some context when receiving webhooks.
a. The content does have the content published datetime, but that is not the (original) webhook sent datetime
b. The media does not have a date at all, which will benefit from a (original) webhook sent datetime
While the configuration of the webhook itself will present context in most places (like the endpoint might give context on what it should receive). There is no support for a generic endpoint that will place things on a queue to be processed asynchronously on the receiving side. Which is common in a event based architecture.
I'd like to introduce a payload wrapper which will be generic for any webhook that is called. It will have generic information about the webhook instead of only the payload itself.
Above is an example and more data might need to be added, or naming should be changed. But I believe it gives an impression.
I see that the implementation of the webhook right now is based on the Content Delivery API. But when working with webhooks I believe it requires some more context for the receiving party because Umbraco is the one doing the request and not the other way around as it is with the Content Delivery API.
Beta Was this translation helpful? Give feedback.
All reactions