notification_subscriptions
Creates, updates, deletes, gets or lists a notification_subscriptions resource.
Overview
| Name | notification_subscriptions |
| Type | Resource |
| Id | pagerduty.users.notification_subscriptions |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
subscribable_name | string | The name of the subscribable |
subscription | object | An object describing the relationship of a NotificationSubscriber and a NotificationSubscribable. (title: NotificationSubscription) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | id | Retrieve a list of Notification Subscriptions the given User has.<br /><br /><!-- theme: warning --><br />> Users must be added through POST /users/{id}/notification_subscriptions to be returned from this endpoint.<br /><br />Scoped OAuth requires: subscribers.read<br /> | |
create | insert | id, subscribables | Create new Notification Subscriptions for the given User.<br /><br />Scoped OAuth requires: subscribers.write<br /> | |
unsubscribe | exec | id, subscribables | Unsubscribe the given User from Notifications on the matching Subscribable entities.<br /><br />Scoped OAuth requires: subscribers.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. |
SELECT examples
- list
Retrieve a list of Notification Subscriptions the given User has.<br /><br /><!-- theme: warning --><br />> Users must be added through POST /users/{id}/notification_subscriptions to be returned from this endpoint.<br /><br />Scoped OAuth requires: subscribers.read<br />
SELECT
subscribable_name,
subscription
FROM pagerduty.users.notification_subscriptions
WHERE id = '{{ id }}' -- required
;
INSERT examples
- create
- Manifest
Create new Notification Subscriptions for the given User.<br /><br />Scoped OAuth requires: subscribers.write<br />
INSERT INTO pagerduty.users.notification_subscriptions (
subscribables,
id
)
SELECT
'{{ subscribables }}' /* required */,
'{{ id }}'
RETURNING
subscriptions
;
# Description fields are for documentation purposes
- name: notification_subscriptions
props:
- name: id
value: "{{ id }}"
description: Required parameter for the notification_subscriptions resource.
- name: subscribables
value:
- subscribable_id: "{{ subscribable_id }}"
subscribable_type: "{{ subscribable_type }}"
Lifecycle Methods
- unsubscribe
Unsubscribe the given User from Notifications on the matching Subscribable entities.<br /><br />Scoped OAuth requires: subscribers.write<br />
EXEC pagerduty.users.notification_subscriptions.unsubscribe
@id='{{ id }}' --required
@@json=
'{
"subscribables": "{{ subscribables }}"
}'
;