Skip to content

This week's leaderboard.

Leaderboard

Fetches a paginated list of users sorted by ascending order of points earned this week. 'This week' is a fixed 7 day time period (Monday-Sunday), rather than a rolling 7 day period. This is reset based on the value of timezone chosen when the point system is configured in the control environment.

GET
/leaderboard/weekly

Parameters

Query Parameters

excluded[]

List of user roles to exclude.

Type
array
Example"roles.banned&excluded[]=roles.moderator"
page

Selects the page to retrieve on paginated responses. Used in combination with the pageSize parameter to paginate over results

Type
integer
Default
1
Minimum
1
pageSize

Limits the number of items returned in a single paginated response. Used in combination with the page parameter to paginate over results

Type
integer
Default
25
Maximum
25
Minimum
1

Responses

List of users on the leaderboard

application/json
JSON
[
  
{
  
  
"userId": 0,
  
  
"points": 0,
  
  
"name": "john-doe",
  
  
"leaderboardPosition": 0,
  
  
"avatar": "http://example.com/avatar123.jpg",
  
  
"rank": "http://example.com/rank-icon.jpg"
  
}
]

Samples

Gainsight CC Developer Portal