Skip to main content

postmortems

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

Overview

Namepostmortems
TypeResource
Idpagerduty.status_pages.postmortems

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringAn unique identifier within Status Page scope that defines a single Postmortem resource.
messagestringThe message of the Postmortem (supports Rich-Text).
notify_subscribersbooleanWhether or not subscribers of the Status Page should be notified about the Postmortem.
postobjectStatus Page Post
reported_atstring (date-time)The date and time the Postmortem was reported.
selfstringThe API resource URL of the Postmortem.
typestringThe type of the object returned by the API - in this case, a Status Page Post Postmortem.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, post_idGet a Postmortem for a Post by Post ID.<br /><br />Scoped OAuth requires: status_pages.read<br />
updateupdateid, post_id, postmortemCreate or Update a Postmortem for a Post by Post ID.<br /><br />Scoped OAuth requires: status_pages.write<br />
deletedeleteid, post_idDelete a Postmortem for a Post by Post ID.<br /><br />Scoped OAuth requires: status_pages.write<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.
post_idstringThe ID of the Status Page Post.

SELECT examples

Get a Postmortem for a Post by Post ID.<br /><br />Scoped OAuth requires: status_pages.read<br />

SELECT
id,
message,
notify_subscribers,
post,
reported_at,
self,
type
FROM pagerduty.status_pages.postmortems
WHERE id = '{{ id }}' -- required
AND post_id = '{{ post_id }}' -- required
;

UPDATE examples

Create or Update a Postmortem for a Post by Post ID.<br /><br />Scoped OAuth requires: status_pages.write<br />

UPDATE pagerduty.status_pages.postmortems
SET
postmortem = '{{ postmortem }}'
WHERE
id = '{{ id }}' --required
AND post_id = '{{ post_id }}' --required
AND postmortem = '{{ postmortem }}' --required
RETURNING
postmortem;

DELETE examples

Delete a Postmortem for a Post by Post ID.<br /><br />Scoped OAuth requires: status_pages.write<br />

DELETE FROM pagerduty.status_pages.postmortems
WHERE id = '{{ id }}' --required
AND post_id = '{{ post_id }}' --required
;