Referencing other schecules

Our organization has different on-call schedules for specific teams in addition to a general on call schedule that most engineers (regardless of team) are on. Is there a way to configure the team schedules to avoid scheduling an engineering if they’re the active on-call engineer on the general schedule? Ultimately, our goal is to avoid scheduling an engineer on multiple on-call shifts among specific channels at the same time.

Not from within the product today. You could write a script and interact with /schedules and /on-calls endpoints to audit current configurations and flag where the double scheduling exists. (sending an alert/incident to someone to fix :smile:)

Thanks! I’m trying to write that script, but when I call the on-call API and pass in an array of schedule IDs, only the on-call from the first schedule in the array is returned. Is that the expected behavior? I thought it was supposed to return the on-call for every schedule included in the schedule_ids array.

As I read it yes. You might need to pass in a wide timeframe to ensure you’re finding on-calls from those other schedules

Hey Blake! I got the same results as you at first, but then a colleague pointed out that I need to repeat the same query parameter multiple times, as detailed here:

So something more like[]=PXXXXXX&schedule_ids[]=PYYYYYY…

Does your script repeat the schedule_id parameter?

Ah yes, thanks @annette.fuller – that seems to have solved the issue! It would be helpful if that could be clarified in the docs, the example in the docs, and the Postman collection. I couldn’t tell that that was what was needed. I was sending a comma-delimited list and the API was responding with a 200, but not all the oncalls like I was expecting.

Yes, absolutely! I’ve put in a request for our team who manages those docs to take a look, and update that example request script. Thanks for bringing this to our attention!