alerts
Creates, updates, deletes, gets or lists an alerts
resource.
Overview
Name | alerts |
Type | Resource |
Id | pagerduty.incidents.alerts |
Fields
The following fields are returned by SELECT
queries:
- get_incident_alert
- list_incident_alerts
The alert requested.
Name | Datatype | Description |
---|---|---|
id | string | |
alert_key | string | The alert's de-duplication key. |
body | object | A JSON object containing data describing the alert. (title: Body) |
created_at | string (date-time) | The date/time the alert was first triggered. |
first_trigger_log_entry | object | |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
incident | object | |
integration | object | |
self | string (url) | the API show URL at which the object is accessible |
service | object | |
severity | string | The magnitude of the problem as reported by the monitoring tool. |
status | string | The current status of the alert. |
summary | string | A 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. |
suppressed | boolean | Whether or not an alert is suppressed. Suppressed alerts are not created with a parent incident. |
type | string | The type of object being created. (default: alert) |
A paginated array of the incident's alerts.
Name | Datatype | Description |
---|---|---|
id | string | |
alert_key | string | The alert's de-duplication key. |
body | object | A JSON object containing data describing the alert. (title: Body) |
created_at | string (date-time) | The date/time the alert was first triggered. |
first_trigger_log_entry | object | |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
incident | object | |
integration | object | |
self | string (url) | the API show URL at which the object is accessible |
service | object | |
severity | string | The magnitude of the problem as reported by the monitoring tool. |
status | string | The current status of the alert. |
summary | string | A 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. |
suppressed | boolean | Whether or not an alert is suppressed. Suppressed alerts are not created with a parent incident. |
type | string | The type of object being created. (default: alert) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_incident_alert | select | id , alert_id | Accept , Content-Type | 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 |
list_incident_alerts | select | id | Accept , 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_alerts | exec | id | Accept , 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_alerts | exec | id , From , alerts | Accept , Content-Type , limit , offset , total | Resolve 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_alert | exec | id , alert_id | Accept , Content-Type | 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 |
update_incident_alert | exec | id , alert_id , From , alert | Accept , Content-Type | Resolve 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.
Name | Datatype | Description |
---|---|---|
From | string (email) | The email address of a valid user associated with the account making the request. |
alert_id | string | The id of the alert to retrieve. |
id | string | The ID of the resource. |
Accept | string | The Accept header is used as a versioning header. |
Content-Type | string | |
alert_key | string | Alert de-duplication key. |
include[] | string | Array of additional details to include. |
limit | integer | The number of results per page. |
offset | integer | Offset to start pagination search results. |
sort_by | string | Used 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[] | string | Return only alerts with the given statuses. (More status codes may be introduced in the future.) |
total | boolean | By 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
- get_incident_alert
- list_incident_alerts
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 }}'
;
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
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 Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
AND limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND total = '{{ total }}'
AND alert_key = '{{ alert_key }}'
AND statuses[] = '{{ statuses[] }}'
AND sort_by = '{{ sort_by }}'
AND include[] = '{{ include[] }}'
;
Lifecycle Methods
- _list_incident_alerts
- update_incident_alerts
- _get_incident_alert
- update_incident_alert
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[] }}'
;
Resolve 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
EXEC pagerduty.incidents.alerts.update_incident_alerts
@id='{{ id }}' --required,
@From='{{ From }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}',
@limit='{{ limit }}',
@offset='{{ offset }}',
@total={{ total }}
@@json=
'{
"alerts": "{{ alerts }}"
}'
;
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
EXEC pagerduty.incidents.alerts._get_incident_alert
@id='{{ id }}' --required,
@alert_id='{{ alert_id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
;
Resolve 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
EXEC pagerduty.incidents.alerts.update_incident_alert
@id='{{ id }}' --required,
@alert_id='{{ alert_id }}' --required,
@From='{{ From }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
@@json=
'{
"alert": "{{ alert }}"
}'
;