pagerduty-0.0.8: Client library for PagerDuty Integration and REST APIs.

Safe HaskellNone
LanguageHaskell2010

Network.PagerDuty.REST.Schedules.Overrides

Contents

Description

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

Synopsis

List Overrides

listOverrides Source #

Arguments

:: ScheduleId 
-> Date

lsSince

-> Date

lsUntil

-> 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 Source #

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 Source #

The end time of the date range you want to retrieve override for.

lsEditable :: Lens' (Request ListOverrides s b) Bool Source #

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 Source #

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

createOverride Source #

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 Source #

The ID of the user who will be on call for the duration of the override.

coStart :: Lens' (Request CreateOverride s b) UTCTime Source #

The start date and time for the override.

coEnd :: Lens' (Request CreateOverride s b) UTCTime Source #

The end date and time for the override.

Delete Override

deleteOverride :: ScheduleId -> OverrideId -> Request Empty s Empty Source #

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 Source #

Minimal complete definition

userInfo

Methods

userInfo :: Lens' a UserInfo Source #

uId :: Lens' a UserId Source #

The id of the user.

uName :: Lens' a Text Source #

The name of the user.

uEmail :: Lens' a Address Source #

The user's email address.

uColor :: Lens' a Text Source #

The color used to represent the user in schedules.

uTimeZone :: Lens' a TimeZone Source #

The user's personal time zone.