Skip to main content

alerts

Creates, updates, deletes, gets or lists an alerts resource.

Overview

Namealerts
TypeResource
Idpagerduty.incidents.alerts

Fields

The following fields are returned by SELECT queries:

The alert requested.

NameDatatypeDescription
idstring
alert_keystringThe alert's de-duplication key.
bodyobjectA JSON object containing data describing the alert. (title: Body)
created_atstring (date-time)The date/time the alert was first triggered.
first_trigger_log_entryobject
html_urlstring (url)a URL at which the entity is uniquely displayed in the Web app
incidentobject
integrationobject
selfstring (url)the API show URL at which the object is accessible
serviceobject
severitystringThe magnitude of the problem as reported by the monitoring tool.
statusstringThe current status of the alert.
summarystringA short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
suppressedbooleanWhether or not an alert is suppressed. Suppressed alerts are not created with a parent incident.
typestringThe type of object being created. (default: alert)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_incident_alertselectid, alert_idAccept, Content-TypeShow detailed information about an alert. Accepts an alert id.

An incident represents a problem or an issue that needs to be addressed and resolved.

When a service sends an event to PagerDuty, an alert and corresponding incident is triggered in PagerDuty.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read
list_incident_alertsselectidAccept, Content-Type, limit, offset, total, alert_key, statuses[], sort_by, include[]List alerts for the specified incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read
_list_incident_alertsexecidAccept, Content-Type, limit, offset, total, alert_key, statuses[], sort_by, include[]List alerts for the specified incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read
update_incident_alertsexecid, From, alertsAccept, Content-Type, limit, offset, totalResolve multiple alerts or associate them with different incidents.

An incident represents a problem or an issue that needs to be addressed and resolved. An alert represents a digital signal that was emitted to PagerDuty by the monitoring systems that detected or identified the issue.

A maximum of 500 alerts may be updated at a time. If more than this number of alerts are given, the API will respond with status 413 (Request Entity Too Large).

For more information see the API Concepts Document

Scoped OAuth requires: incidents.write
_get_incident_alertexecid, alert_idAccept, Content-TypeShow detailed information about an alert. Accepts an alert id.

An incident represents a problem or an issue that needs to be addressed and resolved.

When a service sends an event to PagerDuty, an alert and corresponding incident is triggered in PagerDuty.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read
update_incident_alertexecid, alert_id, From, alertAccept, Content-TypeResolve an alert or associate an alert with a new parent incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

When a service sends an event to PagerDuty, an alert and corresponding incident is triggered in PagerDuty.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.write

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
Fromstring (email)The email address of a valid user associated with the account making the request.
alert_idstringThe id of the alert to retrieve.
idstringThe ID of the resource.
AcceptstringThe Accept header is used as a versioning header.
Content-Typestring
alert_keystringAlert de-duplication key.
include[]stringArray of additional details to include.
limitintegerThe number of results per page.
offsetintegerOffset to start pagination search results.
sort_bystringUsed to specify both the field you wish to sort the results on (created_at/resolved_at), as well as the direction (asc/desc) of the results. The sort_by field and direction should be separated by a colon. A maximum of two fields can be included, separated by a comma. Sort direction defaults to ascending.
statuses[]stringReturn only alerts with the given statuses. (More status codes may be introduced in the future.)
totalbooleanBy default the total field in pagination responses is set to null to provide the fastest possible response times. Set total to true for this field to be populated. See our Pagination Docs for more information.

SELECT examples

Show detailed information about an alert. Accepts an alert id.

An incident represents a problem or an issue that needs to be addressed and resolved.

When a service sends an event to PagerDuty, an alert and corresponding incident is triggered in PagerDuty.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read

SELECT
id,
alert_key,
body,
created_at,
first_trigger_log_entry,
html_url,
incident,
integration,
self,
service,
severity,
status,
summary,
suppressed,
type
FROM pagerduty.incidents.alerts
WHERE id = '{{ id }}' -- required
AND alert_id = '{{ alert_id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;

Lifecycle Methods

List alerts for the specified incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read

EXEC pagerduty.incidents.alerts._list_incident_alerts 
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}',
@limit='{{ limit }}',
@offset='{{ offset }}',
@total={{ total }},
@alert_key='{{ alert_key }}',
@statuses[]='{{ statuses[] }}',
@sort_by='{{ sort_by }}',
@include[]='{{ include[] }}'
;