{"name":"TechTools WarCraft III API","version":"1.0","description":"WarCraft III: The Frozen Throne LAN over the internet: a shared map catalogue, teams with a TechCall voice room each (LAN rooms), map ratings and comments, and a personal OpenVPN (TAP) config or Windows installer per account.","base_url":"https://techtools.cz/warcraft3-api","auth":{"public":"GET /docs, GET /maps, GET /maps/:id, GET /maps/:id/download, GET /maps/:id/comments, GET /vpn/info","account":"TechTools account session cookie (_techtools_session from /shared-auth-api/login); send it with every call"},"endpoints":{"list_maps":{"method":"GET","path":"/maps","auth":"none","returns":"{ maps: [{ id, title, filename, players, description, byte_size, sha256, download_count, uploaded_by, rating, rating_count, my_rating, comment_count, download_url }] }"},"get_map":{"method":"GET","path":"/maps/:id","auth":"none"},"download_map":{"method":"GET","path":"/maps/:id/download","auth":"none","returns":"the .w3x/.w3m file"},"upload_map":{"method":"POST","path":"/maps","auth":"account","body":"multipart: file (.w3x/.w3m, max 16 MB, must start with HM3W), title?, players? (e.g. \"1-8\"), description?","limits":"20 uploads a day per account; the same file is stored once","returns":"201 { map }"},"delete_map":{"method":"DELETE","path":"/maps/:id","auth":"admin only","returns":"204"},"rate_map":{"method":"POST","path":"/maps/:id/rating","auth":"account","body":{"stars":"1 to 5 in steps of 0.5"},"returns":"{ map } with rating (average stars), rating_count, my_rating"},"unrate_map":{"method":"DELETE","path":"/maps/:id/rating","auth":"account"},"list_comments":{"method":"GET","path":"/maps/:id/comments","auth":"none","returns":"{ comments: [{ id, body, author, created_at, can_delete }] } newest first, max 200"},"add_comment":{"method":"POST","path":"/maps/:id/comments","auth":"account","body":{"body":"max 500 characters"},"limits":"50 a day per account"},"delete_comment":{"method":"DELETE","path":"/maps/:id/comments/:comment_id","auth":"account (author or admin)","returns":"204"},"list_teams":{"method":"GET","path":"/teams","auth":"account","returns":"{ teams: [{ id, name, max_players, map, owner, is_owner, is_member, members: [{ username, vpn_ip }], call_url (members only) }] } (voice rooms active in the last 14 days)"},"get_team":{"method":"GET","path":"/teams/:id","auth":"account"},"create_team":{"method":"POST","path":"/teams","auth":"account","body":{"name":"required, max 60","max_players":"2-12, default 4","map_id":"optional map id"},"limits":"5 active voice rooms per owner"},"join_team":{"method":"POST","path":"/teams/:id/join","auth":"account","errors":"422 when the team is full"},"leave_team":{"method":"POST","path":"/teams/:id/leave","auth":"account"},"delete_team":{"method":"DELETE","path":"/teams/:id","auth":"account (owner)","returns":"204"},"vpn_info":{"method":"GET","path":"/vpn/info","auth":"none","returns":"{ server, port, protocol, layer, subnet, game_port, patch, openvpn_version }"},"vpn_status":{"method":"GET","path":"/vpn","auth":"account","returns":"{ ...info, pairable, status_at, slot: { name, ip, manual, connected, connected_since } | null, online: [{ name, ip, since, bytes_in, bytes_out, rate_in, rate_out, macs, me, dm }], players: [{ name, ip, online, since, last_seen, last_session, total, me, dm }] } (dm: Public Chat address for a direct message, /tools/public-chat/#dm=\u003cdm\u003e, when the player has a chat name; players: everyone with a VPN config, offline too, online first) (status_at: when the VPN wrote its status, every 20 s; rates in bytes/s between the last two status files, null until known)"},"vpn_claim":{"method":"POST","path":"/vpn","auth":"account","returns":"201 { slot: { name, ip } } (an account keeps its slot; 503 when the pool is empty)"},"vpn_config":{"method":"GET","path":"/vpn/config","auth":"account","returns":"TechTools-War3-LAN.ovpn (contains your private key: one file = one person)"},"vpn_installer":{"method":"GET","path":"/vpn/installer","auth":"account","returns":"TechTools-War3-LAN-Setup.exe: OpenVPN Community + TAP driver + your config, Windows 10/11 x64"},"vpn_linux_config":{"method":"GET","path":"/vpn/config?os=linux","auth":"account","returns":"techtools-war3.conf for Linux (device war3lan, broadcast route into the VPN)"},"vpn_linux_script":{"method":"GET","path":"/vpn/linux","auth":"account","returns":"TechTools-War3-LAN.sh: sudo bash it to install OpenVPN + your config and connect (apt, dnf, pacman, zypper)"},"vpn_pair":{"method":"POST","path":"/vpn/pair","auth":"account","returns":"{ slot } pairs the account with your own hand-made war3lan config, which must be connected now from the same public IP; 422 otherwise. A paired config has no download (409)"},"vpn_reset":{"method":"POST","path":"/vpn/reset","auth":"account","returns":"{ slot } a new slot; the old config and installer stop working at once","limits":"resets + give-backs: 3 a day (429)"},"vpn_release":{"method":"DELETE","path":"/vpn","auth":"account","returns":"204; the config stops working (a slot never downloaded goes back to the pool)","limits":"resets + give-backs: 3 a day (429); unpairing an own config is not limited"}},"errors":"Every error is { error, code }. Codes: AUTH_REQUIRED, NOT_FOUND, INVALID, MAP_EXT, MAP_TOO_BIG, MAP_NOT_W3, MAP_DUPLICATE, MAP_INVALID, UPLOAD_LIMIT, RATING_RANGE, COMMENT_LIMIT, ROOM_LIMIT, ROOM_FULL, OWNER_LEAVES, VPN_FULL, VPN_DOWN, CHURN_LIMIT, OWN_CONFIG, NO_INSTALLER, PAIR_NONE, PAIR_MANY.","examples":["curl https://techtools.cz/warcraft3-api/maps","curl -OJ https://techtools.cz/warcraft3-api/maps/1/download","curl -c jar -H \"Content-Type: application/json\" -d '{\"username\":\"u\",\"password\":\"p\"}' https://techtools.cz/shared-auth-api/login","curl -b jar -X POST https://techtools.cz/warcraft3-api/vpn \u0026\u0026 curl -b jar -OJ https://techtools.cz/warcraft3-api/vpn/config"],"how_to_play":["Install the TechTools War3 LAN installer (Windows) or import the .ovpn into OpenVPN 2.6+ (TAP).","Connect. Everyone on the VPN shares one LAN, 10.66.66.0/24.","Start WarCraft III (all players on the same patch, 1.27b), Local Area Network, create or join a game."],"privacy":"Signed-in accounts see who is on the VPN now (username and VPN address) and the members of every voice room. Real IP addresses are never shown; pairing compares your public IP on the server only. Your slot, teams and uploaded maps appear in My data and are deleted with the account."}