Trying to pull every queue across our org. We’ve got about 20 divisions. Docs state: “The divisionId parameter is optional. If not specified, all queues accessible to the caller are returned.”
Using the JS SDK QueueApi. I’ve set the scope to queue:view and organization:read. Here’s the call:
const { QueueApi } = require('@genesyscloud/queue-api-client');
const queueApi = new QueueApi();
queueApi.setAccessToken(token);
const result = await queueApi.getQueues({
pageSize: 100
});
console.log(result.entities.length); // Returns 12
Only getting 12 queues. These are all in the default division. The other 80 queues in the other divisions are missing. I’m not filtering by division, so it should return everything.
Checking the HTTP request in the network tab. The SDK is hitting /api/v2/queues?pageSize=100. No divisionId param. Status is 200.
Is the SDK ignoring the admin scope? Or do I need to iterate through divisions manually? Docs don’t mention a limitation on cross-division fetches for admins. Feels like a bug in the client logic.