posts
Creates, updates, deletes, gets or lists a posts resource.
Overview
| Name | posts |
| Type | Resource |
| Id | pagerduty.status_pages.posts |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | An unique identifier within Status Page scope that defines a single Post resource. |
ends_at | string (date-time) | The date and time the Post intent is concluded - only for maintenance post type. |
linked_resource | object | Linked resource |
post_type | string | The type of the Post. (incident, maintenance) |
postmortem | object | Postmortem |
self | string | The API resource URL of the Post. |
starts_at | string (date-time) | The date and time the Post intent becomes effective - only for maintenance post type. |
status_page | object | Status Page |
title | string | The title given to a Post. |
type | string | The type of the object returned by the API - in this case, a Status Page Post. (default: status_page_post) |
updates | array | List of status_page_post_update references associated to a Post. |
| Name | Datatype | Description |
|---|---|---|
id | string | An unique identifier within Status Page scope that defines a single Post resource. |
ends_at | string (date-time) | The date and time the Post intent is concluded - only for maintenance post type. |
linked_resource | object | Linked resource |
post_type | string | The type of the Post. (incident, maintenance) |
postmortem | object | Postmortem |
self | string | The API resource URL of the Post. |
starts_at | string (date-time) | The date and time the Post intent becomes effective - only for maintenance post type. |
status_page | object | Status Page |
title | string | The title given to a Post. |
type | string | The type of the object returned by the API - in this case, a Status Page Post. (default: status_page_post) |
updates | array | List of status_page_post_update references associated to a Post. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, post_id | include[] | Get a Post for a Status Page by Status Page ID and Post ID.<br /><br />Scoped OAuth requires: status_pages.read<br /> |
list | select | id | post_type, reviewed_status, status[] | List Posts for a Status Page by Status Page ID.<br /><br />Scoped OAuth requires: status_pages.read<br /> |
create | insert | id, post | Create a Post for a Status Page by Status Page ID.<br /><br />Scoped OAuth requires: status_pages.write<br /> | |
update | update | id, post_id, post | Update a Post for a Status Page by Status Page ID.<br /><br />Scoped OAuth requires: status_pages.write<br /> | |
delete | delete | id, post_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
post_id | string | The ID of the Status Page Post. |
include[] | array | Array of additional Models to include in response. |
post_type | string | Filter by Post type. |
reviewed_status | string | Filter by the reviewed status of the Post to retrieve. |
status[] | array | Filter by an array of Status identifiers. |
SELECT examples
- get
- list
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[] }}'
;
List Posts for a Status Page by Status Page 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_type = '{{ post_type }}'
AND reviewed_status = '{{ reviewed_status }}'
AND status[] = '{{ status[] }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: posts
props:
- name: id
value: "{{ id }}"
description: Required parameter for the posts resource.
- name: post
description: |
Request schema for creating/updating a given Status Page Post resource.
value:
type: "{{ type }}"
title: "{{ title }}"
post_type: "{{ post_type }}"
starts_at: "{{ starts_at }}"
ends_at: "{{ ends_at }}"
updates:
- self: "{{ self }}"
post:
id: "{{ id }}"
type: "{{ type }}"
message: "{{ message }}"
status:
id: "{{ id }}"
type: "{{ type }}"
severity:
id: "{{ id }}"
type: "{{ type }}"
impacted_services: "{{ impacted_services }}"
update_frequency_ms: {{ update_frequency_ms }}
notify_subscribers: {{ notify_subscribers }}
reported_at: "{{ reported_at }}"
type: "{{ type }}"
status_page:
id: "{{ id }}"
type: "{{ type }}"
UPDATE examples
- update
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
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
;