Skip to main content
This topic provides example code for getting event-based stats. APIs expose various levels of batching to get event-based stats. It’s best practice to make as few calls as possible by using the batch API that fits your needs. This topic covers the following: You can also subscribe to stats changes.

Getting a single stat for a single user and single SCID

The following example code shows how to read a single user stat.

Flat C API

For more information, see the following: Return to the top of this topic.

Getting multiple stats for a single user and single SCID

The following example code shows how to read multiple stats for a single user in one HTTP call.

Flat C API

For more information, see the following: Return to the top of this topic.

Getting multiple stats for multiple users and single SCID

The following example code shows how to read multiple stats for multiple users in one HTTP call.

Flat C API

For more information, see the following: Return to the top of this topic.

Getting multiple stats for multiple users across multiple SCIDs

The following example code shows how to use XBOX Services API (XSAPI) to read multiple stats from a single service configuration for multiple users by using just one call.

Flat C API

For more information, see the following:

See also

Sending an event user_statistics_c header Return to the top of this topic.
Last modified on August 20, 2026