oncall API returning duplicate oncall entries

We have an internal application that reads from the oncall API to calculate individual employee hours oncall for any given week. It has been working really well until recently, for a particular oncall schedule, the API returns the same entries multiple times in the array. I cannot find anything abnormal about the schedule when looking at it via the UI.

The actual query that recreates this:
https://api.pagerduty.com/oncalls?schedule_ids[]=PYKR1EK&escalation_policy_ids[]=PP7IQUY&time_zone=UTC&since=2020-11-02T00:00:00.000Z&until=2020-11-09T00:00:00.000Z

The results look like this, modified for easy reading and to protect names.
{
“oncalls”: [
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “PAPHCIN” },
“start”: “2020-10-26T04:00:00Z”,
“end”: “2020-11-02T05:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T05:00:00Z”,
“end”: “2020-11-02T19:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T05:00:00Z”,
“end”: “2020-11-02T19:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T05:00:00Z”,
“end”: “2020-11-02T19:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T05:00:00Z”,
“end”: “2020-11-02T19:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T05:00:00Z”,
“end”: “2020-11-02T19:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P6HB37Q” },
“start”: “2020-11-02T19:00:00Z”,
“end”: “2020-11-02T22:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P6HB37Q” },
“start”: “2020-11-02T19:00:00Z”,
“end”: “2020-11-02T22:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P6HB37Q” },
“start”: “2020-11-02T19:00:00Z”,
“end”: “2020-11-02T22:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P6HB37Q” },
“start”: “2020-11-02T19:00:00Z”,
“end”: “2020-11-02T22:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P6HB37Q” },
“start”: “2020-11-02T19:00:00Z”,
“end”: “2020-11-02T22:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T22:00:00Z”,
“end”: “2020-11-09T05:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T22:00:00Z”,
“end”: “2020-11-09T05:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T22:00:00Z”,
“end”: “2020-11-09T05:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T22:00:00Z”,
“end”: “2020-11-09T05:00:00Z”
},
{
“escalation_policy”: { “id”: “PP7IQUY” },
“escalation_level”: 1,
“schedule”: { “id”: “PYKR1EK” },
“user”: { “id”: “P2J8RKT” },
“start”: “2020-11-02T22:00:00Z”,
“end”: “2020-11-09T05:00:00Z”
}
],
“limit”: 25,
“offset”: 0,
“more”: false,
“total”: null
}

Hi Daniel,

Hannah from Support here! Would you be able to create a support ticket for this so that we can investigate further? You can write in to support@pagerduty.com and reference this post. We will need the last 4 characters of the API token you are using so that we can troubleshoot, but do not want to expose this information on this forum.

Hannah