postmortems
Creates, updates, deletes, gets or lists a postmortems resource.
Overview
| Name | postmortems |
| Type | Resource |
| Id | pagerduty.status_pages.postmortems |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
id | string | An unique identifier within Status Page scope that defines a single Postmortem resource. |
message | string | The message of the Postmortem (supports Rich-Text). |
notify_subscribers | boolean | Whether or not subscribers of the Status Page should be notified about the Postmortem. |
post | object | Status Page Post |
reported_at | string (date-time) | The date and time the Postmortem was reported. |
self | string | The API resource URL of the Postmortem. |
type | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, post_id | Get a Postmortem for a Post by Post ID.<br /><br />Scoped OAuth requires: status_pages.read<br /> | |
update | update | id, post_id, postmortem | Create or Update a Postmortem for a Post by Post ID.<br /><br />Scoped OAuth requires: status_pages.write<br /> | |
delete | delete | id, post_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
post_id | string | The ID of the Status Page Post. |
SELECT examples
- get
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
- update
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
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
;