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
typestringThe type indicating the schema of the object. (default: webhook_subscription)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_webhook_subscriptionselectidAcceptGets details about an existing webhook subscription.
list_webhook_subscriptionsselectAccept, limit, offset, total, filter_type, filter_idList existing webhook subscriptions.

The filter_type and filter_id query parameters may be used to only show subscriptions
for a particular service or team.

For more information on webhook subscriptions and how they are used to configure v3 webhooks
see the Webhooks v3 Developer Documentation.
create_webhook_subscriptioninsertdata__webhook_subscriptionAccept, Content-TypeCreates a new webhook subscription.

For more information on webhook subscriptions and how they are used to configure v3 webhooks
see the Webhooks v3 Developer Documentation.
delete_webhook_subscriptiondeleteidAcceptDeletes a webhook subscription.
_list_webhook_subscriptionsexecAccept, limit, offset, total, filter_type, filter_idList existing webhook subscriptions.

The filter_type and filter_id query parameters may be used to only show subscriptions
for a particular service or team.

For more information on webhook subscriptions and how they are used to configure v3 webhooks
see the Webhooks v3 Developer Documentation.
_get_webhook_subscriptionexecidAcceptGets details about an existing webhook subscription.
update_webhook_subscriptionexecidAccept, Content-TypeUpdates an existing webhook subscription.

Only the fields being updated need to be included on the request. This operation does not
support updating the delivery_method of the webhook subscription.
enable_webhook_subscriptionexecidAcceptEnable a webhook subscription that is temporarily disabled. (This API does not require a request body.)

Webhook subscriptions can become temporarily disabled when the subscription's delivery method is repeatedly rejected by the server.
test_webhook_subscriptionexecidAcceptTest a webhook subscription.

Fires a test event against the webhook subscription. If properly configured,
this will deliver the pagey.ping webhook event to the destination.

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.
AcceptstringThe Accept header is used as a versioning header.
Content-Typestring
filter_idstringThe id of the resource to filter upon.
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 for more information.

SELECT examples

Gets details about an existing webhook subscription.

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

INSERT examples

Creates a new webhook subscription.

For more information on webhook subscriptions and how they are used to configure v3 webhooks
see the Webhooks v3 Developer Documentation.

INSERT INTO pagerduty.webhooks.webhook_subscriptions (
data__webhook_subscription,
Accept,
Content-Type
)
SELECT
'{{ webhook_subscription }}' /* required */,
'{{ Accept }}',
'{{ Content-Type }}'
RETURNING
webhook_subscription
;

DELETE examples

Deletes a webhook subscription.

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

Lifecycle Methods

List existing webhook subscriptions.

The filter_type and filter_id query parameters may be used to only show subscriptions
for a particular service or team.

For more information on webhook subscriptions and how they are used to configure v3 webhooks
see the Webhooks v3 Developer Documentation.

EXEC pagerduty.webhooks.webhook_subscriptions._list_webhook_subscriptions 
@Accept='{{ Accept }}',
@limit='{{ limit }}',
@offset='{{ offset }}',
@total={{ total }},
@filter_type='{{ filter_type }}',
@filter_id='{{ filter_id }}'
;