Getting Started
Get started with the Event API: use the Try API to call endpoints and inspect responses, open the game schedule and WebSocket viewer (with box score and shot locations), run a mock game to practice live flows, and explore the docs.
Try API
The Try API is an interactive tool to run GET requests against the Event API using credentials you validate in the workspace. You can select an endpoint, fill path and query parameters, run the request, and inspect the JSON response. Response search and copy-to-clipboard are available.
Open the Try API from the workspace by clicking Try API in the Explore pane (after validating your Event API username and secret). You can also go directly to /try.
- Event API GET endpoints only
- Path parameters and query parameters with sensible defaults where defined in the spec
- Subscription endpoints: after a successful response, a link appears to open the WebSocket viewer with the returned token
Game schedule
In the Try API you can switch to View game schedule. The game schedule shows a calendar and list of games for your credentialed account. You can filter by date range, team ID, location ID, season type, and week number. From a game you can subscribe to live data and open the WebSocket viewer with one click.
The schedule is powered by the Game Schedule endpoint (GET /v1/data/schedule/games). Optional filters map to query parameters such as type, team_id, location_id, seasonType, and weekNumber.
Open Try API and choose "View game schedule".
WebSocket viewer
The WebSocket viewer connects to the Event API Live Data V2 WebSocket using a subscription token. You get the token by calling a game subscription endpoint (e.g. from Try API or from the game schedule). The viewer shows incoming and outgoing messages in real time, with search and expand/collapse. In the viewer you can see box score data and shot locations as messages stream in.
The viewer is available at /try/websocket when opened with a token query parameter (typically from the Try API or game schedule "Subscribe & open WebSocket" action). See Live Data V2 (WebSocket) for connection URL, parameters, and message shapes.
Mock game
The Mock game lets you run a simulated live game in the ShotTracker development environment (devapi.shottracker.com). You can start a game, record shots, and subscribe to live data—useful for testing your integration without a real event. Open it from the workspace Explore pane via Mock game (after validating Event API credentials).
How to start a game
- Open the workspace and validate your Event API credentials.
- Click Mock game in the Explore pane to open the mock game window.
- Choose a game duration (e.g. 2, 5, or 10 minutes).
- Click Start game. The game is scheduled and then started; the court and shot list appear and the timer runs.
How to add a shot
- With the game live, click a spot on the half-court diagram to set the shot location (Step 1). The location determines 2pt vs 3pt.
- Click Make or Miss (Step 2) to record the result. The shot is sent to the API and appears in the "This game" list.
Updating and deleting shots
You can edit or remove a shot after it’s recorded:
- Edit: In the "This game" list, click the shot you want to change. An edit panel appears: change Make/Miss or the assigned player, then click Save. The correction is sent to the API.
- Delete: With the shot selected in the edit panel, click Delete shot to remove it from the game.
Important: test the full correction edit matrix, not just the happy path.
- Delete shot: record multiple shots, delete one, and verify every affected total and player attribution updates correctly.
- Update make → miss: change a shot from Make to Miss and verify points and the relevant made/missed counters flip.
- Update miss → make: change a shot from Miss to Make and verify points and the relevant made/missed counters flip.
- Update player → player: switch the assigned player while keeping the Make/Miss result the same, and verify stats move from one player to the other.
- Combined edits on one shot: apply both (a) Make/Miss change and (b) player change to the same shot, and verify the final box score reflects both corrections.
- Multiple edits in one game: do delete + updates across multiple shots (and repeat edits), and verify the final results match the full set of corrections (i.e., final state correctness across combinations).
- Applies beyond shots: the mock game is shot testing, but the correction system supports the same categories for other editable stats too—deletion, stat-type changes (e.g. one kind to another), and attribution changes (player → player).
When you validate the outcome, confirm your displayed “live” box score/totals reflect the corrected state (for example, by using the correction-aware broadcastsummary source).
Mock games are only available in the development environment (devapi.shottracker.com). When a game is live, the window shows a subscribe URL and WebSocket URL so you can attach your client or the built-in WebSocket viewer.
To use the Try API and game schedule, validate your Event API credentials in the workspace first.