Skip to main content

overrides

Creates, updates, deletes, gets or lists an overrides resource.

Overview

Nameoverrides
TypeResource
Idpagerduty.schedules.overrides

Fields

The following fields are returned by SELECT queries:

The collection of override objects returned by the query.

NameDatatypeDescription
idstring
endstring (date-time)The end date and time for the override.
html_urlstring (url)a URL at which the entity is uniquely displayed in the Web app
selfstring (url)the API show URL at which the object is accessible
startstring (date-time)The start date and time for the override.
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.
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.
userobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_schedule_overridesselectid, since, untilAccept, Content-Type, editable, overflowList overrides for a given time range.

A Schedule determines the time periods that users are On-Call.

For more information see the API Concepts Document

Scoped OAuth requires: schedules.read
create_schedule_overrideinsertidAccept, Content-TypeCreate one or more overrides, each for a specific user covering a specified time range. If you create an override on top of an existing override, the last created override will have priority.

A Schedule determines the time periods that users are On-Call.

Note: An older implementation of this endpoint only supported creating a single ocverride per request. That functionality is still supported, but deprecated and may be removed in the future.

For more information see the API Concepts Document

Scoped OAuth requires: schedules.write
delete_schedule_overridedeleteid, override_idAccept, Content-TypeRemove an override.

You cannot remove a past override.

If the override start time is before the current time, but the end time is after the current time, the override will be truncated to the current time.

If the override is truncated, the status code will be 200 OK, as opposed to a 204 No Content for a successful delete.

A Schedule determines the time periods that users are On-Call.

For more information see the API Concepts Document

Scoped OAuth requires: schedules.write
_list_schedule_overridesexecid, since, untilAccept, Content-Type, editable, overflowList overrides for a given time range.

A Schedule determines the time periods that users are On-Call.

For more information see the API Concepts Document

Scoped OAuth requires: schedules.read

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.
override_idstringThe override ID on the schedule.
sincestring (date-time)The start of the date range over which you want to search.
untilstring (date-time)The end of the date range over which you want to search.
AcceptstringThe Accept header is used as a versioning header.
Content-Typestring
editablebooleanWhen this parameter is present, only editable overrides will be returned. The result will only include the id of the override if this parameter is present. Only future overrides are editable.
overflowbooleanAny on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter overflow=true is passed. This parameter defaults to false.

SELECT examples

List overrides for a given time range.

A Schedule determines the time periods that users are On-Call.

For more information see the API Concepts Document

Scoped OAuth requires: schedules.read

SELECT
id,
end,
html_url,
self,
start,
summary,
type,
user
FROM pagerduty.schedules.overrides
WHERE id = '{{ id }}' -- required
AND since = '{{ since }}' -- required
AND until = '{{ until }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
AND editable = '{{ editable }}'
AND overflow = '{{ overflow }}'
;

INSERT examples

Create one or more overrides, each for a specific user covering a specified time range. If you create an override on top of an existing override, the last created override will have priority.

A Schedule determines the time periods that users are On-Call.

Note: An older implementation of this endpoint only supported creating a single ocverride per request. That functionality is still supported, but deprecated and may be removed in the future.

For more information see the API Concepts Document

Scoped OAuth requires: schedules.write

INSERT INTO pagerduty.schedules.overrides (
data__overrides,
id,
Accept,
Content-Type
)
SELECT
'{{ overrides }}',
'{{ id }}',
'{{ Accept }}',
'{{ Content-Type }}'
RETURNING
errors,
override,
status
;

DELETE examples

Remove an override.

You cannot remove a past override.

If the override start time is before the current time, but the end time is after the current time, the override will be truncated to the current time.

If the override is truncated, the status code will be 200 OK, as opposed to a 204 No Content for a successful delete.

A Schedule determines the time periods that users are On-Call.

For more information see the API Concepts Document

Scoped OAuth requires: schedules.write

DELETE FROM pagerduty.schedules.overrides
WHERE id = '{{ id }}' --required
AND override_id = '{{ override_id }}' --required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;

Lifecycle Methods

List overrides for a given time range.

A Schedule determines the time periods that users are On-Call.

For more information see the API Concepts Document

Scoped OAuth requires: schedules.read

EXEC pagerduty.schedules.overrides._list_schedule_overrides 
@id='{{ id }}' --required,
@since='{{ since }}' --required,
@until='{{ until }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}',
@editable={{ editable }},
@overflow={{ overflow }}
;