Unfortunately I don't have any working sample code for this, but the link shared above explains the API usage and payload structure pretty well and should cover exactly what's needed for retrieving/filtering agent statuses.
Original Message:
Sent: 05-23-2026 09:50
From: AJAY KUMAR
Subject: How to Get Count of All Online/LoggedIn Users?
Hello @Phaneendra Avatapalli
Do you have any working sample code?
Thanks in Advance.
Regards,
Ajay Kumar
------------------------------
AJAY KUMAR
XXX
Original Message:
Sent: 05-23-2026 09:42
From: Phaneendra Avatapalli
Subject: How to Get Count of All Online/LoggedIn Users?
Hi Ajay,
Other than queue-level views, the main option I'm aware of is using the Analytics API endpoint:
POST /api/v2/analytics/agents/status/query
You can retrieve agent presence/routing statuses (On Queue, Busy, Available, Offline etc.) and then filter/export as needed. From memory the response is paginated/default limited, so you may need to loop through results for larger environments.
I also found this community guide which walks through using the API and explains the routing/presence values pretty well:
Analytics Agent Status API – Routing Status and Presence Examples
Hope this helps.
------------------------------
Phaneendra
Technical Solutions Consultant
Original Message:
Sent: 05-23-2026 08:59
From: AJAY KUMAR
Subject: How to Get Count of All Online/LoggedIn Users?
How to Get Count of All Online/LoggedIn Users
Then filter them OnQueue, Busy etc.
Need to view/download.
Right now it's visible only at queue level. Any Guidance/advise will be helpful.
Thanks & Regards,
Ajay Kumar
#Implementation
------------------------------
AJAY KUMAR
XXX
------------------------------