Skip to main content

subscribers

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

Overview

Namesubscribers
TypeResource
Idpagerduty.business_services.subscribers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
subscriber_idstringThe ID of the entity being subscribed
subscriber_typestringThe type of the entity being subscribed (user, team)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectidRetrieve a list of Notification Subscribers on the Business Service.<br /><br /><!-- theme: warning --><br />> Users must be added through POST /business_services/&#123;id&#125;/subscribers to be returned from this endpoint.<br />Scoped OAuth requires: subscribers.read<br />
createinsertid, subscribersSubscribe the given entities to the given Business Service.<br /><br />Scoped OAuth requires: subscribers.write<br />
unsubscribeexecid, subscribersUnsubscribes the matching Subscribers from a Business Service.<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.

NameDatatypeDescription
idstringThe ID of the resource.

SELECT examples

Retrieve a list of Notification Subscribers on the Business Service.<br /><br /><!-- theme: warning --><br />> Users must be added through POST /business_services/&#123;id&#125;/subscribers to be returned from this endpoint.<br />Scoped OAuth requires: subscribers.read<br />

SELECT
subscriber_id,
subscriber_type
FROM pagerduty.business_services.subscribers
WHERE id = '{{ id }}' -- required
;

INSERT examples

Subscribe the given entities to the given Business Service.<br /><br />Scoped OAuth requires: subscribers.write<br />

INSERT INTO pagerduty.business_services.subscribers (
subscribers,
id
)
SELECT
'{{ subscribers }}' /* required */,
'{{ id }}'
RETURNING
subscriptions
;

Lifecycle Methods

Unsubscribes the matching Subscribers from a Business Service.<br /><br />Scoped OAuth requires: subscribers.write<br />

EXEC pagerduty.business_services.subscribers.unsubscribe
@id='{{ id }}' --required
@@json=
'{
"subscribers": "{{ subscribers }}"
}'
;