Skip to main content

posts

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

Overview

Nameposts
TypeResource
Idpagerduty.status_pages.posts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringAn unique identifier within Status Page scope that defines a single Post resource.
ends_atstring (date-time)The date and time the Post intent is concluded - only for maintenance post type.
linked_resourceobjectLinked resource
post_typestringThe type of the Post. (incident, maintenance)
postmortemobjectPostmortem
selfstringThe API resource URL of the Post.
starts_atstring (date-time)The date and time the Post intent becomes effective - only for maintenance post type.
status_pageobjectStatus Page
titlestringThe title given to a Post.
typestringThe type of the object returned by the API - in this case, a Status Page Post. (default: status_page_post)
updatesarrayList of status_page_post_update references associated to a Post.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, post_idinclude[]Get a Post for a Status Page by Status Page ID and Post ID.<br /><br />Scoped OAuth requires: status_pages.read<br />
listselectidpost_type, reviewed_status, status[]List Posts for a Status Page by Status Page ID.<br /><br />Scoped OAuth requires: status_pages.read<br />
createinsertid, postCreate a Post for a Status Page by Status Page ID.<br /><br />Scoped OAuth requires: status_pages.write<br />
updateupdateid, post_id, postUpdate a Post for a Status Page by Status Page ID.<br /><br />Scoped OAuth requires: status_pages.write<br />
deletedeleteid, post_idDelete a Post for a Status Page by Status Page ID and 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.
include[]arrayArray of additional Models to include in response.
post_typestringFilter by Post type.
reviewed_statusstringFilter by the reviewed status of the Post to retrieve.
status[]arrayFilter by an array of Status identifiers.

SELECT examples

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

SELECT
id,
ends_at,
linked_resource,
post_type,
postmortem,
self,
starts_at,
status_page,
title,
type,
updates
FROM pagerduty.status_pages.posts
WHERE id = '{{ id }}' -- required
AND post_id = '{{ post_id }}' -- required
AND include[] = '{{ include[] }}'
;

INSERT examples

Create a Post for a Status Page by Status Page ID.<br /><br />Scoped OAuth requires: status_pages.write<br />

INSERT INTO pagerduty.status_pages.posts (
post,
id
)
SELECT
'{{ post }}' /* required */,
'{{ id }}'
RETURNING
post
;

UPDATE examples

Update a Post for a Status Page by Status Page ID.<br /><br />Scoped OAuth requires: status_pages.write<br />

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

DELETE examples

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

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