Tournaments API
Below, you'll find all endpoints needed to fetch all available data about tournaments in a guild.
info
For these endpoints, there is an exception from our API Rules:
You MAY store leaderboard data permanently in your systems as that would be required to build power rankings or similar things, and share it with users of your systems. All other rules remain unchanged.
warning
Note that these endpoints require a separate Authorization scope, so you might have to re-authorize existing guilds.
GET
Get list of tournaments
https://yunite.xyz/api/v3/guild/{guildId}/tournaments
- Request
- Response
Path Parameters
Name | Value type | Description |
---|---|---|
guildId | Guild ID Snowflake | The ID of the guild you want to access |
- Schema
- Example
{ "type": "array", "itemSchema": { "type": "object", "properties": { "id": { "type": "string/UUIDv4", "value": "A unique tournament ID" }, "name": { "type": "string", "value": "public name of the tournament" }, "description": { "type": "string", "value": "public description of the tournament" }, "queueSize": { "type": "integer", "value": "how many players per team" }, "pointSystem": { "type": "object", "properties": { "pointsPerKill": { "type": "integer", "value": "amount of points awared per kill" }, "pointsPerPlacement": { "type": "object", "value": "keys: placement, value: points for this placement" } } }, "consensusMin": { "type": "integer", "value": "how many player per match to get the match counted" }, "allowTeamMateSwap": { "type": "boolean", "value": "wether the TO allowd mid-tournament team changes" }, "startDate": { "type": "string", "value": "ISO timestamp of the tournament start" }, "endDate": { "type": "string", "value": "ISO timestamp of the tournament end" } } } }
[ { "id": "12345-1234-1234-123456", "name": "My tournament", "description": "This is an awesome tournament", "queueSize": 3, "pointSystem": { "pointsPerKill": 1, "pointsPerPlacement": { "1": 30, "2": 20, "3": 10, "5": 5, "10": 2 } }, "consensusMin": 25, "allowTeamMateSwap": false, "startDate": "2021-02-04T19:00:00Z", "endDate": "2021-02-04T23:00:00Z" } ]
GET
Get leaderboard of tournament
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}/leaderboard
- Request
- Response
Path Parameters
Name | Value type | Description |
---|---|---|
guildId | Guild ID Snowflake | The ID of the guild you want to access |
tournamentId | UUIDv4 | The ID of the tournament you want to access |
- Schema
- Example
{ "type": "array", "itemSchema": { "type": "object", "properties": { "users": { "type": "array", "itemSchema": { "type": "string", "value": "Discord User ID of team members" } }, "placement": { "type": "integer", "value": "the placement of the team" }, "kills": { "type": "integer", "value": "kills of the team" }, "games": { "type": "integer", "value": "amount of games played" }, "wins": { "type": "integer", "value": "amount of wins" }, "score": { "type": "integer", "value": "amount of points" }, "kpm": { "type": "double", "value": "kills per match (avg)" }, "averagePlacement": { "type": "double", "value": "average placement" }, "gameList": { "type": "array", "itemSchema": { "type": "object", "properties": { "placement": { "type": "integer", "value": "placement in this single match" }, "kills": { "type": "integer", "value": "kills in this single match" } } } } } } }
[ { "users": [ "12345678901234", "12345678901234" ], "placement": 1, "kills": 21, "games": 3, "wins": 2, "score": 234, "kpm": 7, "averagePlacement": 1.33, "gameList": [ { "placement": 1, "kills": 7 }, { "placement": 1, "kills": 7 }, { "placement": 2, "kills": 7 } ] } ]
GET
Get list of matches in tournament
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}/matches
- Request
- Response
Path Parameters
Name | Value type | Description |
---|---|---|
guildId | Guild ID Snowflake | The ID of the guild you want to access |
tournamentId | UUIDv4 | The ID of the tournament you want to access |
- Schema
- Example
{ "type": "array", "itemSchema": { "type": "object", "properties": { "sessionId": { "type": "string", "value": "epic games hex session id of the match" }, "timestamp": { "type": "string", "value": "ISO timestamp of match start" }, "scoreCount": { "type": "integer", "value": "number of replay submissions" }, "players": { "type": "integer", "value": "player count of this match" }, "ignored": { "type": "boolean", "value": "true if the TO decided to ignore this match; it will not count towards the leaderboard" }, "status": { "type": "string", "value": "one of ['NOT_SCORED', 'PARTIALLY_SCORED', 'SCORED']" } } } }
[ { "sessionId": "1234567890abcdef123456", "timestamp": "2021-02-04T19:00:00Z", "scoreCount": 3, "players": 93, "ignored": false, "status": "SCORED" } ]
GET
Get leaderboard of single match
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}/matches/{sessionId}
- Request
- Response
Path Parameters
Name | Value type | Description |
---|---|---|
guildId | Guild ID Snowflake | The ID of the guild you want to access |
tournamentId | UUIDv4 | The ID of the tournament you want to access |
sessionId | string | The ID of the match you want to access |
- Schema
- Example
{ "type": "array", "itemSchema": { "type": "object", "properties": { "team": { "type": "object", "properties": { "id": { "type": "string", "value": "internal team id" }, "players": { "type": "array", "itemSchema": { "type": "object", "properties": { "index": { "type": "integer", "value": "internal team player index" }, "discordId": { "type": "string", "value": "discord id of the player" } } } }, "sessionPlayers": { "type": "array", "itemSchema": { "type": "object", "properties": { "discordId": { "type": "string", "value": "discord id of one of the players that played this match for this session only" }, "epicId": { "type": "string", "value": "epic id of one of the players that played this match for this session only" } } } } } }, "placement": { "type": "integer", "value": "placement of this team in this match" }, "kills": { "type": "integer", "value": "kills of this team in this match" }, "score": { "type": "integer", "value": "score of this team in this match" } } } }
[ { "team": { "id": "12345-1234-1234-1234567", "players": [ { "index": 0, "discordId": "123456678891231" }, { "index": 1, "discordId": "123456678891231" } ], "sessionPlayers": [ { "discordId": "123456678891231", "epicId": "1234567890abcdef123456789" }, { "discordId": "123456678891231", "epicId": "1234567890abcdef123456789" } ] }, "placement": 1, "kills": 10, "score": 234 } ]