Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contact methods describe the various channels (phone numbers, SMS numbers and email addresses) used to contact a user when an incident is assigned to the user.
Access and manipulate the contact methods for a user.
See: http://developer.pagerduty.com/documentation/rest/users/contact_methods
- listContacts :: UserId -> Request Empty s [Contact]
- data CreateContact
- createContact :: UserId -> ContactType -> Address -> Request CreateContact s Contact
- ccType :: Lens' (Request CreateContact s b) ContactType
- ccAddress :: Lens' (Request CreateContact s b) Address
- ccCountryCode :: Lens' (Request CreateContact s b) (Maybe Int)
- ccLabel :: Lens' (Request CreateContact s b) (Maybe Text)
- ccSendShortEmail :: Lens' (Request CreateContact s b) (Maybe Bool)
- getContact :: UserId -> ContactId -> Request Empty s Contact
- data UpdateContact
- updateContact :: UserId -> ContactId -> Request UpdateContact s Contact
- ucAddress :: Lens' (Request UpdateContact s b) (Maybe Address)
- ucCountryCode :: Lens' (Request UpdateContact s b) (Maybe Int)
- ucLabel :: Lens' (Request UpdateContact s b) (Maybe Text)
- ucSendShortEmail :: Lens' (Request UpdateContact s b) (Maybe Bool)
- deleteContact :: UserId -> ContactId -> Request Empty s Empty
- data ContactType
- class HasContact c where
- data Contact
List Contacts
listContacts :: UserId -> Request Empty s [Contact] Source
List existing contact methods for the specified user.
GET /users/:user_id/contact_methods
See: http://developer.pagerduty.com/documentation/rest/users/contact_methods/list
Create Contact
data CreateContact Source
createContact :: UserId -> ContactType -> Address -> Request CreateContact s Contact Source
Create a new contact method for a given user. A contact method can be one of the following types: SMS, email, and phone. push_notification contact methods cannot be created using this API, they are added automatically during device registration.
POST /users/:user_id/contact_methods
Note: The contact info must be unique.
See: http://developer.pagerduty.com/documentation/rest/users/contact_methods/create
ccType :: Lens' (Request CreateContact s b) ContactType Source
The type of the contact method.
ccCountryCode :: Lens' (Request CreateContact s b) (Maybe Int) Source
The number code for your country. Not used for Email
.
Default: 1
ccLabel :: Lens' (Request CreateContact s b) (Maybe Text) Source
A human friendly label for the contact method.
Example: "Home Phone", "Work Email", etc.
Default: The type of the contact method and the address (with country code for phone numbers).
ccSendShortEmail :: Lens' (Request CreateContact s b) (Maybe Bool) Source
Send an abbreviated email message instead of the standard email
output. Useful for email-to-SMS gateways and email based pagers. Only valid for
Email
contact methods.
Default: false.
Get Contact
getContact :: UserId -> ContactId -> Request Empty s Contact Source
Get details for a contact method.
GET /users/:user_id/contact_methods/:id
See: http://developer.pagerduty.com/documentation/rest/users/contact_methods/show
Update Contact
data UpdateContact Source
updateContact :: UserId -> ContactId -> Request UpdateContact s Contact Source
Update an existing contact method of a given user. Note that you cannot change the type of an existing method.
PUT /users/:user_id/contact_methods/:id
See: http://developer.pagerduty.com/documentation/rest/users/contact_methods/update
ucCountryCode :: Lens' (Request UpdateContact s b) (Maybe Int) Source
The number code for your country. Not used for Email
.
Default: 1
ucLabel :: Lens' (Request UpdateContact s b) (Maybe Text) Source
A human friendly label for the contact method.
Example: "Home Phone", "Work Email", etc.
Default: The type of the contact method and the address (with country code for phone numbers).
ucSendShortEmail :: Lens' (Request UpdateContact s b) (Maybe Bool) Source
Send an abbreviated email message instead of the standard email
output. Useful for email-to-SMS gateways and email based pagers. Only valid for
Email
contact methods.
Default: false.
Delete Contact
deleteContact :: UserId -> ContactId -> Request Empty s Empty Source
Remove a contact method and any corresponding notification rules.
DELETE /users/:user_id/contact_methods/:id
See: http://developer.pagerduty.com/documentation/rest/users/contact_methods/delete
Types
data ContactType Source