Skip to content
On this page

Adminserver: Gamification API

EndpointMethodDescription
/jsonRpc/gamification.getGamificationRankingjsonRpcGet gamification ranking
/jsonRpc/gamification.searchGamificationRankingjsonRpcSearch gamification ranking
/jsonRpc/gamification.deleteUserGamificationRankingjsonRpcDelete user gamification ranking
/jsonRpc/gamification.deleteAllGamificationRankingsjsonRpcDelete all gamification rankings

Get gamification ranking

Method: jsonRpc

HTTP Method: POST

Path: /jsonRpc/gamification.getGamificationRanking

Permissions:

network.manage /networkId

Request:

{
    "offset": int
    "size": int
}

Response:

{
    "data": {
        "ranking": {
            "top": [{
                "user": { user simple structure }
                "rank": int
                "points": float
            }]
            "own": {
                "user": { user simple structure }
                "rank": int
                "points": float
            }
            "total": int
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search gamification ranking

Method: jsonRpc

HTTP Method: POST

Path: /jsonRpc/gamification.searchGamificationRanking

Permissions:

network.manage /networkId

Request:

{
    "text": string
    "offset": int
    "size": int
}

Response:

{
    "data": {
        "ranking": {
            "top": [{
                "user": { user simple structure }
                "rank": int
                "points": float
            }]
            "own": {
                "user": { user simple structure }
                "rank": int
                "points": float
            }
            "total": int
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Delete user gamification ranking

Method: jsonRpc

HTTP Method: POST

Path: /jsonRpc/gamification.deleteUserGamificationRanking

Permissions:

network.manage /networkId (permission not needed for deleting user own ranking)

Request:

{
    "userId": string
}

Response:

{ empty }

Delete all gamification rankings

Method: jsonRpc

HTTP Method: POST

Path: /jsonRpc/gamification.deleteAllGamificationRankings

Permissions:

network.manage /networkId

Request:

{ empty }

Response:

{ empty }

Models


User Simple

{
    "id": string
    "firstName": string
    "lastName": string
    "privacyMode": int  // 0 - Default, 1 - Incognito
    "avatar": string
    "avatar3D": {  // field is not returned if empty
        "assetId": string
        "assetSkins": map[string]string  // map of selected skins per variants
        "avatarUrl": string  // url to gbl file (Ready Player Me)
        "avatarUserId": string  // user id for session recovery (Ready Player Me)
    }
    "companyName": string  // name of company that user represents
    "companyTitle": string  // user title in the company
}