Skip to main content

contact_methods

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

Overview

Namecontact_methods
TypeResource
Idpagerduty.users.contact_methods

Fields

The following fields are returned by SELECT queries:

The user's contact method requested.

NameDatatypeDescription

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_user_contact_methodselectid, contact_method_idAccept, Content-TypeGet details about a User's contact method.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.read
get_user_contact_methodsselectidAccept, Content-TypeList contact methods of your PagerDuty user.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.read
create_user_contact_methodinsertid, data__contact_methodAccept, Content-TypeCreate a new contact method for the User.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.write
delete_user_contact_methoddeleteid, contact_method_idAccept, Content-TypeRemove a user's contact method.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.write
_get_user_contact_methodsexecidAccept, Content-TypeList contact methods of your PagerDuty user.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.read
_get_user_contact_methodexecid, contact_method_idAccept, Content-TypeGet details about a User's contact method.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.read
update_user_contact_methodexecid, contact_method_id, contact_methodAccept, Content-TypeUpdate a User's contact method.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.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
contact_method_idstringThe contact method ID on the user.
idstringThe ID of the resource.
AcceptstringThe Accept header is used as a versioning header.
Content-Typestring

SELECT examples

Get details about a User's contact method.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.read

SELECT
*
FROM pagerduty.users.contact_methods
WHERE id = '{{ id }}' -- required
AND contact_method_id = '{{ contact_method_id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;

INSERT examples

Create a new contact method for the User.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.write

INSERT INTO pagerduty.users.contact_methods (
data__contact_method,
id,
Accept,
Content-Type
)
SELECT
'{{ contact_method }}' /* required */,
'{{ id }}',
'{{ Accept }}',
'{{ Content-Type }}'
RETURNING
contact_method
;

DELETE examples

Remove a user's contact method.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.write

DELETE FROM pagerduty.users.contact_methods
WHERE id = '{{ id }}' --required
AND contact_method_id = '{{ contact_method_id }}' --required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;

Lifecycle Methods

List contact methods of your PagerDuty user.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

Scoped OAuth requires: users:contact_methods.read

EXEC pagerduty.users.contact_methods._get_user_contact_methods 
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
;