Returns a list of all leaderboards configured in the game.

View interactive version here

Request Parameters

Parameter Required Type Description

Response Parameters

A response containing a list of all leaderboards configured in the game.

Parameter Type Description
leaderboards Leaderboard[] A list of JSON object containing leaderboard meta data
scriptData ScriptData A JSON Map of any data added either to the Request or the Response by your Cloud Code

Nested types


A nested object that represents the leaderboard configuration data.

Parameter Type Description
description string The leaderboard's description.
name string The leaderboard's name.
propertySet JSON The custom property set configured on this Leaderboard
shortCode string The leaderboard's short code.


A collection of arbitrary data that can be added to a message via a Cloud Code script.

Parameter Type Description
myKey string An arbitrary data key
myValue JSON An arbitrary data value.

Code Samples


    using GameSparks.Api;
    using GameSparks.Api.Requests;
    using GameSparks.Api.Responses;
    new ListLeaderboardsRequest()
        .Send((response) => {
        GSEnumerable<ListLeaderboardsResponse._Leaderboard> leaderboards = response.Leaderboards;
        GSData scriptData = response.ScriptData;

ActionScript 3

    import com.gamesparks.*;
    import com.gamesparks.api.requests.*;
    import com.gamesparks.api.responses.*;
    import com.gamesparks.api.types.*;

        .send(function(response:com.gamesparks.api.responses.ListLeaderboardsResponse):void {
        var leaderboards:Vector.<Leaderboard> = response.getLeaderboards(); 
        var scriptData:ScriptData = response.getScriptData(); 


    #import "GS.h"
    #import "GSAPI.h"
    GSListLeaderboardsRequest* request = [[GSListLeaderboardsRequest alloc] init];
    [request setCallback:^ (GSListLeaderboardsResponse* response) {
    NSArray* leaderboards = [response getLeaderboards]; 
    NSDictionary* scriptData = [response getScriptData]; 
    [gs send:request];


    #include <GameSparks/generated/GSRequests.h>
    using namespace GameSparks::Core;
    using namespace GameSparks::Api::Responses;
    using namespace GameSparks::Api::Requests;

    void ListLeaderboardsRequest_Response(GS& gsInstance, const ListLeaderboardsResponse& response) {
    gsstl:vector<Types::Leaderboard*> leaderboards = response.getLeaderboards(); 
    GSData scriptData = response.getScriptData(); 

    ListLeaderboardsRequest request(gsInstance);


import com.gamesparks.sdk.api.autogen.GSRequestBuilder.ListLeaderboardsRequest;
import com.gamesparks.sdk.api.autogen.GSResponseBuilder.ListLeaderboardsResponse;
import com.gamesparks.sdk.api.autogen.GSTypes.*;
import com.gamesparks.sdk.api.GSEventListener;

    .send(new GSEventListener<ListLeaderboardsResponse>() {
        public void onEvent(ListLeaderboardsResponse response) {
            List<Leaderboard> leaderboards = response.getLeaderboards(); 

Cloud Code

    var request = new SparkRequests.ListLeaderboardsRequest();
    var response = request.Send();

var leaderboards = response.leaderboards; 
var scriptData = response.scriptData;