{"openapi":"3.0.0","tags":[{"name":"organizer"},{"name":"round"},{"name":"organizer_rounds"},{"name":"structure_api"}],"info":{"title":"Rounds","termsOfService":"https:\/\/developer.toornament.com\/terms-guidelines","version":"2.0.2","description":"The Toornament platform connects your website and application with the eSports tournaments around the world.","contact":{"name":"Toornament Developer","url":"https:\/\/developer.toornament.com","email":"contact@toornament.com"}},"servers":[{"url":"https:\/\/api.toornament.com\/organizer\/v2"}],"paths":{"\/rounds":{"get":{"tags":["organizer_rounds"],"summary":"Retrieve all rounds.","description":"Returns all rounds with basic information and settings.","parameters":[{"$ref":"#\/components\/parameters\/roundRange"},{"$ref":"#\/components\/parameters\/stageIds"},{"$ref":"#\/components\/parameters\/stageNumbers"},{"$ref":"#\/components\/parameters\/groupIds"},{"$ref":"#\/components\/parameters\/groupNumbers"},{"$ref":"#\/components\/parameters\/tournamentIds"}],"responses":{"206":{"description":"Rounds retrieved.","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/RoundFully"}}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:result","organizer:admin"]}]},"post":{"tags":["organizer_rounds"],"summary":"Create a new round.","description":"Creates a new round (only available in swiss system stages).","requestBody":{"description":"Round data","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoundCreate"}}}},"responses":{"201":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoundFully"}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:admin"]}]}},"\/rounds\/{id}":{"get":{"tags":["organizer_rounds"],"summary":"Retrieve a single round.","description":"Returns a round with the given id with basic information and settings.","parameters":[{"$ref":"#\/components\/parameters\/roundId"}],"responses":{"200":{"description":"Round retrieved.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoundFully"}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:result","organizer:admin"]}]},"patch":{"tags":["organizer_rounds"],"summary":"Update a single round.","description":"Updates a single round.","parameters":[{"$ref":"#\/components\/parameters\/roundId"}],"requestBody":{"description":"Round data","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoundUpdate"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoundFully"}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:admin"]}]},"delete":{"tags":["organizer_rounds"],"summary":"Delete a single round.","description":"Deletes a single round (only available for the last round of a swiss system stage).","parameters":[{"$ref":"#\/components\/parameters\/roundId"}],"responses":{"204":{"description":"Success"}},"security":[{"apiKey":[],"oAuth2":["organizer:admin"]}]}},"\/tournaments\/{tournament_id}\/rounds":{"get":{"deprecated":true,"tags":["organizer_rounds"],"summary":"Retrieve all rounds of a tournament.","description":"Returns all rounds of a tournament with basic information and settings.","parameters":[{"$ref":"#\/components\/parameters\/roundRange"},{"$ref":"#\/components\/parameters\/tournamentId"},{"$ref":"#\/components\/parameters\/stageIds"},{"$ref":"#\/components\/parameters\/stageNumbers"},{"$ref":"#\/components\/parameters\/groupIds"},{"$ref":"#\/components\/parameters\/groupNumbers"}],"responses":{"206":{"description":"Rounds retrieved.","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/RoundLegacy"}}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:result"]}]}},"\/tournaments\/{tournament_id}\/rounds\/{id}":{"get":{"deprecated":true,"tags":["organizer_rounds"],"summary":"Retrieve a single round of a tournament.","description":"Returns a round with the given id with basic information and settings.","parameters":[{"$ref":"#\/components\/parameters\/tournamentId"},{"$ref":"#\/components\/parameters\/roundId"}],"responses":{"200":{"description":"Round retrieved.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoundLegacy"}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:result"]}]}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"X-Api-Key","in":"header"},"oAuth2":{"type":"oauth2","description":"Access token with \u0027organizer:result\u0027 and \u0027organizer:admin\u0027 scope (see (Authorization)[https:\/\/developer.toornament.com\/v2\/security\/authorization])","flows":{"clientCredentials":{"tokenUrl":"https:\/\/api.toornament.com\/oauth\/v2\/token","scopes":{"organizer:result":"Grants the ability to edit match information and referee results.","organizer:admin":"Grants the ability to create a tournament and edit its settings."}},"authorizationCode":{"authorizationUrl":"https:\/\/account.toornament.com\/oauth2\/authorize","tokenUrl":"https:\/\/api.toornament.com\/oauth\/v2\/token","scopes":{"organizer:result":"Grants the ability to edit match information and referee results.","organizer:admin":"Grants the ability to create a tournament and edit its settings."}}}}},"parameters":{"roundRange":{"name":"Range","in":"header","required":true,"schema":{"type":"string","example":"rounds=0-49"},"description":"A range of requested items using the \u0027rounds\u0027 unit. The size of the range can not exceed 50. (see [Pagination](https:\/\/developer.toornament.com\/v2\/overview\/pagination))"},"tournamentId":{"name":"tournament_id","in":"path","required":true,"schema":{"type":"string"},"description":"The id of the tournament you want to retrieve data about."},"roundId":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id of the round."},"stageIds":{"name":"stage_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"618965765764577354,618931468547654563"},"description":"A list of stage ids to filter."},"stageNumbers":{"name":"stage_numbers","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"integer"},"example":"1,3"},"description":"A list of stage numbers to filter."},"groupIds":{"name":"group_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"618965314871946714,618932178746476544"},"description":"A list of group ids to filter."},"groupNumbers":{"name":"group_numbers","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"integer"},"example":"3,4"},"description":"A list of group numbers to filter."},"tournamentIds":{"name":"tournament_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"618965416546776434,618975467354349191"},"description":"Only return rounds for the given list of tournaments."}},"schemas":{"RoundBase":{"properties":{"name":{"description":"The name of the round.","type":"string","maxLength":30,"example":"1\/8th Finals"},"settings":{"description":"Settings that describe the various options related to the round and stage types.","type":"object","example":{"pairing_values":[]}}}},"RoundBaseIdentifier":{"properties":{"id":{"description":"The id of the round.","type":"string","example":"618983668512789184"}}},"RoundBasePosition":{"properties":{"number":{"description":"A number used for ordering rounds.","type":"integer","example":2}}},"RoundBaseState":{"properties":{"closed":{"description":"Whether the round is closed.","type":"boolean","example":false}}},"RoundBaseExtended":{"properties":{"match_settings":{"description":"Settings that define the match configuration used in the round.","type":"object","example":{"format":{"type":"best_of","options":{"nb_match_sets":3}}}}}},"RoundBaseReference":{"properties":{"stage_id":{"description":"The id of the stage that contains the round.","type":"string","example":"618945443132178479"},"group_id":{"description":"The id of the group that contains the round.","type":"string","example":"618983668512789184"}}},"RoundBaseReferenceExtended":{"properties":{"tournament_id":{"description":"The id of the tournament that contains this round.","type":"string","example":"378426939508809728"}}},"RoundLegacy":{"allOf":[{"$ref":"#\/components\/schemas\/RoundBase"},{"$ref":"#\/components\/schemas\/RoundBaseIdentifier"},{"$ref":"#\/components\/schemas\/RoundBasePosition"},{"$ref":"#\/components\/schemas\/RoundBaseReference"},{"$ref":"#\/components\/schemas\/RoundBaseState"},{"type":"object","required":["id","stage_id","group_id","number","name","closed","settings"]}]},"RoundCreate":{"allOf":[{"$ref":"#\/components\/schemas\/RoundBaseReference"},{"$ref":"#\/components\/schemas\/RoundBaseReferenceExtended"},{"type":"object","required":["stage_id","group_id","tournament_id"]}]},"RoundUpdate":{"allOf":[{"$ref":"#\/components\/schemas\/RoundBase"},{"$ref":"#\/components\/schemas\/RoundBaseExtended"}]},"RoundFully":{"allOf":[{"$ref":"#\/components\/schemas\/RoundBase"},{"$ref":"#\/components\/schemas\/RoundBaseIdentifier"},{"$ref":"#\/components\/schemas\/RoundBasePosition"},{"$ref":"#\/components\/schemas\/RoundBaseExtended"},{"$ref":"#\/components\/schemas\/RoundBaseReference"},{"$ref":"#\/components\/schemas\/RoundBaseReferenceExtended"},{"$ref":"#\/components\/schemas\/RoundBaseState"},{"type":"object","required":["id","stage_id","group_id","tournament_id","number","name","closed","settings","match_settings"]}]}}}}