Safe Haskell | None |
---|---|
Language | Haskell2010 |
Schedule overrides are custom, non-recurring exceptions to your regular on-call schedules. Use them when your team members go on vacation, swap shifts, or when you simply cannot achieve your normal scheduling with recurring layers.
See: http://developer.pagerduty.com/documentation/rest/schedules
- data ListOverrides
- listOverrides :: ScheduleId -> Date -> Date -> Request ListOverrides s [Override]
- lsSince :: Lens' (Request ListOverrides s b) UTCTime
- lsUntil :: Lens' (Request ListOverrides s b) UTCTime
- lsEditable :: Lens' (Request ListOverrides s b) Bool
- lsOverflow :: Lens' (Request ListOverrides s b) Bool
- data CreateOverride
- createOverride :: ScheduleId -> UserId -> Date -> Date -> Request CreateOverride s Override
- coUserId :: Lens' (Request CreateOverride s b) UserId
- coStart :: Lens' (Request CreateOverride s b) UTCTime
- coEnd :: Lens' (Request CreateOverride s b) UTCTime
- deleteOverride :: ScheduleId -> OverrideId -> Request Empty s Empty
- class HasUserInfo a where
- data Override
- oId :: Lens' Override (Maybe OverrideId)
- oStart :: Lens' Override Date
- oEnd :: Lens' Override Date
- oUser :: Lens' Override UserInfo
List Overrides
data ListOverrides
Eq ListOverrides | |
Show ListOverrides | |
ToJSON ListOverrides | |
HasDatatypeInfo ListOverrides | |
Generic ListOverrides | |
QueryLike ListOverrides | |
type Code ListOverrides |
:: ScheduleId | |
-> Date | |
-> Date | |
-> Request ListOverrides s [Override] |
List overrides for a given time range.
GET /schedules/:schedule_id/overrides
See: http://developer.pagerduty.com/documentation/rest/schedules/overrides/list
lsSince :: Lens' (Request ListOverrides s b) UTCTime
The start time of the date range you want to retrieve override for.
The maximum date range queryable is 3 months.
lsUntil :: Lens' (Request ListOverrides s b) UTCTime
The end time of the date range you want to retrieve override for.
lsEditable :: Lens' (Request ListOverrides s b) Bool
When True
, only editable overrides will be returned.
The result will onlyinclude the id the override if this parameter is present. Only future overrides are editable.
Default: 'False.'
lsOverflow :: Lens' (Request ListOverrides s b) Bool
Any on-call schedule entries that pass the date range bounds will be
truncated at the bounds, unless lsEditable .~ True
is specified.
Default: 'False.'
Create Override
data CreateOverride
Eq CreateOverride | |
Show CreateOverride | |
ToJSON CreateOverride | |
FromJSON CreateOverride | |
QueryLike CreateOverride |
:: ScheduleId | |
-> UserId | |
-> Date | |
-> Date | |
-> Request CreateOverride s Override |
Create an override for a specific user covering the specified time range. If you create an override on top of an existing one, the last created override will have priority.
If no time zone information is present in the since and until parameters, the schedule's time zone will be used.
Note: You cannot create overrides in the past.
POST /schedules/:schedule_id/overrides
See: http://developer.pagerduty.com/documentation/rest/schedules/overrides/create
coUserId :: Lens' (Request CreateOverride s b) UserId
The ID of the user who will be on call for the duration of the override.
coStart :: Lens' (Request CreateOverride s b) UTCTime
The start date and time for the override.
coEnd :: Lens' (Request CreateOverride s b) UTCTime
The end date and time for the override.
Delete Override
deleteOverride :: ScheduleId -> OverrideId -> Request Empty s Empty
Remove an override.
You cannot remove a past override. If the override start time is before the current time, but the end time is after the current time, the override will be truncated to the current time. If the override is truncated, the status code will be 200 OK, as opposed to a 204 No Content for a successful delete.
DELETE /schedules/:schedule_id/overrides/:id
See: http://developer.pagerduty.com/documentation/rest/schedules/overrides/delete
Types
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) |
oId :: Lens' Override (Maybe OverrideId)