Running the dashboard aggregator at 02:00 local time and the queue sync job keeps choking. Trying to fetch all queues across three divisions using the @genesyscloud/purecloud-platform-client-v2 package. The docs say getQueues accepts a divisionId parameter but it only pulls from the default scope. I’m looping through the division UUIDs manually and calling client.queuesApi.getQueues({ divisionId: div.id, pageSize: 300 }) inside a Promise.all batch. The first two calls return fine. The third one throws a 413 Request Entity Too Large even though it’s just a GET request. Wait, actually it’s a 400 Bad Request on the expand=members flag. I need the member counts for the occupancy chart. Without it the dashboard shows zeros. I’ve tried stripping the expand parameter but then the aggregation script fails on the queue.members.length lookup. Pagination works fine when I hit /api/v2/queues directly with curl, but the SDK wrapper seems to append extra headers or mess with the Accept type. Here’s the loop structure I’m using:
const queueData = await Promise.all(divisions.map(async (d) => {
return client.queuesApi.getQueues({
divisionId: d.id,
pageSize: 200,
expand: ‘members’
});
}));
The response object comes back with entities: [] for the Manila division. Checking the network tab shows the SDK is sending divisionId: "self" instead of the actual UUID. We’ve got a custom auth middleware that might be overriding the request builder. The SDK doesn’t seem to respect the manual override. Is there a known bug in the purecloud-platform-client-v2 queue module or do I need to override the base path routing. The interval grouping logic expects a full batch before it calculates the queue.memberCount average. Paging through the nextPageUri manually breaks the SDK’s internal promise chain. The dashboard aggregator just keeps timing out after the fifth retry cycle. Logs show the SDK dropping the division header entirely.