API Endpoints
This document outlines the available API endpoints for managing window controls, team actions, and application settings. All endpoints are prefixed with http://localhost:8080/api.
The API is divided into three main categories:
Window Actions
The api/window/ endpoints manage the application’s window states and utilities.
| Endpoint | Method | Description |
|---|---|---|
/api/window/toggleWindow | GET | Toggles the main window between open and closed states. |
/api/window/minimizeWindow | GET | Minimizes the main window to the taskbar. |
/api/window/closeWindow | GET | Hides the main window without exiting the app. |
/api/window/openWindow | GET | Opens the main window if it’s hidden or closed. |
/api/window/toggleOrientation | GET | Switches the main window’s orientation (e.g., horizontal/vertical). |
/api/window/hotkeyManager | GET | Opens the hotkey manager window. |
/api/window/checkForUpdates | GET | Checks for available application updates. |
/api/window/getAppVersion | GET | Returns the current application version |
Example
To toggle the window:
GET http://localhost:8080/api/window/toggleWindowResponse: 200 OK on success.
Team Actions
The api/team/ endpoints manage team-related data, such as scores, names, and appearances.
| Endpoint | Method | Query Parameters | Description |
|---|---|---|---|
/api/team/swapTeams | GET | None | Swaps the positions of the two teams. |
/api/team/resetTeams | GET | None | Resets all team data to default values. |
/api/team/increment | GET | team (required) | Increments the score of the specified team by 1. |
/api/team/decrement | GET | team (required) | Decrements the score of the specified team by 1. |
/api/team/setScore | GET | team (required), score (required) | Sets the score for the specified team. |
/api/team/setTeamName | GET | team (required), name (required) | Updates the name of the specified team. |
/api/team/setTeamInfo | GET | team (required), info (required) | Sets additional info (e.g., description) for the team. |
/api/team/setTeamColor | GET | team (required), color (required) | Sets the team’s color using a hex code (e.g., FF5733). |
/api/team/setTeamLogo | GET | team (required), logo (required) | Sets the team’s logo (local path or URL). |
/api/team/updateMatchData | GET | None | Saves the current match data. |
Parameters
team: Must be1or2to specify the target team.score: An integer value (e.g.,10).color: A hex color code without#(e.g.,FF5733for orange).logo: A file path (e.g.,C:/logos/team1.png) or URL (e.g.,https://example.com/logo.png).
Example
To set Team 1’s score to 5:
GET http://localhost:8080/api/team/setScore?team=1&score=5Response: 200 OK on success, 400 Bad Request if parameters are missing.
App Actions
The api/app/ endpoints handle application-level configurations.
| Endpoint | Method | Query Parameters | Description |
|---|---|---|---|
/api/app/selectgameconfig | GET | game (required), version (required) | Selects a game configuration by its ID. |
/api/app/getgameconfigs | GET | None | Returns the current game configurations available (if no id is provided). |
Parameters
game: A unique identifier for the game config (e.g.,Overwatch).version: The version of the game config (e.g.,1.0).
Example
To select a game config:
GET http://localhost:8080/api/app/selectgameconfig?game=Overwatch&version=1.0Response: 200 OK on success.
Live Data
The api/ endpoints provide access to live data for the dashboard overlay.
| Endpoint | Method | Query Parameters | Description |
|---|---|---|---|
/api/getfulljson | GET | None | Returns a JSON object containing all data needed to run the overlay. |
/api/getValue | GET | value (required) | Retrieves a specific value from the dashboard data using dot notation. |
/api/bracket | GET | None | Returns the current bracket data in JSON format. |
/api/tournament-teams | GET | None | Returns the list of teams in the current tournament. |
Parameters
value: A string in dot notation to specify the data to fetch (e.g.,teams.team1.players.0).
Examples
To fetch the full JSON data for the overlay: GET http://localhost:8080/api/getfulljsonÂ
Response: 200 OK with a JSON object containing all data.
To get a specific value, such as the name of Team 1:
GET http://localhost:8080/api/getValue?value=teams.team1.teamName
**Response**: `200 OK` with the value `"Ninjacats"`.General Notes
- Base URL: Most all endpoints are accessed via
http://localhost:8080/apiunless otherwise mentioned. - Success Response: Returns
200 OKunless otherwise specified. - Error Handling: Missing or invalid query parameters result in a
400 Bad Request. - Hotkeys: Retrieved via
/api/window/getHotkeysas a JSON object. - Team Values: The
teamparameter must be1or2.