Skip to main content

status_update_subscribers

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

Overview

Namestatus_update_subscribers
TypeResource
Idpagerduty.incidents.status_update_subscribers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
subscriber_idstringThe ID of the entity being subscribed
has_indirect_subscriptionbooleanIf this subcriber has an indirect subscription to this incident via another object
subscribed_viaarray
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 Incident.<br /><br /><!-- theme: warning --><br />> Users must be added through POST /incident/&#123;id&#125;/status_updates/subscribers to be returned from this endpoint.<br />Scoped OAuth requires: subscribers.read<br />
createinsertid, subscribersSubscribe the given entities to Incident Status Update Notifications.<br /><br />Scoped OAuth requires: subscribers.write<br />
unsubscribeexecid, subscribersUnsubscribes the matching Subscribers from Incident Status Update Notifications.<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 Incident.<br /><br /><!-- theme: warning --><br />> Users must be added through POST /incident/&#123;id&#125;/status_updates/subscribers to be returned from this endpoint.<br />Scoped OAuth requires: subscribers.read<br />

SELECT
subscriber_id,
has_indirect_subscription,
subscribed_via,
subscriber_type
FROM pagerduty.incidents.status_update_subscribers
WHERE id = '{{ id }}' -- required
;

INSERT examples

Subscribe the given entities to Incident Status Update Notifications.<br /><br />Scoped OAuth requires: subscribers.write<br />

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

Lifecycle Methods

Unsubscribes the matching Subscribers from Incident Status Update Notifications.<br /><br />Scoped OAuth requires: subscribers.write<br />

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