{"openapi":"3.0.0","tags":[{"name":"circuit"},{"name":"ranking"},{"name":"circuit_rankings"},{"name":"circuit_api"}],"info":{"title":"Rankings","termsOfService":"https:\/\/developer.toornament.com\/terms-guidelines","version":"1.0.0","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\/circuit\/v2"}],"paths":{"\/rankings":{"get":{"tags":["circuit_rankings"],"summary":"Retrieve all rankings from your circuits.","description":"Returns all rankings from your circuits.","parameters":[{"$ref":"#\/components\/parameters\/rankingRange"},{"$ref":"#\/components\/parameters\/rankingIds"},{"$ref":"#\/components\/parameters\/circuitIds"},{"$ref":"#\/components\/parameters\/discipline"},{"$ref":"#\/components\/parameters\/entityType"},{"$ref":"#\/components\/parameters\/seasonIds"},{"$ref":"#\/components\/parameters\/seasonNames"},{"$ref":"#\/components\/parameters\/regionIds"},{"$ref":"#\/components\/parameters\/regionNames"}],"responses":{"206":{"description":"Rankings retrieved.","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/RankingFully"}}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:circuit"]}]}},"\/rankings\/{id}":{"get":{"tags":["circuit_rankings"],"summary":"Retrieve a single ranking.","description":"Returns a ranking identified by the given id.","parameters":[{"$ref":"#\/components\/parameters\/rankingId"}],"responses":{"200":{"description":"Ranking retrieved","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RankingFully"}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:circuit"]}]}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"X-Api-Key","in":"header"},"oAuth2":{"type":"oauth2","description":"Access token with \u0027organizer:circuit\u0027 scope (see (Authorization)[https:\/\/developer.toornament.com\/v2\/security\/authorization])","flows":{"clientCredentials":{"tokenUrl":"https:\/\/api.toornament.com\/oauth\/v2\/token","scopes":{"organizer:circuit":"Grants the ability to manage circuits and settings."}},"authorizationCode":{"authorizationUrl":"https:\/\/account.toornament.com\/oauth2\/authorize","tokenUrl":"https:\/\/api.toornament.com\/oauth\/v2\/token","scopes":{"organizer:circuit":"Grants the ability to manage circuits and settings."}}}}},"parameters":{"rankingRange":{"name":"Range","in":"header","required":true,"schema":{"type":"string","example":"rankings=0-49"},"description":"A range of requested items using the \u0027rankings\u0027 unit. The size of the range can not exceed 50. (see [Pagination](https:\/\/developer.toornament.com\/v2\/overview\/pagination))"},"rankingId":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id of the ranking."},"rankingIds":{"name":"ranking_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"6031125052363620352,6036956611039707136"},"description":"Only return rankings for the given list of ids."},"circuitIds":{"name":"circuit_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"5617559294676615168,5629045554450325504"},"description":"Only return rankings for the given list of circuit ids."},"discipline":{"name":"discipline","in":"query","required":false,"schema":{"type":"string","example":"leagueoflegends"},"description":"Only return rankings for the given discipline."},"entityType":{"name":"entity_type","in":"query","required":false,"schema":{"type":"string","example":"team"},"description":"Only return rankings for the given participating entity type."},"seasonIds":{"name":"season_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"5617559294676615168,5629045554450325504"},"description":"Only return rankings for the given list of seasons, identified by their ids."},"seasonNames":{"name":"season_names","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"season_1,season_3"},"description":"Only return rankings for the given list of seasons, identified by their machine names."},"regionIds":{"name":"region_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"5617559294676615168,5629045554450325504"},"description":"Only return rankings for the given list of regions, identified by their ids."},"regionNames":{"name":"region_names","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"europe,americas,asia"},"description":"Only return rankings for the given list of regions, identified by their machine names."}},"schemas":{"RankingBase":{"type":"object","properties":{"name":{"description":"The name of the ranking.","type":"string","maxLength":40,"example":"Global Ranking"}}},"RankingCircuit":{"type":"object","properties":{"circuit":{"allOf":[{"$ref":"#\/components\/schemas\/Circuit"},{"type":"object","description":"The circuit associated with this ranking."}]}}},"RankingFully":{"allOf":[{"$ref":"#\/components\/schemas\/RankingBase"},{"$ref":"#\/components\/schemas\/RankingCircuit"},{"type":"object","required":["id","circuit","name","engine","discipline","entity_type","season","region","settings"],"properties":{"id":{"description":"The unique identifier of the ranking.","type":"string","example":"6031125052363620352"},"engine":{"description":"The engine used to calculate the ranking.","type":"string","enum":["points","elo"],"example":"points"},"discipline":{"description":"Unique identifier of the ranking\u2019s discipline.","type":"string","example":"leagueoflegends"},"entity_type":{"description":"The type of participating entity to be analyzed in matches for the ranking.","type":"string","enum":["player","team","custom_player","custom_team"],"example":"player"},"season":{"allOf":[{"$ref":"#\/components\/schemas\/CircuitSeason"},{"type":"object","description":"The circuit season associated with this ranking.","nullable":true}]},"region":{"allOf":[{"$ref":"#\/components\/schemas\/CircuitRegion"},{"type":"object","description":"The circuit region associated with this ranking.","nullable":true}]},"settings":{"description":"The settings of the ranking.","type":"object","example":{"default_scale":{"1":300,"2-9":100,"10-20":40}}}}}]},"Circuit":{"type":"object","required":["id","name"],"properties":{"id":{"description":"The id of the circuit.","type":"string","example":"5756452414364442624"},"name":{"description":"The name of the circuit.","maxLength":40,"type":"string","example":"Challenger League"}}},"CircuitSeason":{"type":"object","required":["id","name","machine_name"],"properties":{"id":{"description":"The id of the circuit season.","type":"string","example":"5629045554450325504"},"name":{"description":"The name of the circuit season.","maxLength":40,"type":"string","example":"Open Winter 2022"},"machine_name":{"description":"A name used to identify a season for computing purposes.","type":"string","pattern":"^[a-z0-9_]+$","maxLength":40,"example":"open_winter_2022"}}},"CircuitRegion":{"type":"object","required":["id","name","machine_name"],"properties":{"id":{"description":"The unique identifier of the region.","type":"string","example":"5629088936350867456"},"name":{"description":"The name of the region.","type":"string","maxLength":40,"example":"Europe West"},"machine_name":{"description":"A name used to identify a region for computing purposes.","type":"string","pattern":"^[a-z0-9_]+$","maxLength":40,"example":"euw"}}}}}}