Skip to content

Commit

Permalink
Incident alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
soullivaneuh committed Mar 14, 2019
1 parent 7092c33 commit 8c8a1d9
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions incident.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,21 @@ func (c *Client) ListIncidentNotes(id string) ([]IncidentNote, error) {

// IncidentAlert is a alert for the specified incident.
type IncidentAlert struct {
ID string `json:"id,omitempty"`
Summary string `json:"summary,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
AlertKey string `json:"alert_key,omitempty"`
APIObject
CreatedAt string `json:"created_at,omitempty"`
Status string `json:"status,omitempty"`
AlertKey string `json:"alert_key,omitempty"`
Service APIObject `json:"service,omitempty"`
Body []interface{} `json:"body,omitempty"`
Incident APIReference `json:"incident,omitempty"`
Suppressed bool `json:"suppressed,omitempty"`
Severity string `json:"severity,omitempty"`
Integration APIObject `json:"integration,omitempty"`
}

// ListIncidentAlerts lists existing alerts for the specified incident.
func (c *Client) ListIncidentAlerts(id string) ([]IncidentAlert, error) {
resp, err := c.get("/incidents/"+id+"/alerts")
resp, err := c.get("/incidents/" + id + "/alerts")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 8c8a1d9

Please sign in to comment.