@@ -0,0 +1,102 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE TemplateHaskell #-}
3+
4+-- Module : Network.PagerDuty.REST.Incidents
5+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
6+-- License : This Source Code Form is subject to the terms of
7+-- the Mozilla Public License, v. 2.0.
8+-- A copy of the MPL can be found in the LICENSE file or
9+-- you can obtain it at http://mozilla.org/MPL/2.0/.
10+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
11+-- Stability : experimental
12+-- Portability : non-portable (GHC extensions)
13+
14+-- | PagerDuty receives updates (called events) from monitoring systems through
15+-- services (like Nagios, email or generic API calls). Upon receiving an event,
16+-- active services will create a new incident and begin escalating it as
17+-- defined by the service's escalation policy. Events can be de-duplicated into
18+-- existing incidents based on service de-duplication rules to prevent you from
19+-- being overwhelmed by event storms.
20+--
21+-- An incident can be open, acknowledged or resolved. Whenever an incident is
22+-- created, it is assigned to a user (according to the escalation process, as
23+-- described by escalation rules and schedules). The assigned user has a chance
24+-- to either acknowledge that he is working on it, or to resolve it.
25+--
26+-- Resolving an incident closes it, whereas acknowledging it halts the
27+-- escalation process. If the incident is not resolved by the service's
28+-- incident ack timeout it continues up the escalation chain.
29+--
30+-- When an incident is triggered or when it is escalated it creates alerts
31+-- (also known as notifications). Alerts are messages containing the details of
32+-- the incident, and can be sent through SMS, email and phone calls.
33+--
34+-- Incidents and Incident Counts from the last 30 days are returned by
35+-- default. To change this default date range, see the documentation for the
36+-- since, until or date_range parameters.
37+--
38+-- Note: that to create an incident you need to trigger it through the
39+-- "Network.PagerDuty.Integration" API.
40+module Network.PagerDuty.REST.Incidents
41+ (
42+
43+ ) where
44+
45+incidents :: Path
46+incidents = "incidents"
47+
48+-- | The PagerDuty incidents query API can be used to query current and
49+-- historical PagerDuty incidents over a date range, letting you build custom
50+-- dashboards or incident reports. The API allows for searching for incidents
51+-- with multiple filters or query parameters, various sorts, and also supports
52+-- the pagination of results.
53+--
54+-- @GET \/incidents@
55+--
56+-- See: <http://developer.pagerduty.com/documentation/rest/incidents/list>
57+listIncidents = undefined
58+
59+-- | Get detailed information about an incident. Accepts either an incident id,
60+-- or an incident number.
61+--
62+-- @GET \/incidents\/\:id@
63+--
64+-- See: <http://developer.pagerduty.com/documentation/rest/incidents/show>
65+getIncident = undefined
66+
67+-- | Use this query if you are simply looking for the count of incidents that
68+-- match a given query. This should be used if you don't need access to the
69+-- actual incident details.
70+--
71+-- @GET \/incidents\/count@
72+--
73+-- See: <http://developer.pagerduty.com/documentation/rest/incidents/count>
74+countIncidents = undefined
75+
76+-- | Acknowledge, resolve, escalate or reassign one or more incidents.
77+--
78+-- @PUT \/incidents@
79+--
80+-- See: <http://developer.pagerduty.com/documentation/rest/incidents/update>
81+updateIncidents = undefined
82+
83+-- | Resolve an incident.
84+--
85+-- @PUT \/incidents\/\:id\/resolve@
86+--
87+-- See: <http://developer.pagerduty.com/documentation/rest/incidents/resolve>
88+resolveIncident = undefined
89+
90+-- | Acknowledge an incident.
91+--
92+-- @PUT \/incidents\/\:id\/acknowledge@
93+--
94+-- See: <http://developer.pagerduty.com/documentation/rest/incidents/acknowledge>
95+acknowledgeIncident = undefined
96+
97+-- | Reassign an incident.
98+--
99+-- @PUT \/incidents\/\:id\/reassign@
100+--
101+-- See: <http://developer.pagerduty.com/documentation/rest/incidents/reassign>
102+reassignIncident = undefined