Safe Haskell | None |
---|---|
Language | Haskell2010 |
Access and manipulate user data for your PagerDuty account. When a user is
shown inlined in other resources, a deleted user will have its html_url
attribute
set to null.
See: http://developer.pagerduty.com/documentation/rest/users
- data ListUsers
- listUsers :: Request ListUsers s [User]
- luQuery :: Lens' (Request ListUsers s b) (Maybe Text)
- listOnCallUsers :: Request ListUsers s [User]
- data CreateUser
- createUser :: RequesterId -> Text -> Address -> Request CreateUser s User
- cuName :: Lens' (Request CreateUser s b) Text
- cuEmail :: Lens' (Request CreateUser s b) Address
- cuRole :: Lens' (Request CreateUser s b) (Maybe Role)
- cuJobTitle :: Lens' (Request CreateUser s b) (Maybe Text)
- cuTimeZone :: Lens' (Request CreateUser s b) (Maybe TimeZone)
- getUser :: UserId -> Request Empty s User
- getUserOnCall :: UserId -> Request Empty s User
- data UpdateUser
- updateUser :: UserId -> Request UpdateUser s User
- uuName :: Lens' (Request UpdateUser s b) (Maybe Text)
- uuEmail :: Lens' (Request UpdateUser s b) (Maybe Address)
- uuRole :: Lens' (Request UpdateUser s b) (Maybe Role)
- uuJobTitle :: Lens' (Request UpdateUser s b) (Maybe Text)
- uuTimeZone :: Lens' (Request UpdateUser s b) (Maybe TimeZone)
- deleteUser :: UserId -> Request Empty s Empty
- data PolicyInfo
- piId :: Lens' PolicyInfo EscalationPolicyId
- piName :: Lens' PolicyInfo Text
- data OnCall
- ocLevel :: Lens' OnCall Int
- ocStart :: Lens' OnCall (Maybe Date)
- ocEnd :: Lens' OnCall (Maybe Date)
- ocEscalationPolicy :: Lens' OnCall PolicyInfo
- data Role
- class HasUserInfo a where
- data UserInfo
- data User
- uRole :: Lens' User Role
- uAvatarUrl :: Lens' User Text
- uUserUrl :: Lens' User Text
- uInvitationSent :: Lens' User Bool
- uJobTitle :: Lens' User (Maybe Text)
List Users
data ListUsers
listUsers :: Request ListUsers s [User]
List users of your PagerDuty account, optionally filtered by a search query.
GET /users
See: http://developer.pagerduty.com/documentation/rest/users/list
luQuery :: Lens' (Request ListUsers s b) (Maybe Text)
Filters the result, showing only the users whose names or email addresses match the query.
List On Call Users
listOnCallUsers :: Request ListUsers s [User]
List all the existing escalation policies with currently on-call users.
If the start and end of an on-call object are null, then the user is always on-call for an escalation policy level.
GET /escalation_policies/on_call
See: http://developer.pagerduty.com/documentation/rest/escalation_policies/on_call
Create User
data CreateUser
Eq CreateUser | |
Show CreateUser | |
ToJSON CreateUser | |
FromJSON CreateUser | |
QueryLike CreateUser |
:: RequesterId | |
-> Text | |
-> Address | |
-> Request CreateUser s User |
Create a new user for your account. An invite email will be sent asking the user to choose a password.
POST /users
See: http://developer.pagerduty.com/documentation/rest/users/create
cuName :: Lens' (Request CreateUser s b) Text
The name of the user.
cuEmail :: Lens' (Request CreateUser s b) Address
The email of the user. The newly created user will receive an email asking to confirm the subscription.
cuRole :: Lens' (Request CreateUser s b) (Maybe Role)
The user's role.
cuJobTitle :: Lens' (Request CreateUser s b) (Maybe Text)
The job title of the user.
cuTimeZone :: Lens' (Request CreateUser s b) (Maybe TimeZone)
The time zone the user is in. If not specified, the time zone of the account making the API call will be used.
Get User
getUser :: UserId -> Request Empty s User
Get information about an existing user.
GET /users/:id
See: http://developer.pagerduty.com/documentation/rest/users/show
Get User On Call
getUserOnCall :: UserId -> Request Empty s User
Get a user object with that user's current on-call status. If the on-call object is an empty list, the user is never on-call.
If the start and end of an on-call object are null, then the user is always on-call for an escalation policy level.
GET /users/:id/on_call
See: http://developer.pagerduty.com/documentation/rest/users/show_on_call
Update User
data UpdateUser
Eq UpdateUser | |
Show UpdateUser | |
ToJSON UpdateUser | |
FromJSON UpdateUser | |
QueryLike UpdateUser |
updateUser :: UserId -> Request UpdateUser s User
Update an existing user.
PUT /users/:id
See: http://developer.pagerduty.com/documentation/rest/users/update
uuName :: Lens' (Request UpdateUser s b) (Maybe Text)
The name of the user.
uuEmail :: Lens' (Request UpdateUser s b) (Maybe Address)
The email of the user. The newly created user will receive an email asking to confirm the subscription.
uuRole :: Lens' (Request UpdateUser s b) (Maybe Role)
The user's role.
uuJobTitle :: Lens' (Request UpdateUser s b) (Maybe Text)
The job title of the user.
uuTimeZone :: Lens' (Request UpdateUser s b) (Maybe TimeZone)
The time zone the user is in. If not specified, the time zone of the account making the API call will be used.
Delete User
deleteUser :: UserId -> Request Empty s Empty
Remove an existing user.
DELETE /users/:id
See: http://developer.pagerduty.com/documentation/rest/users/delete
Types
data PolicyInfo
Eq PolicyInfo | |
Show PolicyInfo | |
ToJSON PolicyInfo | |
FromJSON PolicyInfo |
piId :: Lens' PolicyInfo EscalationPolicyId
piName :: Lens' PolicyInfo Text
ocEscalationPolicy :: Lens' OnCall PolicyInfo
data Role
class HasUserInfo a where
The id of the user.
uName :: Lens' a Text
The name of the user.
The user's email address.
uColor :: Lens' a Text
The color used to represent the user in schedules.
uTimeZone :: Lens' a TimeZone
The user's personal time zone.
HasUserInfo UserInfo | |
HasUserInfo User | |
HasUserInfo Override | |
(QueryLike a, ToJSON a, HasUserInfo a) => HasUserInfo (Request a s b) |
uAvatarUrl :: Lens' User Text
uInvitationSent :: Lens' User Bool