Safe Haskell | None |
---|---|
Language | Haskell2010 |
Access high level reports about alerts and incidents. Useful for creating graphs.
See: http://developer.pagerduty.com/documentation/rest/reports
- alertsPerTime :: UTCTime -> UTCTime -> Request Report s AlertTotals
- incidentsPerTime :: UTCTime -> UTCTime -> Request Report s [IncidentReport]
- data Report
- rSince :: Lens' (Request Report s b) UTCTime
- rUntil :: Lens' (Request Report s b) UTCTime
- rRollup :: Lens' (Request Report s b) Rollup
- data Rollup
- data AlertReport
- arStart :: Lens' AlertReport UTCTime
- arEnd :: Lens' AlertReport UTCTime
- arNumberOfAlerts :: Lens' AlertReport Int
- arNumberOfPhoneAlerts :: Lens' AlertReport Int
- arNumberOfSmsAlerts :: Lens' AlertReport Int
- arNumberOfEmailAlerts :: Lens' AlertReport Int
- data AlertTotals
- atAlerts :: Lens' AlertTotals [AlertReport]
- atTotalNumberOfAlerts :: Lens' AlertTotals Int
- atTotalNumberOfPhoneAlerts :: Lens' AlertTotals Int
- atTotalNumberOfSmsAlerts :: Lens' AlertTotals Int
- atTotalNumberOfEmailAlerts :: Lens' AlertTotals Int
- atTotalNumberOfBillableAlerts :: Lens' AlertTotals Int
- data IncidentReport
- irStart :: Lens' IncidentReport UTCTime
- irEnd :: Lens' IncidentReport UTCTime
- irNumberOfIncidents :: Lens' IncidentReport Int
Alerts Per Time
:: UTCTime | |
-> UTCTime | |
-> 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
:: UTCTime | |
-> UTCTime | |
-> 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
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 AlertReport
Eq AlertReport | |
Show AlertReport | |
ToJSON AlertReport | |
FromJSON AlertReport |
arStart :: Lens' AlertReport UTCTime
arEnd :: Lens' AlertReport UTCTime
arNumberOfAlerts :: Lens' AlertReport Int
arNumberOfPhoneAlerts :: Lens' AlertReport Int
arNumberOfSmsAlerts :: Lens' AlertReport Int
arNumberOfEmailAlerts :: Lens' AlertReport Int
data AlertTotals
Eq AlertTotals | |
Show AlertTotals | |
ToJSON AlertTotals | |
FromJSON AlertTotals |
atAlerts :: Lens' AlertTotals [AlertReport]
atTotalNumberOfAlerts :: Lens' AlertTotals Int
atTotalNumberOfPhoneAlerts :: Lens' AlertTotals Int
atTotalNumberOfSmsAlerts :: Lens' AlertTotals Int
atTotalNumberOfEmailAlerts :: Lens' AlertTotals Int
atTotalNumberOfBillableAlerts :: Lens' AlertTotals Int
data IncidentReport
Eq IncidentReport | |
Show IncidentReport | |
ToJSON IncidentReport | |
FromJSON IncidentReport |
irStart :: Lens' IncidentReport UTCTime
irEnd :: Lens' IncidentReport UTCTime
irNumberOfIncidents :: Lens' IncidentReport Int