Listing Available Agents

I am looking to query out how many chat agents in this queue are available for chats. I thought I could use var routingStatus = []; to help filter by "idle" "busy" or something else. When I do return the agents in that queue, I see agent state but not Routing Status. Where do I need to look to find the available or idle agents in a specific queue?

var queueId = "8a83f063-0d55-43c0-b6b1-cbdadf384812";
var pageSize = 5;
var pageNumber = 0;
var sortBy = "name";
var expand = [];
var joined = true;
var name1 = "";
var skills = [];
var languages = [];
var routingStatus = [];
var presence = [];

api.getQueuesQueueIdUsers(queueId, pageSize, pageNumber, sortBy, expand, joined, name1, skills, languages, routingStatus, presence)
.then(function(result){
console.log(result);
})
.catch(function(error){
console.log(error);
});

POST /api/v2/analytics/queues/observations/query will get you that information

GET /api/v2/routing/queues/:queueId/users?routingStatus=idle should also work for this. You can also filter by skill from here too.

Hi there. I know it's been a long time since this post, but I have a question related to it. Is there a way I can query for ALL routingStatus and still make the routingStatus to show up in the results? I know I can just not filter by routingStatus, but this will make it not be available the the results.

Basically I want to see everyone's routing status.

Thank you!

Can you make a new post and clarify what you're trying to accomplish? I'm not sure what you mean "query for all routingStatus".