Mutations
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.
Template for Query:
mutation CreateWebhook($webhook: createWebhookInput!){
createWebhook(webhook: $webhook) {
#CreateWebhook Fields
}
}
Template for Query Variables:
{
"webhook" : "<SOME-CREATEWEBHOOK-INPUT-TYPE-SCALAR-VALUE>"
}
Arguments
webhook* createWebhookInput non-null | The object that contains the details of the webhook to be created. |
* Required
Possible Returns
Value Type | Description |
---|---|
Webhook | Represents a webhook that monitors the creation of a milestone on a component. |
Examples
Example 1
This example creates a webhook using the createwebhook mutation.
Query:
mutation CreateWebhook($webhookId: CreateWebhookInput!) {
id
callbackURL
}
Query Variables:
{
"webhook" : {
"componentId" : "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfkJOeUsydk1Ua20ySFdPWEE1M1oyMWNfYWdhfnFyTWxHTjFubzFzeWJVOWNXaU43WjI",
"eventType" : "MILESTONE_CREATED",
"callbackURL" : "https://www.getpostman.com/oauth2/callback",
"expiresOn" : "2022-04-01T07:03:10.918Z"
}
}
Show More
Response:
{
"data": {
"createWebhook": {
"id": "c7aa4a81-20ff-4fa5-88f4-312357cdbb88",
"callbackURL": "https://www.getpostman.com/oauth2/callback"
}
}
}
Show More