change_events
Creates, updates, deletes, gets or lists a change_events
resource.
Overview
Name | change_events |
Type | Resource |
Id | pagerduty.change_events.change_events |
Fields
The following fields are returned by SELECT
queries:
- get_change_event
- list_change_events
The Change Event requested.
Name | Datatype | Description |
---|---|---|
id | string | |
custom_details | object | Additional details about the change event. (title: Custom Details) |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
images | array | |
integration | object | |
links | array | List of links to include. |
routing_key | string | This is the 32 character Integration Key for an Integration on a Service. The same Integration Key can be used for both alert and change events. (title: Routing Key) |
self | string (url) | the API show URL at which the object is accessible |
services | array | An array containing Service objects that this change event is associated with. |
source | string | The unique name of the location where the Change Event occurred. |
summary | string | A brief text summary of the event. Displayed in PagerDuty to provide information about the change. The maximum permitted length of this property is 1024 characters. |
timestamp | string (date-time) | The time at which the emitting tool detected or generated the event. |
type | string | The type of object being created. (default: change_event) |
The array of Change Events returned by the query.
Name | Datatype | Description |
---|---|---|
id | string | |
custom_details | object | Additional details about the change event. (title: Custom Details) |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
images | array | |
integration | object | |
links | array | List of links to include. |
routing_key | string | This is the 32 character Integration Key for an Integration on a Service. The same Integration Key can be used for both alert and change events. (title: Routing Key) |
self | string (url) | the API show URL at which the object is accessible |
services | array | An array containing Service objects that this change event is associated with. |
source | string | The unique name of the location where the Change Event occurred. |
summary | string | A brief text summary of the event. Displayed in PagerDuty to provide information about the change. The maximum permitted length of this property is 1024 characters. |
timestamp | string (date-time) | The time at which the emitting tool detected or generated the event. |
type | string | The type of object being created. (default: change_event) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_change_event | select | id | Accept , Content-Type | Get details about an existing Change Event. Scoped OAuth requires: change_events.read |
list_change_events | select | limit , offset , total , Accept , Content-Type , team_ids[] , integration_ids[] , since , until | List all of the existing Change Events. Scoped OAuth requires: change_events.read | |
create_change_event | insert | Accept , Content-Type | Sending Change Events is documented as part of the V2 Events API. See Send Change Event . | |
_list_change_events | exec | limit , offset , total , Accept , Content-Type , team_ids[] , integration_ids[] , since , until | List all of the existing Change Events. Scoped OAuth requires: change_events.read | |
_get_change_event | exec | id | Accept , Content-Type | Get details about an existing Change Event. Scoped OAuth requires: change_events.read |
update_change_event | exec | id , change_event | Accept , Content-Type | Update an existing Change Event Scoped OAuth requires: change_events.write |
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. |
Accept | string | The Accept header is used as a versioning header. |
Content-Type | string | |
integration_ids[] | array | An array of integration IDs. Only results related to these integrations will be returned. |
limit | integer | The number of results per page. |
offset | integer | Offset to start pagination search results. |
since | string (date-time) | The start of the date range over which you want to search, as a UTC ISO 8601 datetime string. Will return an HTTP 400 for non-UTC datetimes. |
team_ids[] | array | An array of team IDs. Only results related to these teams will be returned. Account must have the teams ability to use this parameter. |
total | boolean | By default the total field in pagination responses is set to null to provide the fastest possible response times. Set total to true for this field to be populated. See our Pagination Docs for more information. |
until | string (date-time) | The end of the date range over which you want to search, as a UTC ISO 8601 datetime string. Will return an HTTP 400 for non-UTC datetimes. |
SELECT
examples
- get_change_event
- list_change_events
Get details about an existing Change Event.
Scoped OAuth requires: change_events.read
SELECT
id,
custom_details,
html_url,
images,
integration,
links,
routing_key,
self,
services,
source,
summary,
timestamp,
type
FROM pagerduty.change_events.change_events
WHERE id = '{{ id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;
List all of the existing Change Events.
Scoped OAuth requires: change_events.read
SELECT
id,
custom_details,
html_url,
images,
integration,
links,
routing_key,
self,
services,
source,
summary,
timestamp,
type
FROM pagerduty.change_events.change_events
WHERE limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND total = '{{ total }}'
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
AND team_ids[] = '{{ team_ids[] }}'
AND integration_ids[] = '{{ integration_ids[] }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
;
INSERT
examples
- create_change_event
- Manifest
Sending Change Events is documented as part of the V2 Events API. See Send Change Event
.
INSERT INTO pagerduty.change_events.change_events (
Accept,
Content-Type
)
SELECT
'{{ Accept }}',
'{{ Content-Type }}'
;
# Description fields are for documentation purposes
- name: change_events
props:
- name: Accept
value: string
description: The `Accept` header is used as a versioning header.
- name: Content-Type
value: string
Lifecycle Methods
- _list_change_events
- _get_change_event
- update_change_event
List all of the existing Change Events.
Scoped OAuth requires: change_events.read
EXEC pagerduty.change_events.change_events._list_change_events
@limit='{{ limit }}',
@offset='{{ offset }}',
@total={{ total }},
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}',
@team_ids[]='{{ team_ids[] }}',
@integration_ids[]='{{ integration_ids[] }}',
@since='{{ since }}',
@until='{{ until }}'
;
Get details about an existing Change Event.
Scoped OAuth requires: change_events.read
EXEC pagerduty.change_events.change_events._get_change_event
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
;
Update an existing Change Event
Scoped OAuth requires: change_events.write
EXEC pagerduty.change_events.change_events.update_change_event
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
@@json=
'{
"change_event": "{{ change_event }}"
}'
;