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_webhook_subscription
- list_webhook_subscriptions
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 | |
type | string | The type indicating the schema of the object. (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 | |
type | string | The type indicating the schema of the object. (default: webhook_subscription) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_webhook_subscription | select | id | Accept | Gets details about an existing webhook subscription. |
list_webhook_subscriptions | select | Accept , limit , offset , total , filter_type , filter_id | List existing webhook subscriptions. The filter_type and filter_id query parameters may be used to only show subscriptionsfor 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_subscription | insert | data__webhook_subscription | Accept , Content-Type | 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. |
delete_webhook_subscription | delete | id | Accept | Deletes a webhook subscription. |
_list_webhook_subscriptions | exec | Accept , limit , offset , total , filter_type , filter_id | List existing webhook subscriptions. The filter_type and filter_id query parameters may be used to only show subscriptionsfor 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_subscription | exec | id | Accept | Gets details about an existing webhook subscription. |
update_webhook_subscription | exec | id | Accept , Content-Type | Updates 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_subscription | exec | id | Accept | Enable 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_subscription | exec | id | Accept | Test 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.
Name | Datatype | Description |
---|---|---|
id | string | The ID of the resource. |
Accept | string | The Accept header is used as a versioning header. |
Content-Type | string | |
filter_id | string | The id of the resource to filter upon. |
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 for more information. |
SELECT
examples
- get_webhook_subscription
- list_webhook_subscriptions
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 }}'
;
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.
SELECT
id,
active,
delivery_method,
description,
events,
filter,
type
FROM pagerduty.webhooks.webhook_subscriptions
WHERE Accept = '{{ Accept }}'
AND limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND total = '{{ total }}'
AND filter_type = '{{ filter_type }}'
AND filter_id = '{{ filter_id }}'
;
INSERT
examples
- create_webhook_subscription
- Manifest
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
;
# Description fields are for documentation purposes
- name: webhook_subscriptions
props:
- name: webhook_subscription
value: object
- name: Accept
value: string
description: The `Accept` header is used as a versioning header.
- name: Content-Type
value: string
DELETE
examples
- delete_webhook_subscription
Deletes a webhook subscription.
DELETE FROM pagerduty.webhooks.webhook_subscriptions
WHERE id = '{{ id }}' --required
AND Accept = '{{ Accept }}'
;
Lifecycle Methods
- _list_webhook_subscriptions
- _get_webhook_subscription
- update_webhook_subscription
- enable_webhook_subscription
- test_webhook_subscription
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 }}'
;
Gets details about an existing webhook subscription.
EXEC pagerduty.webhooks.webhook_subscriptions._get_webhook_subscription
@id='{{ id }}' --required,
@Accept='{{ Accept }}'
;
Updates 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.
EXEC pagerduty.webhooks.webhook_subscriptions.update_webhook_subscription
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
@@json=
'{
"webhook_subscription": "{{ webhook_subscription }}"
}'
;
Enable 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.
EXEC pagerduty.webhooks.webhook_subscriptions.enable_webhook_subscription
@id='{{ id }}' --required,
@Accept='{{ Accept }}'
;
Test 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.
EXEC pagerduty.webhooks.webhook_subscriptions.test_webhook_subscription
@id='{{ id }}' --required,
@Accept='{{ Accept }}'
;