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

Safe HaskellNone
LanguageHaskell2010

Network.PagerDuty.REST.Reports

Contents

Description

Access high level reports about alerts and incidents. Useful for creating graphs.

See: http://developer.pagerduty.com/documentation/rest/reports

Synopsis

Alerts Per Time

alertsPerTime

Arguments

:: UTCTime

rSince

-> UTCTime

rUntil

-> Request Report s AlertTotals 

Get high level statistics about the number of alerts (SMSes, phone calls and emails) sent for the desired time period, summed daily, weekly or monthly.

GET /reports/alerts_per_time

See: http://developer.pagerduty.com/documentation/rest/reports/alerts_per_time

Incidents Per Time

incidentsPerTime

Arguments

:: UTCTime

rSince

-> UTCTime

rUntil

-> Request Report s [IncidentReport] 

Get high level statistics about the number of incidents created for the desired time period, summed daily, weekly or monthly.

GET /reports/incidents_per_time

See: http://developer.pagerduty.com/documentation/rest/reports/incidents_per_time

Types

data Report

Instances

Eq Report 
Show Report 
ToJSON Report 
HasDatatypeInfo Report 
Generic Report 
QueryLike Report 
type Code Report 

rSince :: Lens' (Request Report s b) UTCTime

Start of the date range over which you want to search. The time element is optional.

rUntil :: Lens' (Request Report s b) UTCTime

The end of the date range over which you want to search. This should be in the same format as since.

rRollup :: Lens' (Request Report s b) Rollup

Specifies the bucket duration for each summation.

Default: monthly.

Example: A time window of two years (based on since and until) with a rollup of monthly will result in 24 sets of data points being returned (one for each month in the span).

data Rollup

Constructors

Daily 
Weekly 
Monthly 

Instances

Eq Rollup 
Show Rollup 
ToJSON Rollup 
FromJSON Rollup 

arStart :: Lens' AlertReport UTCTime

arEnd :: Lens' AlertReport UTCTime

irStart :: Lens' IncidentReport UTCTime

irEnd :: Lens' IncidentReport UTCTime