Gamification provisioning

It might be useful to configure the Gamification platform in a automatized way (without the human need to login in the portal). For those scenarios, we provide the following capabilities:

 

Get all the information about Gamification players

Get All Users is a request that returns a list with the information of all players:

  • URL ex: gamification/users/all
  • Method: GET
  • Headers:
    • Authorization: [string], the token issued by Identity Server
    • Instance: [string], the instance that the request refers to
  • Response Codes:
    • 200 - OK on success
    • 5XX - otherwise
  • Response Body:
    • JSON Array where each index contains, among other things, the following:
      •  "role":"player"
      • "gid": [int] unique identifier of the player,
      • "name": [string] name of the player,
      • "active": [bool] true when the player is active, false otherwise

 

Activating or deactivating a player

This request toggles the current state of a player:

  • URL ex: gamification/users/changeState/:id
  • Method: POST
  • URL Params: Required: id=[int]
  • Headers:
    • Authorization: [string], the token issued by Identity Server
    • Instance: [string], the instance that the request refers to
  • Response Codes:
    • 200 - OK on success
    • 5XX - otherwise
  • Response Body:
    • On success:
      • {"messageId" : [int]}
      • messageId = 1
    • On error:
      • {"messageId" : [int],"permitedAgents":[int],"actualAgents":[int]}
      • messageId = -2
      • permitedAgents = number of active players allowed in the instance
      • actualAgents = number of active players currently active in the instance