Skip to main content

Update Leaderboards from S3

As an alternative to using Aghanim API calls, you can store your game leaderboards in an S3-compatible bucket. Aghanim provides a designated bucket for uploading files following our recommended schema.

File schema

Your leaderboard files should have the following structure:

KeyTypeDescription
member_idstringUnique leaderboard member ID assigned by a game developer.
member_datastringMember data such as their name.
member_subdataOptional<string>Additional member data, such as a clan, team, or guild they belong to.
image_urlstringMember avatar image URL.
scoreintegerNumerical value reflecting the member's achievements among other leaderboard members.

Example:

[
{
"member_id": "12345",
"member_data": "John Doe",
"member_subdata": "Team Alpha",
"image_url": "http://example.com/avatar1.png",
"score": 1500
},
{
"member_id": "67890",
"member_data": "Jane Smith",
"member_subdata": "Guild Beta",
"image_url": "http://example.com/avatar2.png",
"score": 1200
}
]

File naming conventions

To keep your files organized, use a naming convention that includes a timestamp, as shown below. This helps manage different versions of your leaderboard files.

<LEADERBOARD_ID>-<TIMESTAMP>.<EXTENSION>
  • <LEADERBOARD_ID>: Unique leaderboard ID obtained when creating a leaderboard object in the Aghanim system.
  • <TIMESTAMP>: File creation date in Unix epoch time.
  • <EXTENSION>: File extension (e.g., csv, json, zip, gz).

Example file names:

  • CSV: lbrd_eAQiRnTwFaa-1626073200.csv
  • JSON: lbrd_eAQiRnTwFaa-1626073200.json
  • ZIP: lbrd_eAQiRnTwFaa-1626073200.zip
  • GZIP: lbrd_eAQiRnTwFaa-1626073200.gz

Uploading files

Supported file types:

  • Raw CSV or JSON files
  • Zipped (ZIP) or gzipped (GZIP) files containing CSV or JSON files

To upload the file to the bucket:

  1. Create a leaderboard in the Game Hub -> Leaderboards UI section or use the Create Leaderboard API call.
  2. Prepare the leaderboard files according to the requirements above, using the ID returned from the 1st step as the leaderboard ID.
  3. (Optional) If using ZIP or GZIP formats, compress the file.
  4. Upload the prepared file to the bucket provided by Aghanim.

Data pull frequency

The leaderboard service automatically updates the leaderboard members based on the uploaded files. The frequency of data pulls is determined by the game developer and can be set to hourly, daily, weekly, or monthly.

Need help?
Contact our integration team at integration@aghanim.com