PagerDuty / api-schema

PagerDuty OpenAPI schemas
30 stars 25 forks source link

Schedules: Listing does not include defined `overrides_subsection` and `final_schedule` #430

Open joshmfrankel opened 10 months ago

joshmfrankel commented 10 months ago

In the api documentation for listing all Schedules, it shows the overrides_subschedule and final_schedule as returned response data. However, these don't seem accessible from this endpoint.

I was able to receive the rendered_schedule_entries from within schedule_layers by specifying:

time_zone is required to utilize since or until. Since and until at this endpoint seem to be undocumented

Requesting a singular Schedule from the https://api.pagerduty.com /schedules/{id} endpoint will properly return overrides_subschedule and final_schedule. Ideally, this data would also be available from the Listing Schedules endpoint.

UPDATE You can indeed return available overrides from the /schedules/ endpoint. The following criteria is necessary to make it work:

Basically, you must include overrides_subschedule within the include param of the API request. This along with a proper since and until where the override is within the time period, will properly return data.