Skip to main content

past_incidents

Creates, updates, deletes, gets or lists a past_incidents resource.

Overview​

Namepast_incidents
TypeResource
Idpagerduty.incidents.past_incidents

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
incidentobjectIncident model reference
scorenumberThe computed similarity score associated with the incident and parent incident

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectidlimit, totalPast Incidents returns Incidents within the past 6 months that have similar metadata and were generated on the same Service as the parent Incident. By default, 5 Past Incidents are returned. Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#past_incidents)<br /><br />Scoped OAuth requires: incidents.read<br />

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
idstringThe ID of the resource.
limitintegerThe number of results to be returned in the response.
totalbooleanBy default the total field in the response body is set to null to provide the fastest possible response times. Set total to true for this field to be populated with the total number of Past Incidents.

SELECT examples​

Past Incidents returns Incidents within the past 6 months that have similar metadata and were generated on the same Service as the parent Incident. By default, 5 Past Incidents are returned. Note: This feature is currently available as part of the Event Intelligence package or Digital Operations plan only.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#past_incidents)<br /><br />Scoped OAuth requires: incidents.read<br />

SELECT
incident,
score
FROM pagerduty.incidents.past_incidents
WHERE id = '{{ id }}' -- required
AND limit = '{{ limit }}'
AND total = '{{ total }}'
;