POST
name type description requirement Authorization
String Service token Required
name type description requirement request_issuer
str Either 'tournament' or 'matchmaking' Required game_id
int ID of the created game Required players
list[Optional[int]] ID of the players in the game or null when the player doesn't have an opponent in the first round:
index 0 vs index 1 (At least 1 isn't null)
index 2 vs index 3 (At least 1 isn't null)
...
Need at least 2 players (null does not count as a player)
len(players) needs to be a power of 2
A player can only be in one game at a timeRequired
status code content-type response example 201
application/json
{'port': int} {'port': 60000} 400
application/json
{'errors': list[str]} {'errors': ['game_id field is missing', 'players[1] is not an Optional[int]']} 401
application/json
{'errors': list[str]} {'errors': ["Invalid token type. Token must be a <class 'bytes'>"]} 409
application/json
{'errors': ['Some player(s) are already in a game'], 'players_already_in_a_game': list[int]} {'errors': ['Some player(s) are already in a game'], 'players_already_in_a_game': [2, 56]} 500
application/json
{'errors': list[str]} {'errors': ['Error creating game server: reason']} 503
application/json
{'errors': list[str]} {'errors': ['No available ports']}
POST
This should only be used by game_server
name type description requirement Authorization
String Service token Required
name type description requirement players
list[int] ID of the players who are no longer in a game Required
status code content-type response example 204
application/json
{} {} 400
application/json
{'errors': list[str]} {'errors': ['players[1] is not an int']} 401
application/json
{'errors': list[str]} {'errors': ["Invalid token type. Token must be a <class 'bytes'>"]}
POST
name type description requirement Authorization
String Service token Required
name type description requirement players
list[int] ID of the players Required
status code content-type response example 200
application/json
{str(player_id): Optinal[int](port)} {'4': 4242, '7': null} 400
application/json
{'errors': list[str]} {'errors': ['players[1] is not an int']} 401
application/json
{'errors': list[str]} {'errors': ["Invalid token type. Token must be a <class 'bytes'>"]}
GET
name type description requirement Authorization
String User access token Required
status code content-type response example 200
application/json
{'port': Optional[int]} {'port': 4242} 401
application/json
{'errors': list[str]} {'errors': ["Invalid token type. Token must be a <class 'bytes'>"]}