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

Safe HaskellNone
LanguageHaskell2010

Network.PagerDuty.REST.LogEntries

Contents

Description

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

Synopsis

List Logs

data ListLogs #

Instances

Eq ListLogs # 
Show ListLogs # 
ToJSON ListLogs # 
Generic ListLogs # 

Associated Types

type Code ListLogs :: [[*]] #

HasDatatypeInfo ListLogs # 

Associated Types

type DatatypeInfoOf ListLogs :: DatatypeInfo #

QueryLike ListLogs # 

Methods

toQuery :: ListLogs -> Query #

Paginate ListLogs # 

Methods

next :: Request ListLogs s b -> Maybe Pager -> Maybe (Request ListLogs s b)

type Code ListLogs # 
type DatatypeInfoOf ListLogs # 
type DatatypeInfoOf ListLogs = ADT "Network.PagerDuty.REST.LogEntries" "ListLogs" ((:) ConstructorInfo (Record "ListLogs" ((:) FieldInfo (FieldInfo "_llTimeZone'") ((:) FieldInfo (FieldInfo "_llSince'") ((:) FieldInfo (FieldInfo "_llUntil'") ((:) FieldInfo (FieldInfo "_llIsOverview'") ([] FieldInfo)))))) ([] ConstructorInfo))

listLogs :: Request ListLogs s [LogEntry] #

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

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

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 #

Time zone in which dates in the result will be rendered.

Default: UTC.

llSince :: Lens' (Request ListLogs s b) (Maybe UTCTime) #

The start of the date range over which you want to search.

llUntil :: Lens' (Request ListLogs s b) (Maybe UTCTime) #

The end of the date range over which you want to search.

llIsOverview :: Lens' (Request ListLogs s b) Bool #

If true, will only return log entries of type trigger, acknowlldge, or resolve.

Default: false.

Get Log

data GetLog #

Instances

Eq GetLog # 

Methods

(==) :: GetLog -> GetLog -> Bool #

(/=) :: GetLog -> GetLog -> Bool #

Show GetLog # 
ToJSON GetLog # 
Generic GetLog # 

Associated Types

type Code GetLog :: [[*]] #

Methods

from :: GetLog -> Rep GetLog #

to :: Rep GetLog -> GetLog #

HasDatatypeInfo GetLog # 

Associated Types

type DatatypeInfoOf GetLog :: DatatypeInfo #

QueryLike GetLog # 

Methods

toQuery :: GetLog -> Query #

type Code GetLog # 
type DatatypeInfoOf GetLog # 
type DatatypeInfoOf GetLog = Newtype "Network.PagerDuty.REST.LogEntries" "GetLog" (Record "GetLog" ((:) FieldInfo (FieldInfo "_glTimeZone'") ([] FieldInfo)))

getLog :: LogEntryId -> Request GetLog s LogEntry #

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 #

Time zone in which dates in the result will be rendered.

Default: UTC.

Types

Channels

ncService :: Lens' NagiosChannel (Maybe Text) #

Nagios service that created the event, if applicable.

ncState :: Lens' NagiosChannel Text #

State the caused the event.

ncDetails :: Lens' NagiosChannel Object #

Additional details of the incident.

acSummary :: Lens' APIChannel Text #

Same as description.

acDescription :: Lens' APIChannel Text #

Description of the event.

acIncidentKey :: Lens' APIChannel IncidentKey #

Incident deduping string.

acDetails :: Lens' APIChannel Object #

Additional details of the incident, if any.

ecSummary :: Lens' EmailChannel Text #

Same as subject.

ecTo :: Lens' EmailChannel Text #

To address of the email.

ecFrom :: Lens' EmailChannel Text #

From address of the email.

ecSubject :: Lens' EmailChannel Text #

Subject of the email.

ecBody :: Lens' EmailChannel Text #

Body of the email.

ecBodyContentType :: Lens' EmailChannel EmailType #

Content type of the email body.

ecRawUrl :: Lens' EmailChannel Text #

URL for raw text of email.

ecHtmlUrl :: Lens' EmailChannel (Maybe Text) #

URL for html rendered version of the email.

Only present if content_type is HTML.

wcSubject :: Lens' WebTriggerChannel Text #

Subject of the web trigger.

wcDetails :: Lens' WebTriggerChannel (Maybe Text) #

Details about the web trigger.

Entries

data Entry #

Constructors

LogEntry LogEntry

Log entries come in a wide variety of types. Most types use this format, the exception being the NotifyEntry type.

NotifyEntry NotifyEntry

A user was notified.

Instances

Eq Entry # 

Methods

(==) :: Entry -> Entry -> Bool #

(/=) :: Entry -> Entry -> Bool #

Show Entry # 

Methods

showsPrec :: Int -> Entry -> ShowS #

show :: Entry -> String #

showList :: [Entry] -> ShowS #

data LogEntryType #

Constructors

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.

leId :: Lens' LogEntry LogEntryId #

Id of the log entry.

leType :: Lens' LogEntry LogEntryType #

The type of the log entry.

leCreatedAt :: Lens' LogEntry Date #

Time at which the log entry was created.

leNote :: Lens' LogEntry (Maybe Text) #

Optional field containing an action note, if one was included with the action.

leAssignedUser :: Lens' LogEntry (Maybe User) #

Only for assign, escalate log entries. The user to which the incident is assigned.

leChannel :: Lens' LogEntry Channel #

Representation of the means by which the action was channeled and the possible perfomer of this action.

data NotifyEntry #

Notify log entries correspond to notifications sent to users. They have a distinct format from action log entries.

neCreatedAt :: Lens' NotifyEntry UTCTime #

Time at which the log entry was created

neUser :: Lens' NotifyEntry User #

User who was notified

neNotification :: Lens' NotifyEntry Notification #

Object representing the notification itself

nType :: Lens' Notification NotificationType #

Type of notification.

nStatus :: Lens' Notification NotificationStatus #

The current status of the notification.

nAddress :: Lens' Notification Address #

The address to which the notification was sent. I.e., an email address, phone number, or iPhone name.