# Best way to get Janus current sessions and clients

**URL:** <https://janus.discourse.group/t/best-way-to-get-janus-current-sessions-and-clients/414>\
**Category:** General\
**Created:** [July 12, 2023, 9:15am UTC](https://janus.discourse.group/t/best-way-to-get-janus-current-sessions-and-clients/414 "2023-07-12T09:15:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![barakp](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@barakp](https://janus.discourse.group/u/barakp)\
**Post date:** [July 12, 2023, 9:15am UTC](https://janus.discourse.group/t/best-way-to-get-janus-current-sessions-and-clients/414/1 "2023-07-12T09:15:36Z")

</div>

Hello guys,

I’m using Janus for creating multiple videorooms and I need my service to know what is the current number of rooms, subscribers and publishers. Is there any convenient way to get this data from Janus?

I know that I can use Admin API to get this data, but it requires many HTTP calls from my service to Janus (get sessions, then get handlers, then stats).  
Also I tried to use Janus events but it requires my service to manage many event types and to save the current state in my service.

Maybe there is a different way to handle this which I do not know, I will be glad for you help!

---

<div class="post-metadata">

**Author:** ![lorenzo](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/lorenzo/32/425_2.png) [@lorenzo](https://janus.discourse.group/u/lorenzo)\
**Post date:** [July 12, 2023, 10:28am UTC](https://janus.discourse.group/t/best-way-to-get-janus-current-sessions-and-clients/414/2 "2023-07-12T10:28:15Z")

</div>

You can use event handlers to track what happens in a Janus instance in a separate application. This presentation is a bit old but gives you an idea about how it works: [Asynchronous event/state notifications in the Janus WebRTC server Providing administrators and deve… - YouTube](https://www.youtube.com/watch?v=UT9CDhoHL_Q)
