overrides
Creates, updates, deletes, gets or lists an overrides
resource.
Overview
Name | overrides |
Type | Resource |
Id | pagerduty.schedules.overrides |
Fields
The following fields are returned by SELECT
queries:
- list_schedule_overrides
The collection of override objects returned by the query.
Name | Datatype | Description |
---|---|---|
id | string | |
end | string (date-time) | The end date and time for the override. |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
self | string (url) | the API show URL at which the object is accessible |
start | string (date-time) | The start date and time for the override. |
summary | string | A 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. |
type | string | A 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. |
user | object |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_schedule_overrides | select | id , since , until | Accept , Content-Type , editable , overflow | 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 |
create_schedule_override | insert | id | Accept , Content-Type | 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 |
delete_schedule_override | delete | id , override_id | Accept , Content-Type | 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 |
_list_schedule_overrides | exec | id , since , until | Accept , Content-Type , editable , overflow | 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 |
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. |
override_id | string | The override ID on the schedule. |
since | string (date-time) | The start of the date range over which you want to search. |
until | string (date-time) | The end of the date range over which you want to search. |
Accept | string | The Accept header is used as a versioning header. |
Content-Type | string | |
editable | boolean | When 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. |
overflow | boolean | Any 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_schedule_overrides
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_schedule_override
- Manifest
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
;
# Description fields are for documentation purposes
- name: overrides
props:
- name: id
value: string
description: Required parameter for the overrides resource.
- name: overrides
value: array
- name: Accept
value: string
description: The `Accept` header is used as a versioning header.
- name: Content-Type
value: string
DELETE
examples
- delete_schedule_override
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_schedule_overrides
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 }}
;