Skip to main content

notification_subscriptions

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

Overview

Namenotification_subscriptions
TypeResource
Idpagerduty.teams.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_team_notification_subscriptionsselectidAcceptRetrieve a list of Notification Subscriptions the given Team has.

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

Scoped OAuth requires: subscribers.read
create_team_notification_subscriptionsinsertid, data__subscribablesAcceptCreate new Notification Subscriptions for the given Team.

Scoped OAuth requires: subscribers.write
_get_team_notification_subscriptionsexecidAcceptRetrieve a list of Notification Subscriptions the given Team has.

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

Scoped OAuth requires: subscribers.read
remove_team_notification_subscriptionsexecid, subscribablesAcceptUnsubscribe the given Team 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 Team has.

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

Scoped OAuth requires: subscribers.read

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

INSERT examples

Create new Notification Subscriptions for the given Team.

Scoped OAuth requires: subscribers.write

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

Lifecycle Methods

Retrieve a list of Notification Subscriptions the given Team has.

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

Scoped OAuth requires: subscribers.read

EXEC pagerduty.teams.notification_subscriptions._get_team_notification_subscriptions 
@id='{{ id }}' --required,
@Accept='{{ Accept }}'
;