Skip to main content

notification_subscriptions

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

Overview

Namenotification_subscriptions
TypeResource
Idpagerduty.users.notification_subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
subscribable_namestringThe name of the subscribable
subscriptionobjectAn object describing the relationship of a NotificationSubscriber and a NotificationSubscribable. (title: NotificationSubscription)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_user_notification_subscriptionsselectidAcceptRetrieve a list of Notification Subscriptions the given User has.

<!-- theme: warning -->
> Users must be added through POST /users/&#123;id&#125;/notification_subscriptions to be returned from this endpoint.

Scoped OAuth requires: subscribers.read
create_user_notification_subscriptionsinsertid, data__subscribablesAcceptCreate new Notification Subscriptions for the given User.

Scoped OAuth requires: subscribers.write
_get_user_notification_subscriptionsexecidAcceptRetrieve a list of Notification Subscriptions the given User has.

<!-- theme: warning -->
> Users must be added through POST /users/&#123;id&#125;/notification_subscriptions to be returned from this endpoint.

Scoped OAuth requires: subscribers.read
unsubscribe_user_notification_subscriptionsexecid, subscribablesAcceptUnsubscribe the given User from Notifications on the matching Subscribable entities.

Scoped OAuth requires: subscribers.write

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.

SELECT examples

Retrieve a list of Notification Subscriptions the given User has.

<!-- theme: warning -->
> Users must be added through POST /users/&#123;id&#125;/notification_subscriptions to be returned from this endpoint.

Scoped OAuth requires: subscribers.read

SELECT
subscribable_name,
subscription
FROM pagerduty.users.notification_subscriptions
WHERE id = '{{ id }}' -- required
AND Accept = '{{ Accept }}'
;

INSERT examples

Create new Notification Subscriptions for the given User.

Scoped OAuth requires: subscribers.write

INSERT INTO pagerduty.users.notification_subscriptions (
data__subscribables,
id,
Accept
)
SELECT
'{{ subscribables }}' /* required */,
'{{ id }}',
'{{ Accept }}'
RETURNING
subscriptions
;

Lifecycle Methods

Retrieve a list of Notification Subscriptions the given User has.

<!-- theme: warning -->
> Users must be added through POST /users/&#123;id&#125;/notification_subscriptions to be returned from this endpoint.

Scoped OAuth requires: subscribers.read

EXEC pagerduty.users.notification_subscriptions._get_user_notification_subscriptions 
@id='{{ id }}' --required,
@Accept='{{ Accept }}'
;