Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joshmfrankel opened this issue Jan 25, 2024 · 0 comments

Comments

@joshmfrankel
Copy link

joshmfrankel commented Jan 25, 2024

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:

  • include - ["schedule_layers"]
  • since - datetime string in past
  • until - datetime string in future
  • time_zone - string time zone

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:

  • include - ["schedule_layers", "overrides_subschedule"]
  • since - datetime string in past
  • until - datetime string in future
  • time_zone - string time zone

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant