webhook_subscriptions
Creates, updates, deletes, gets or lists a webhook_subscriptions resource.
Overview
| Name | webhook_subscriptions |
| Type | Resource |
| Id | pagerduty.webhooks.webhook_subscriptions |
Fields
The following fields are returned by SELECT queries:
- get
- list
The webhook subscription that was requested.
| Name | Datatype | Description |
|---|---|---|
id | string | |
active | boolean | Determines whether this subscription will produce webhook events. |
delivery_method | object | |
description | string | A short description of the webhook subscription. |
events | array | The set of outbound event types the webhook will receive. |
filter | object | |
oauth_client | object | OAuth client details. This field is populated in responses when oauth_client_id is set. |
type | string | The type indicating the schema of the object. (webhook_subscription) (default: webhook_subscription) |
A set of webhook subscriptions matching the request.
| Name | Datatype | Description |
|---|---|---|
id | string | |
active | boolean | Determines whether this subscription will produce webhook events. |
delivery_method | object | |
description | string | A short description of the webhook subscription. |
events | array | The set of outbound event types the webhook will receive. |
filter | object | |
oauth_client | object | OAuth client details. This field is populated in responses when oauth_client_id is set. |
type | string | The type indicating the schema of the object. (webhook_subscription) (default: webhook_subscription) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id | Gets details about an existing webhook subscription.<br /><br />Scoped OAuth requires: webhook_subscriptions.read<br /> | |
list | select | limit, offset, total, filter_type, filter_id | List 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 /> | |
create | insert | webhook_subscription | 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 /> | |
update | update | id | 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 /> | |
delete | delete | id | Deletes a webhook subscription.<br /><br />Scoped OAuth requires: webhook_subscriptions.write<br /> | |
enable | exec | id | 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 /> | |
ping | exec | id | Test 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.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
filter_id | string | The id of the resource to filter upon. Required if filter_type is service or team. |
filter_type | string | The type of resource to filter upon. |
limit | integer | The number of results per page. |
offset | integer | Offset to start pagination search results. |
total | boolean | By 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
- get
- list
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
;
List 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 />
SELECT
id,
active,
delivery_method,
description,
events,
filter,
oauth_client,
type
FROM pagerduty.webhooks.webhook_subscriptions
WHERE limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND total = '{{ total }}'
AND filter_type = '{{ filter_type }}'
AND filter_id = '{{ filter_id }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: webhook_subscriptions
props:
- name: webhook_subscription
value:
id: "{{ id }}"
type: "{{ type }}"
active: {{ active }}
delivery_method:
id: "{{ id }}"
secret: "{{ secret }}"
temporarily_disabled: {{ temporarily_disabled }}
type: "{{ type }}"
url: "{{ url }}"
custom_headers:
- name: "{{ name }}"
value: "{{ value }}"
description: "{{ description }}"
events:
- "{{ events }}"
filter:
id: "{{ id }}"
type: "{{ type }}"
oauth_client:
id: "{{ id }}"
type: "{{ type }}"
summary: "{{ summary }}"
UPDATE examples
- update
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
- delete
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
- ping
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
;
Test 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 />
EXEC pagerduty.webhooks.webhook_subscriptions.ping
@id='{{ id }}' --required
;