Skip to main content

webhook_subscriptions

Creates, updates, deletes, gets or lists a webhook_subscriptions resource.

Overview

Namewebhook_subscriptions
TypeResource
Idpagerduty.webhooks.webhook_subscriptions

Fields

The following fields are returned by SELECT queries:

The webhook subscription that was requested.

NameDatatypeDescription
idstring
activebooleanDetermines whether this subscription will produce webhook events.
delivery_methodobject
descriptionstringA short description of the webhook subscription.
eventsarrayThe set of outbound event types the webhook will receive.
filterobject
oauth_clientobjectOAuth client details. This field is populated in responses when oauth_client_id is set.
typestringThe type indicating the schema of the object. (webhook_subscription) (default: webhook_subscription)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectidGets details about an existing webhook subscription.<br /><br />Scoped OAuth requires: webhook_subscriptions.read<br />
listselectlimit, offset, total, filter_type, filter_idList existing webhook subscriptions.<br /><br />The filter_type and filter_id query parameters may be used to only show subscriptions<br />for a particular service or team.<br /><br />For more information on webhook subscriptions and how they are used to configure v3 webhooks<br />see the [Webhooks v3 Developer Documentation](https:​//developer.pagerduty.com/docs/webhooks/v3-overview/).<br /><br />Scoped OAuth requires: webhook_subscriptions.read<br />
createinsertwebhook_subscriptionCreates a new webhook subscription.<br /><br />For more information on webhook subscriptions and how they are used to configure v3 webhooks<br />see the [Webhooks v3 Developer Documentation](https:​//developer.pagerduty.com/docs/webhooks/v3-overview/).<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br />
updateupdateidUpdates an existing webhook subscription.<br /><br />Only the fields being updated need to be included on the request. This operation does not<br />support updating the delivery_method of the webhook subscription.<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br />
deletedeleteidDeletes a webhook subscription.<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br />
enableexecidEnable a webhook subscription that is temporarily disabled. (This API does not require a request body.)<br /><br />Webhook subscriptions can become temporarily disabled when the subscription's delivery method is repeatedly rejected by the server.<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br />
pingexecidTest a webhook subscription.<br /><br />Fires a test event against the webhook subscription. If properly configured,<br />this will deliver the pagey.ping webhook event to the destination.<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br />

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringThe ID of the resource.
filter_idstringThe id of the resource to filter upon. Required if filter_type is service or team.
filter_typestringThe type of resource to filter upon.
limitintegerThe number of results per page.
offsetintegerOffset to start pagination search results.
totalbooleanBy default the total field in pagination responses is set to null to provide the fastest possible response times. Set total to true for this field to be populated. See our [Pagination Docs](https:​//developer.pagerduty.com/docs/rest-api-v2/pagination/) for more information.

SELECT examples

Gets details about an existing webhook subscription.<br /><br />Scoped OAuth requires: webhook_subscriptions.read<br />

SELECT
id,
active,
delivery_method,
description,
events,
filter,
oauth_client,
type
FROM pagerduty.webhooks.webhook_subscriptions
WHERE id = '{{ id }}' -- required
;

INSERT examples

Creates a new webhook subscription.<br /><br />For more information on webhook subscriptions and how they are used to configure v3 webhooks<br />see the [Webhooks v3 Developer Documentation](https:​//developer.pagerduty.com/docs/webhooks/v3-overview/).<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br />

INSERT INTO pagerduty.webhooks.webhook_subscriptions (
webhook_subscription
)
SELECT
'{{ webhook_subscription }}' /* required */
RETURNING
webhook_subscription
;

UPDATE examples

Updates an existing webhook subscription.<br /><br />Only the fields being updated need to be included on the request. This operation does not<br />support updating the delivery_method of the webhook subscription.<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br />

UPDATE pagerduty.webhooks.webhook_subscriptions
SET
webhook_subscription = '{{ webhook_subscription }}'
WHERE
id = '{{ id }}' --required
RETURNING
webhook_subscription;

DELETE examples

Deletes a webhook subscription.<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br />

DELETE FROM pagerduty.webhooks.webhook_subscriptions
WHERE id = '{{ id }}' --required
;

Lifecycle Methods

Enable a webhook subscription that is temporarily disabled. (This API does not require a request body.)<br /><br />Webhook subscriptions can become temporarily disabled when the subscription's delivery method is repeatedly rejected by the server.<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br />

EXEC pagerduty.webhooks.webhook_subscriptions.enable
@id='{{ id }}' --required
;