-
Notifications
You must be signed in to change notification settings - Fork 8
Dimensions Station API
This is the API that is served automatically upon creation of a Dimension. It serves data on ongoing matches, tournaments and allows you to also directly control these matches and tournaments through the API.
Typically, the API will be served at http://localhost:9000
. Watch your logs to see if this is not the case (it may be that 9000 is busy and the station is served at 9001 instead)
Route: /api/dimensions
-
GET
: Returns all observed dimensions
Route: /api/dimensions/:dimensionID
-
GET
: Returns all data of the dimension instance with iddimensionID
Route: /api/dimensions/:dimensionID/match
-
GET
: Retrieve all matches created and ran usingdimension.createMatch
ordimension.runMatch
wheredimension
is the dimension instance with iddimensionID
Route: /api/dimensions/:dimensionID/match/:matchID
-
GET
: Retrieve all data of the match instance with idmatchID
in dimension with iddimensionID
-
DELETE
: Deletes the match forever
Route: /api/dimensions/:dimensionID/match/:matchID/results
-
GET
: Retrieve the results of the match instance with idmatchID
in dimension with iddimensionID
Route: /api/dimensions/:dimensionID/match/:matchID/run
-
POST
: Runs the match with idmatchID
if it is finished, currently stopped, or not running at the moment
Route: /api/dimensions/:dimensionID/match/:matchID/stop
-
POST
: Stops the match with idmatchID
if it currently running
Route: /api/dimensions/:dimensionID/tournaments
-
GET
: Retrieve all tournaments created usingdimension.createTournament
wheredimension
is the dimension instance with iddimensionID
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID
-
GET
: Retrievestatus, state, competitors, name, configs
data fields of the tournament instance with idtournamentID
in dimension with iddimensionID
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/match-queue
-
GET
: Retrieve the current matchQueue of the tournament instance with idtournamentID
as an array -
POST
: Queue a new match by providingmatchQueue
field in body, containing a list of array elements. Each array element is a list of string player Ids identifying the players to match up in a match.
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/match
-
GET
: Retrieve the ongoing matches of the tournament instance with idtournamentID
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/match/:matchID
-
GET
: Retrieves match with idmatchID
in the tournament -
DELETE
: Deletes the match with idmatchID
. This operation will result in aFatalError
if the tournament type is RoundRobin or Elimination.
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/match/:matchID/replay
-
GET
: Retrieves match replay with idmatchID
in the tournament
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/ranks
-
GET
: Retrieves the current rankings and rank states of all competitors in the tournament instance with idtournamentID
Can provide query paramslimit
andoffset
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/run
-
POST
: Runs/resumes the tournament with idtournamentID
if it is not running at the moment
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/stop
-
POST
: Stops the tournament with idtournamentID
if it is currently running at the moment
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/configs
-
POST
: Post new configurations for the tournament to use. These configurations are automatically populated to all other tournament instances with the same id provided they havesyncConfigs
turned on and there's a database being used.
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/reset
-
POST
: Resets the rankings of the tournament. Requires the tournament to be stopped first.
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/match/players/:playerID
-
GET
: Retrieves all data relevant to player with idplayerID
in the tournament.
Route: /api/dimensions/:dimensionID/tournaments/:tournamentID/match/players/:playerID/match
-
GET
: Retrieves past matches for player. Query params arelimit
,offset
, andorder
of which order is by finish date of matches