pagex v0.1.0 Pagex.Incidents View Source

Client for the Incidents API v2 from Pagerduty.

Link to this section Summary

Link to this section Types

Link to this type

response() View Source
response() :: {:ok, map()} | {:error, map()} | {:error, String.t()}

Link to this section Functions

Link to this function

create(title, service, from, opts \\ []) View Source
create(String.t(), String.t(), String.t(), Keyword.t()) :: response()

Create a new Incident.

  • title - A succinct description of the nature, symptoms, cause or effect of the incident.
  • service - The incident will be created on this service.
  • from - The email address from the Pagerduty user to be associated with the triggering of the request.

Options

  • urgency - The urgency of the incident. Can be :high or :low.
  • incident_key - A string which identifies the incident. Sending subsequent requests referencing the same service and with the same incident_key will result in those requests being rejected if an open incident matches that incident_key.

Examples

iex> Pagex.Incidents.create("Test", "MyServiceID", "user@example.com")