Inputs
CreateWebhookInput
Contains the options for creation of a webhook.
Fields
componentId* ID! non-null | Specifies the ID of the component that triggers the webhhook. |
eventType* WebhookEventTypeEnum! non-null | Specifies the event to subscribe to. Whenever the event occurs for the specified component, the system will send a POST request (a Callback) to the URL you specify as the value for the callbackURL field. Currently, only supports MILESTONE_CREATED . |
callbackURL* String! non-null | The URL the event notification must be sent to. |
filters | An optional array of filters (JsonPath format strings) for properties of the callback payload, which must match for the notification to be delivered. For example, you could set a filter to the name of a milestone ("$[?(@.data.milestone=='XXX')]" ). As a result, the system sends notifications only for the creation of the milestone with the specified name. Not for others. |
expiresOn | The date and time the webhook is set to expire, at which time the webhook is deleted. If you do not specify a value for expiration , the system automatically sets it to one year from the creation date. |
secretToken | An optional token to be used to sign the callback payload. Must be alphanumeric. Minimum length is 32 characters. Maximum length is 64 characters. When secretToken is specified, the system uses it to generate a hash signature for each callback payload. It then sends the hash with the callback request using the header x-adsk-signature . To ensure that the request is authentic, subscribers must compute a hash using their token and verify that it matches the hash specified by x-adsk-signature . Forge Data Eventing uses an HMAC hexdigest to compute the hash. |
* Required
Where Used
Usage | Used By | Description |
---|---|---|
Input for Mutation | createWebhook | Creates a Webhook. A Webhook is a way for Forge to send you a notification when an event that you are interested in occurs. For more information on Webhooks, see Using Webhooks with This API in the Developer’s Guide. |