Reading Leaderboard Through API
To programatically read the leaderboard data collected by SynthesisVR, please follow the steps:
1. Login into SynthesisVR with your administrator account and navigate to:
2. Head to the API & Webhooks tab and click on the + button on the top right:
Make sure the leaderboard permission is assigned.
If the “Strict Access” option is enabled, you will be able to access the collected data ONLY from an IP address associated with your location.
3. Prepare the following URL:
- http://api.synthesisvr.com/data/leaderboard/11111111-1111-1111-1111-111111111111/15/6 month
Upon refreshing the Widgets page, you’ll be able to locate your API key:
Game ID — keep it to 0 (zero) if you want to fetch information about all the collected games. Based on that response, you’ll be able to see and use specific game ids
Duration — any combination of <number> + <period>. Examples:
- 5 days
- 17 days
- 117 days
- 2 months
- 2 months 13 days
- 7 months 2 days
- 1 year
The API response data is formatted as JSON and have the following structure:
The “score” object itself contains:
info = raw data extracted from the game (differ between the games)
score = SVR attempt to recognize and extract the score from the info object
customer = the customer associated with the SynthesisVR session. In a multi-station session, the data don’t necessary correlate with the actual player.
utcepoch = the UTC epoch when the leaderboard record is logged (you can look up the exact date/time in any programming language ; online example: https://www.epochconverter.com/)