Skip to main content
Opigno Enterprise API provides queries to build different types of the leaderboards. All these queries return a list of ChallengeParticipant objects:
Important: results for these queries can be retrieved only if the ranking and leaderboard displaying is enabled for the challenge in the backoffice.

Classic leaderboard

Use the getChallengeParticipants query to get the full list of challenge participants or users with the same specific rank. Results will be returned with the pagination and possibility to change the order and sorting key (default sorting is by the rank, ascending). The following arguments can be used in the query: Here is an example of the query execution:

Relative leaderboard

The relative leaderboard shows competitors closest in ranking to the current API user. The logic of displaying is the following:
  1. itemsNumberBefore of users with the higher score than the current API user has earned;
  2. the current API user;
  3. itemsNumberAfter of users with the lower than or the same score as the current API user has earned. Results will be returned without pagination and possibility to change the order.
Parameters itemsNumberBefore and itemsNumberAfter are limited to 10. If the value is greater than 10, it will be automatically reduced.
To retrieve the data for a relative leaderboard, execute the getChallengeRelativeLeaderboard query:
The getChallengeParticipants query supports the same advanced features as other catalog queries:

Pagination

Learn how to efficiently navigate through large sets of items using cursor-based pagination.

Authentication

Understand the authentication requirements and how to properly authenticate your requests.