Query data to display on website

Hello @Antviss,

It would help to know what you’re trying to accomplish. If this is for a custom dashboard, you can achieve most of what you want setting up RPCs and using S2S calls as advised here. However, doing some of these operations frequently won’t scale.

I’ve inlined the answer for each point or linked the relevant docs page.

*Leaderboards
Heroic Labs Documentation | Function Reference

*Tournaments
Heroic Labs Documentation | Function Reference

  • List of matches in progress (hopefully with user count)

You’d have to use the match listing API Heroic Labs Documentation | Match Listing, as for the user count, you’d have to appropriately use the labels to keep track of that yourself.

  • Logged in users count (active sessions)

The right way of keeping track of this would be using Prometheus, as we expose the count of current active sessions.

  • Registered users count

We purposefully don’t provide an API for this, as it’s an operation that won’t scale. You could use a custom db query, but we strongly discourage it because of the above.

You can get an estimate on the Nakama dashboard: Heroic Labs Documentation | Accounts.