{ "openapi" : "3.0.0", "info" : { "contact" : { "email" : "api@csgow.tf" }, "license" : { "name" : "GPLv3", "url" : "https://www.gnu.org/licenses/gpl-3.0.html" }, "title" : "csgoWTF API", "version" : "1.0.0" }, "servers" : [ { "description" : "csgoWTF API Endpoint", "url" : "https://api.csgow.tf" } ], "tags" : [ { "description" : "All calls related to matches", "name" : "matches" }, { "description" : "All calls related to players", "name" : "players" }, { "description" : "All calls not related to players or matches", "name" : "meta" } ], "paths" : { "/match/{id}" : { "get" : { "description" : "Get match by matchID\n", "operationId" : "getMatch", "parameters" : [ { "description" : "match id", "explode" : false, "in" : "path", "name" : "id", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { "allOf" : [ { "$ref" : "#/components/schemas/Match" }, { "properties" : { "stats" : { "items" : { "$ref" : "#/components/schemas/Stats" }, "maxItems" : 10, "type" : "array" } }, "type" : "object" } ] } } }, "description" : "match with id" }, "400" : { "description" : "bad input parameter" }, "404" : { "description" : "match not found" }, "500" : { "description" : "internal server errror" } }, "summary" : "gets match by MatchID", "tags" : [ "matches" ] } }, "/match/{id}/chat" : { "get" : { "description" : "Get match-chat by MatchID\n", "operationId" : "getMatchChat", "parameters" : [ { "description" : "match id", "explode" : false, "in" : "path", "name" : "id", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" }, { "explode" : true, "in" : "query", "name" : "translated", "required" : false, "schema" : { "enum" : [ 0, 1 ], "type" : "number" }, "style" : "form" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MatchChat" } } }, "description" : "match with id" }, "400" : { "description" : "bad input parameter" }, "404" : { "description" : "match not found" }, "500" : { "description" : "internal server error" } }, "summary" : "gets match-chat by MatchID", "tags" : [ "matches" ] } }, "/match/{id}/rounds" : { "get" : { "description" : "Get match-rounds by MatchID\n", "operationId" : "getMatchRounds", "parameters" : [ { "description" : "match id", "explode" : false, "in" : "path", "name" : "id", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MatchRounds" } } }, "description" : "match with id" }, "400" : { "description" : "bad input parameter" }, "404" : { "description" : "match not found" }, "500" : { "description" : "internal server error" } }, "summary" : "gets match-rounds by MatchID", "tags" : [ "matches" ] } }, "/match/{id}/weapons" : { "get" : { "description" : "Get match-weapons by MatchID\n", "operationId" : "getMatchWeapons", "parameters" : [ { "description" : "match id", "explode" : false, "in" : "path", "name" : "id", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MatchWeapons" } } }, "description" : "match with id" }, "400" : { "description" : "bad input parameter" }, "404" : { "description" : "match not found" }, "500" : { "description" : "internal server error" } }, "summary" : "gets match-weapons by MatchID", "tags" : [ "matches" ] } }, "/matches" : { "get" : { "description" : "Get last 10 matches\n", "operationId" : "getMatches", "parameters" : [ { "description" : "Unix time after which games are loaded", "explode" : true, "in" : "query", "name" : "after", "required" : false, "schema" : { "format" : "int64", "type" : "integer" }, "style" : "form" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Match" } } }, "description" : "match with id" }, "400" : { "description" : "bad input parameter" }, "500" : { "description" : "internal server error" } }, "summary" : "gets matches", "tags" : [ "matches" ] } }, "/player/{id}" : { "get" : { "description" : "Get player by steamid64\n", "operationId" : "getPlayer", "parameters" : [ { "description" : "player steamid64", "explode" : false, "in" : "path", "name" : "id", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" }, { "description" : "Unix time after which games are loaded", "explode" : true, "in" : "query", "name" : "after", "required" : false, "schema" : { "format" : "int64", "type" : "integer" }, "style" : "form" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Player" } } }, "description" : "player with matches and stats" }, "400" : { "description" : "bad input parameter" }, "404" : { "description" : "player not found" }, "500" : { "description" : "unable to get player" } }, "summary" : "gets player by steamID64", "tags" : [ "players" ] } }, "/player/{id}/meta" : { "get" : { "description" : "Get player-meta by steamid64\n", "operationId" : "getPlayerMeta", "parameters" : [ { "description" : "player steamid64", "explode" : false, "in" : "path", "name" : "id", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" }, { "description" : "Number of returned meta-stats", "explode" : true, "in" : "query", "name" : "limit", "required" : true, "schema" : { "maximum" : 10, "minimum" : 1, "type" : "integer" }, "style" : "form" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PlayerMeta" } } }, "description" : "player meta stats" }, "400" : { "description" : "bad input parameter" }, "404" : { "description" : "player not found" }, "500" : { "description" : "unable to get player meta-stats" } }, "summary" : "gets player-meta by steamID64", "tags" : [ "players" ] } }, "/player/{id}/track" : { "delete" : { "description" : "Delete player steamid64 and authcode to delete tracked status\n", "operationId" : "deletePlayerTrack", "parameters" : [ { "description" : "player steamid64", "explode" : false, "in" : "path", "name" : "id", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" }, { "description" : "player authcode", "explode" : true, "in" : "query", "name" : "authcode", "required" : true, "schema" : { "pattern" : "^[ABCDEFGHJKLMNOPQRSTUVWXYZ23456789]{4}-[ABCDEFGHJKLMNOPQRSTUVWXYZ23456789]{5}-[ABCDEFGHJKLMNOPQRSTUVWXYZ23456789]{4}$", "type" : "string" }, "style" : "form" } ], "responses" : { "200" : { "description" : "Delete successful" }, "400" : { "description" : "Invalid arguments" }, "401" : { "description" : "Authcode is invalid" }, "404" : { "description" : "Player not found" }, "500" : { "description" : "Internal server error" }, "503" : { "description" : "Steam API not available" } }, "summary" : "deletes tracked player with steamid64 by authCode", "tags" : [ "players" ] }, "post" : { "description" : "Post player steamid64, authcode (and sharecode) to track games\n", "operationId" : "postPlayerTrack", "parameters" : [ { "description" : "player steamid64", "explode" : false, "in" : "path", "name" : "id", "required" : true, "schema" : { "type" : "string" }, "style" : "simple" }, { "description" : "player authcode", "explode" : true, "in" : "query", "name" : "authcode", "required" : true, "schema" : { "pattern" : "^[ABCDEFGHJKLMNOPQRSTUVWXYZ23456789]{4}-[ABCDEFGHJKLMNOPQRSTUVWXYZ23456789]{5}-[ABCDEFGHJKLMNOPQRSTUVWXYZ23456789]{4}$", "type" : "string" }, "style" : "form" }, { "description" : "player sharecode", "explode" : true, "in" : "query", "name" : "sharecode", "required" : false, "schema" : { "pattern" : "^CSGO(?:-?[ABCDEFGHJKLMNOPQRSTUVWXYZabcdefhijkmnopqrstuvwxyz23456789]{5}){5}$", "type" : "string" }, "style" : "form" } ], "responses" : { "202" : { "description" : "Tracking successful" }, "400" : { "description" : "Invalid arguments" }, "401" : { "description" : "Authcode is invalid" }, "404" : { "description" : "Player not found" }, "412" : { "description" : "Sharecode is invalid or missing" }, "500" : { "description" : "Internal server error" }, "503" : { "description" : "Steam API not available" } }, "summary" : "tracks player with steamid64 by authCode", "tags" : [ "players" ] } } }, "components" : { "schemas" : { "Match" : { "properties" : { "match_id" : { "type" : "string" }, "share_code" : { "type" : "string" }, "map" : { "type" : "string" }, "date" : { "type" : "integer" }, "score" : { "items" : { "type" : "integer" }, "maxItems" : 2, "minItems" : 2, "type" : "array" }, "duration" : { "type" : "integer" }, "match_result" : { "enum" : [ 0, 1, 2 ], "type" : "integer" }, "max_rounds" : { "type" : "integer" }, "parsed" : { "type" : "boolean" }, "replay_url" : { "type" : "string" }, "vac" : { "type" : "boolean" }, "game_ban" : { "type" : "boolean" }, "avg_rank" : { "type" : "number" }, "tick_rate" : { "type" : "number" } }, "required" : [ "date", "duration", "game_ban", "map", "match_id", "match_result", "parsed", "score", "vac" ], "type" : "object" }, "MatchChat" : { "properties" : { "message" : { "type" : "string" }, "all_chat" : { "type" : "boolean" }, "tick" : { "type" : "integer" }, "translated_from" : { "type" : "string" }, "translated_to" : { "type" : "string" } }, "required" : [ "all_chat", "message", "tick" ], "type" : "object" }, "MatchRounds" : { "additionalProperties" : { "additionalProperties" : { "items" : { "type" : "integer" }, "maxItems" : 3, "minItems" : 3, "type" : "array" }, "type" : "object" }, "type" : "object" }, "MatchWeapons" : { "properties" : { "equipment_map" : { "additionalProperties" : { "type" : "string" }, "type" : "object" }, "stats" : { "items" : { "additionalProperties" : { "additionalProperties" : { "items" : { "items" : { "type" : "integer" }, "maxItems" : 3, "minItems" : 3, "type" : "array" }, "type" : "array" }, "type" : "object" }, "type" : "object" }, "type" : "array" }, "spray" : { "items" : { "additionalProperties" : { "additionalProperties" : { "items" : { "items" : { "type" : "number" }, "maxItems" : 3, "minItems" : 3, "type" : "array" }, "type" : "array" }, "type" : "object" }, "type" : "object" }, "type" : "array" } }, "type" : "object" }, "Player" : { "properties" : { "steamid64" : { "type" : "string" }, "name" : { "type" : "string" }, "avatar" : { "type" : "string" }, "vac" : { "type" : "boolean" }, "vac_date" : { "format" : "int64", "type" : "integer" }, "game_ban" : { "type" : "boolean" }, "game_ban_date" : { "format" : "int64", "type" : "integer" }, "tracked" : { "type" : "boolean" }, "vanity_url" : { "type" : "string" }, "match_stats" : { "$ref" : "#/components/schemas/Player_match_stats" }, "matches" : { "items" : { "$ref" : "#/components/schemas/Match" }, "type" : "array" } }, "required" : [ "game_ban", "steamid64", "tracked", "vac" ], "type" : "object" }, "PlayerMeta" : { "properties" : { "player" : { "$ref" : "#/components/schemas/Player" }, "best_mates" : { "items" : { "$ref" : "#/components/schemas/PlayerMate" }, "type" : "array" }, "most_mates" : { "items" : { "$ref" : "#/components/schemas/PlayerMate" }, "type" : "array" }, "eq_map" : { "additionalProperties" : { "type" : "string" }, "type" : "object" }, "weapon_dmg" : { "items" : { "$ref" : "#/components/schemas/PlayerMeta_weapon_dmg" }, "type" : "array" }, "win_maps" : { "additionalProperties" : { "type" : "number" }, "type" : "object" }, "tie_maps" : { "additionalProperties" : { "type" : "number" }, "type" : "object" }, "total_maps" : { "additionalProperties" : { "type" : "integer" }, "type" : "object" } }, "required" : [ "player" ], "type" : "object" }, "PlayerMate" : { "properties" : { "player" : { "$ref" : "#/components/schemas/Player" }, "win_rate" : { "type" : "number" }, "tie_rate" : { "type" : "number" }, "total" : { "type" : "integer" } }, "required" : [ "player" ], "type" : "object" }, "Stats" : { "properties" : { "team_id" : { "type" : "integer" }, "kills" : { "type" : "integer" }, "deaths" : { "type" : "integer" }, "assists" : { "type" : "integer" }, "headshots" : { "type" : "integer" }, "mvp" : { "type" : "integer" }, "score" : { "type" : "integer" }, "crosshair" : { "type" : "string" }, "color" : { "type" : "string" }, "player" : { "$ref" : "#/components/schemas/Player" }, "rank" : { "$ref" : "#/components/schemas/Stats_rank" }, "multi_kills" : { "$ref" : "#/components/schemas/Stats_multi_kills" }, "dmg" : { "$ref" : "#/components/schemas/Stats_dmg" }, "flash" : { "$ref" : "#/components/schemas/Stats_flash" } }, "required" : [ "assists", "deaths", "headshot", "kills", "mvp", "score", "team_id" ], "type" : "object" }, "Player_match_stats" : { "properties" : { "win" : { "type" : "integer" }, "loss" : { "type" : "integer" }, "tie" : { "type" : "integer" } }, "type" : "object" }, "PlayerMeta_weapon_dmg" : { "properties" : { "eq" : { "type" : "integer" }, "dmg" : { "type" : "integer" } }, "type" : "object" }, "Stats_rank" : { "properties" : { "old" : { "type" : "integer" }, "new" : { "type" : "integer" } }, "type" : "object" }, "Stats_multi_kills" : { "properties" : { "duo" : { "type" : "integer" }, "triple" : { "type" : "integer" }, "quad" : { "type" : "integer" }, "pent" : { "type" : "integer" } }, "type" : "object" }, "Stats_dmg" : { "properties" : { "ememy" : { "type" : "integer" }, "team" : { "type" : "integer" } }, "type" : "object" }, "Stats_flash_duration" : { "properties" : { "self" : { "type" : "number" }, "team" : { "type" : "number" }, "enemy" : { "type" : "number" } }, "type" : "object" }, "Stats_flash_total" : { "properties" : { "self" : { "type" : "integer" }, "team" : { "type" : "integer" }, "enemy" : { "type" : "integer" } }, "type" : "object" }, "Stats_flash" : { "properties" : { "duration" : { "$ref" : "#/components/schemas/Stats_flash_duration" }, "total" : { "$ref" : "#/components/schemas/Stats_flash_total" } }, "type" : "object" } } } }