Was this article helpful?
Thanks for your feedback
When a webhook is triggered for an entry or asset because it was published/unpublished via a release, the webhook data of such an event contains a source key. This key contains the JSON data of the release (type, title, and uid) through which it was deployed.
This is useful in cases where a lot depends on the webhook data. For example, in the case of static site generators, a build is generated every time an item (entry or asset) is published or unpublished. So, if a release is deployed with 200 items, it will generate a build 200 times, instead of just one time for the release. To avoid such cases, the developer can write custom code that ignores events whose response contains the source key. So, only one build will be generated for the whole release.
Here's what's added to the webhook data:
{ "event": "publish", "source": { "title": "March'19 Release", "uid": "blt1111111d11cd111a", "type": "release" }, "data": { ... }, "api_key": "blt2222d2ad222beedc", "module": "entry", "triggered_at": "2019-03-07T04:55:11.352Z" }
Was this article helpful?
Thanks for your feedback