Question about moving from general to product webhooks

Hi,
I was wondering if there is a nice way to convert to using the webhooks via products instead of the general webhooks without potentially duplicating or losing data.

We have several products and currently use the top level webhooks but might benefit from the more granular product webhooks so will potentially switch.
The webhook endpoints would be remaining the same for the time being so I think there is potential for some duplication if we setup the webhooks in the products beforehand?

Maybe this is just a case of having to deal with some duplication for a short time while setting up the webhooks per product?

Many thanks

Because an event can trigger a webhook in both the product and the device owner account, it will be nearly impossible to not either duplicate, or lose, events. However, you can create the new webhook and delete the old webhook fairly quickly, so the period of time you get duplicates should be small.

Helpful hint: Don’t delete the old account webhook. Prefix the event name with DISABLED or something like that you you can easily revert if it something goes wrong.

Using the CLI to upload webhook JSON files is also a good way to rapidly deploy a set of webhooks within a few seconds, reducing the duplication window. You can create the webhooks with the web-based editor and then save the JSON to a file to upload with the CLI instead of typing in the JSON by hand, if you want.

Understood, thanks for your help.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.