Live Session Count in Reporting

Hi Team ,
We have Kore.ai onprem version 8.0
We have to build custom dashboard(either Kore.ai Custom or using API).
Could you please help me how I can find the live session count.
I can see the count of unique session ID is different in Analytics and session dataset.
Could you please help how i can achieve the same ?

Dear Ruchi,

Usage metrics > real-time status should be used.

The Sessions API (https://developer.kore.ai/docs/bots/api-guide/sessions-api) can be used for this purpose also. However, this API includes the active / on-going sessions as well. However, there is no field that tells whether a session is active or not in the API response.
When a session is not active, it is removed from cache but it has already been updated in DB. The above API pulls everything from DB and hence accounts for real-time as well as past sessions. While the above real-time metrics in usage metric pulls data from cache (redis) and shows near real-time status.