subscribers
Creates, updates, deletes, gets or lists a subscribers resource.
Overview
| Name | subscribers |
| Type | Resource |
| Id | pagerduty.business_services.subscribers |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
subscriber_id | string | The ID of the entity being subscribed |
subscriber_type | string | The type of the entity being subscribed (user, team) |
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 Subscribers on the Business Service.<br /><br /><!-- theme: warning --><br />> Users must be added through POST /business_services/{id}/subscribers to be returned from this endpoint.<br />Scoped OAuth requires: subscribers.read<br /> | |
create | insert | id, subscribers | Subscribe the given entities to the given Business Service.<br /><br />Scoped OAuth requires: subscribers.write<br /> | |
unsubscribe | exec | id, subscribers | Unsubscribes 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.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
SELECT examples
- list
Retrieve a list of Notification Subscribers on the Business Service.<br /><br /><!-- theme: warning --><br />> Users must be added through POST /business_services/{id}/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
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: subscribers
props:
- name: id
value: "{{ id }}"
description: Required parameter for the subscribers resource.
- name: subscribers
value:
- subscriber_id: "{{ subscriber_id }}"
subscriber_type: "{{ subscriber_type }}"
Lifecycle Methods
- unsubscribe
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 }}"
}'
;