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 #

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 #

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

createOverride #

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