Safe Haskell | None |
---|---|
Language | Haskell2010 |
PagerDuty keeps a log of all the events that happen to an incident. The following APIs provide fine-grained access to this incident log entry data to give you more insight into how your team or organization is handling your incidents. Log entry data includes details about the event(s) that triggered the incident, who was notified and when, how they were notified, and who acknowledged or resolved it, amongst a few other things.
See: http://developer.pagerduty.com/documentation/rest/log_entries
- data ListLogs
- listLogs :: Request ListLogs s [LogEntry]
- listUserLogs :: UserId -> Request ListLogs s [LogEntry]
- listIncidentLogs :: IncidentKey -> Request ListLogs s [LogEntry]
- llTimeZone :: Lens' (Request ListLogs s b) TimeZone
- llSince :: Lens' (Request ListLogs s b) (Maybe UTCTime)
- llUntil :: Lens' (Request ListLogs s b) (Maybe UTCTime)
- llIsOverview :: Lens' (Request ListLogs s b) Bool
- data GetLog
- getLog :: LogEntryId -> Request GetLog s LogEntry
- glTimeZone :: Lens' (Request GetLog s b) TimeZone
- data Channel
- _ChanNagios :: Prism' Channel NagiosChannel
- _ChanAPI :: Prism' Channel APIChannel
- _ChanEmail :: Prism' Channel EmailChannel
- _ChanUserEmail :: Prism' Channel (User, EmailChannel)
- _ChanWebTrigger :: Prism' Channel (User, WebTriggerChannel)
- _ChanSMS :: Prism' Channel User
- _ChanWeb :: Prism' Channel User
- _ChanNote :: Prism' Channel User
- _ChanAuto :: Prism' Channel ()
- _ChanTimeout :: Prism' Channel ()
- data NagiosChannel
- ncSummary :: Lens' NagiosChannel Text
- ncHost :: Lens' NagiosChannel Text
- ncService :: Lens' NagiosChannel (Maybe Text)
- ncState :: Lens' NagiosChannel Text
- ncDetails :: Lens' NagiosChannel Object
- data APIChannel
- acSummary :: Lens' APIChannel Text
- acServiceKey :: Lens' APIChannel ServiceKey
- acDescription :: Lens' APIChannel Text
- acIncidentKey :: Lens' APIChannel IncidentKey
- acDetails :: Lens' APIChannel Object
- data EmailType
- data EmailChannel
- ecSummary :: Lens' EmailChannel Text
- ecTo :: Lens' EmailChannel Text
- ecFrom :: Lens' EmailChannel Text
- ecSubject :: Lens' EmailChannel Text
- ecBody :: Lens' EmailChannel Text
- ecBodyContentType :: Lens' EmailChannel EmailType
- ecRawUrl :: Lens' EmailChannel Text
- ecHtmlUrl :: Lens' EmailChannel (Maybe Text)
- data WebTriggerChannel
- wcSummary :: Lens' WebTriggerChannel Text
- wcSubject :: Lens' WebTriggerChannel Text
- wcDetails :: Lens' WebTriggerChannel (Maybe Text)
- data Entry
- _LogEntry :: Prism' Entry LogEntry
- _NotifyEntry :: Prism' Entry NotifyEntry
- data LogEntryType
- data LogEntry
- leId :: Lens' LogEntry LogEntryId
- leType :: Lens' LogEntry LogEntryType
- leCreatedAt :: Lens' LogEntry Date
- leNote :: Lens' LogEntry (Maybe Text)
- leAssignedUser :: Lens' LogEntry (Maybe User)
- leChannel :: Lens' LogEntry Channel
- data NotifyEntry
- neCreatedAt :: Lens' NotifyEntry UTCTime
- neUser :: Lens' NotifyEntry User
- neNotification :: Lens' NotifyEntry Notification
- data NotificationType
- = SMS
- | Phone
- | IosPushNotification
- data NotificationStatus
- data Notification
- nType :: Lens' Notification NotificationType
- nStatus :: Lens' Notification NotificationStatus
- nAddress :: Lens' Notification Address
List Logs
listLogs :: Request ListLogs s [LogEntry] Source
List all incident log entries across the entire account.
GET /log_entries
See: http://developer.pagerduty.com/documentation/rest/log_entries/list
listUserLogs :: UserId -> Request ListLogs s [LogEntry] Source
List all incident log entries that describe interactions with a specific user.
GET /users/:user_id/log_entries
See: http://developer.pagerduty.com/documentation/rest/log_entries/user_log_entries
listIncidentLogs :: IncidentKey -> Request ListLogs s [LogEntry] Source
List all incident log entries for a specific incident.
GET /incidents/:incident_id/log_entries
See: http://developer.pagerduty.com/documentation/rest/log_entries/incident_log_entries
llTimeZone :: Lens' (Request ListLogs s b) TimeZone Source
Time zone in which dates in the result will be rendered.
Default: UTC.
llSince :: Lens' (Request ListLogs s b) (Maybe UTCTime) Source
The start of the date range over which you want to search.
llUntil :: Lens' (Request ListLogs s b) (Maybe UTCTime) Source
The end of the date range over which you want to search.
llIsOverview :: Lens' (Request ListLogs s b) Bool Source
If true, will only return log entries of type trigger, acknowlldge, or resolve.
Default: false.
Get Log
getLog :: LogEntryId -> Request GetLog s LogEntry Source
Get details for a specific incident log entry. This method provides additional information you can use to get at raw event data.
GET /log_entries/:id
See: http://developer.pagerduty.com/documentation/rest/log_entries/show
glTimeZone :: Lens' (Request GetLog s b) TimeZone Source
Time zone in which dates in the result will be rendered.
Default: UTC.
Types
Channels
Representation of the means by which the action was channeled.
_ChanTimeout :: Prism' Channel () Source
data NagiosChannel Source
ncSummary :: Lens' NagiosChannel Text Source
Same as host.
ncHost :: Lens' NagiosChannel Text Source
Nagios host.
ncService :: Lens' NagiosChannel (Maybe Text) Source
Nagios service that created the event, if applicable.
ncState :: Lens' NagiosChannel Text Source
State the caused the event.
ncDetails :: Lens' NagiosChannel Object Source
Additional details of the incident.
data APIChannel Source
acSummary :: Lens' APIChannel Text Source
Same as description.
acServiceKey :: Lens' APIChannel ServiceKey Source
API service key.
acDescription :: Lens' APIChannel Text Source
Description of the event.
acIncidentKey :: Lens' APIChannel IncidentKey Source
Incident deduping string.
acDetails :: Lens' APIChannel Object Source
Additional details of the incident, if any.
data EmailChannel Source
ecSummary :: Lens' EmailChannel Text Source
Same as subject.
ecTo :: Lens' EmailChannel Text Source
To address of the email.
ecFrom :: Lens' EmailChannel Text Source
From address of the email.
ecSubject :: Lens' EmailChannel Text Source
Subject of the email.
ecBody :: Lens' EmailChannel Text Source
Body of the email.
ecBodyContentType :: Lens' EmailChannel EmailType Source
Content type of the email body.
ecRawUrl :: Lens' EmailChannel Text Source
URL for raw text of email.
ecHtmlUrl :: Lens' EmailChannel (Maybe Text) Source
URL for html rendered version of the email.
Only present if content_type is HTML
.
data WebTriggerChannel Source
wcSummary :: Lens' WebTriggerChannel Text Source
Same as subject.
wcSubject :: Lens' WebTriggerChannel Text Source
Subject of the web trigger.
Entries
LogEntry LogEntry | Log entries come in a wide variety of types. Most types use this format,
the exception being the |
NotifyEntry NotifyEntry | A user was notified. |
data LogEntryType Source
Trigger | The incident was triggered. |
Acknowledge | The incident was acknowledged. |
Unacknowledge | The incident was unacknowledged. |
Resolve | The incident was resolved. |
Escalate | The incident was escalated. |
Assign | The incident was assigned to a user. |
Annotate | A note was added to the incident. |
ReachTriggerLimit | The incident has reached the log entry trigger limit and will not create any more. |
RepeatEscalationPath | The incident has reached the end of its escalation policy and will restart. |
ExhaustEscalationPath | The incident has cycled through its escalation policy the max allowed number of times. |
Notify | A user was notified. |
The raw log event.
leId :: Lens' LogEntry LogEntryId Source
Id of the log entry.
leType :: Lens' LogEntry LogEntryType Source
The type of the log entry.
leCreatedAt :: Lens' LogEntry Date Source
Time at which the log entry was created.
leNote :: Lens' LogEntry (Maybe Text) Source
Optional field containing an action note, if one was included with the action.
leAssignedUser :: Lens' LogEntry (Maybe User) Source
Only for assign, escalate log entries. The user to which the incident is assigned.
leChannel :: Lens' LogEntry Channel Source
Representation of the means by which the action was channeled and the possible perfomer of this action.
data NotifyEntry Source
Notify log entries correspond to notifications sent to users. They have a distinct format from action log entries.
neCreatedAt :: Lens' NotifyEntry UTCTime Source
Time at which the log entry was created
neUser :: Lens' NotifyEntry User Source
User who was notified
neNotification :: Lens' NotifyEntry Notification Source
Object representing the notification itself
data NotificationType Source
data NotificationStatus Source
data Notification Source
nType :: Lens' Notification NotificationType Source
Type of notification.
nStatus :: Lens' Notification NotificationStatus Source
The current status of the notification.
nAddress :: Lens' Notification Address Source
The address to which the notification was sent. I.e., an email address, phone number, or iPhone name.