Queries
webhook
Returns a webhook by ID.
Currently, you can create a webhook to monitor the creation of milestones on a component. Once the webhook is created, the system sends a notification whenever a milestone is created on the specified component. The URL that the notification must be sent to and the ID of the component to monitor are specified by the argument passed to the mutation.
Template for Query:
query GetWebhook($webhookId: String!) {
webhook(webhookId: $webhookId) {
# Webhook Fields
}
}
Template for Query Variables:
{
"webhookId" : "<SOME-STRING-TYPE-SCALAR-VALUE>"
}
Arguments
webhookId* String! non-null | The ID of the webhook to return. |
* Required
Possible Returns
Value Type | Description |
---|---|
Webhook | Represents a webhook that monitors the creation of a milestone on a component. |
Example
Example 1
This example retrieves the subscription details of a webhook. It requests the webhook by its ID and displays the callback URL.
Query:
query GetMyWebhook($webhookId: String!) {
webhook(webhookId: $webhookId) {
id
callbackURL
}
}
Query Variables:
{
"webhookId": "c7aa4a81-20ff-4fa5-88f4-312357cdbb88"
}
Response:
{
"data": {
"webhook": {
"id": "c7aa4a81-20ff-4fa5-88f4-312357cdbb88",
"callbackURL": "https://www.getpostman.com/oauth2/callback"
}
}
}
Show More