-
Notifications
You must be signed in to change notification settings - Fork 65
Description
I would like to be able to update webhooks using the contentful space import
command. Currently, the command only capable of creating webhooks, but fails when attempting to update them.
Expected Behavior
The import of a webhook with an existing id results in a successful update.
Actual Behavior
The import fails with the following error:
Possible Solution
Based on a superficial analysis, it should be enough to populate the webhooks
field of AllDestinationData in getDestinationData(), since it's currently set to an empty array.
Steps to Reproduce
- Create a webhook in a space.
- Export the webhook definition of that space using the
contentful space export
command. - Change the name of the webhook in the exported file.
- Import the webhook in the same space using the
contentful space import
command.
Context
I want to maintain my webhooks using an infrastructure as code approach. The contentful space import
command seemed like a perfect fit. However, due to this limitation I was forced to implement a custom solution. I would like to not have to maintain a custom solution and instead be able to utilize the official CLI.
Environment
See the X-Contentful-User-Agent
HTTP header in the Actual Behavior section.