Leaderboard
Retrieve users rankings by points and referrals score
The mart.leaderboard_secret_v2
table provides access to calculated leaderboard results and associated identity information for participants within a specific campaign. As a client, you have select (query) permissions on this table, allowing you to retrieve data for display in your application or for internal tracking. This includes both point source based scores and referral scores for each user.
You can test-drive the API in our interactive graphql playground here.
You will need an API key to set in an authorization header. If you don’t have one yet, you can create your own via your campaign in your app dashboard.
You can order the results (typically by points_rank
ascending) and apply additional filters (e.g., finding a specific user by discord_username
or user_id
) using the order_by
and where
clauses in your GraphQL query.
Setting The Authorization Header
Before being able to introspect the schema through our interactive graphql playground or through a direct call, you will need to set the API key as an authorization header via this format:
Endpoint URL
Request Method and Error Responses
- Requests must be sent as
POST
, notGET
. - On failure, you’ll still receive a
200 OK
HTTP status, but the JSON response will include anerrors
array with details of what went wrong. Clients should inspect theerrors
field to detect and handle failures.
FAQ
Available Fields
When querying the mart.leaderboard_secret_v2
table, you can select the following fields in your selection set:
The client_season
and added_by
fields are visible via the gql queries but cannot be manually modified through mutations. The client_season
field represents the name of your campaign and is used to organize and categorize point issuances.