Skip to main content

service_change_events

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

Overview

Nameservice_change_events
TypeResource
Idpagerduty.change_events.service_change_events

Fields

The following fields are returned by SELECT queries:

The array of Change Events returned by the query.

NameDatatypeDescription
idstring
custom_detailsstringAdditional details about the change event. (opaque JSON object) (title: Custom Details)
html_urlstring (url)a URL at which the entity is uniquely displayed in the Web app
imagesarray
integrationobject(opaque JSON object)
linksarrayList of links to include.
routing_keystringThis 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)
selfstring (url)the API show URL at which the object is accessible
servicesarrayAn array containing Service objects that this change event is associated with.
sourcestringThe unique name of the location where the Change Event occurred.
summarystringA short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
timestampstring (date-time)The time at which the emitting tool detected or generated the event.
typestringA string that determines the schema of the object. This must be the standard name for the entity, suffixed by _reference if the object is a reference.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectidsince, until, limit, offset, total, team_ids[], integration_ids[]List all of the existing Change Events for a service.<br /><br />Scoped OAuth requires: services.read<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.
integration_ids[]arrayAn array of integration IDs. Only results related to these integrations will be returned.
limitintegerThe number of results per page.
offsetintegerOffset to start pagination search results.
sincestring (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[]arrayAn array of team IDs. Only results related to these teams will be returned. Account must have the teams ability to use this parameter.
totalbooleanBy 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](https:​//developer.pagerduty.com/docs/rest-api-v2/pagination/) for more information.
untilstring (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

List all of the existing Change Events for a service.<br /><br />Scoped OAuth requires: services.read<br />

SELECT
id,
custom_details,
html_url,
images,
integration,
links,
routing_key,
self,
services,
source,
summary,
timestamp,
type
FROM pagerduty.change_events.service_change_events
WHERE id = '{{ id }}' -- required
AND since = '{{ since }}'
AND until = '{{ until }}'
AND limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND total = '{{ total }}'
AND team_ids[] = '{{ team_ids[] }}'
AND integration_ids[] = '{{ integration_ids[] }}'
;