GETSearch Team Events
The response will include both practice and/or game events. If the event is a game, additional fields are returned; game_type, is returned in the event node to indicate whether the game is halves (HALF) or quarters (QUARTER); and totals which will include links to the full game stats.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| team_id | path | number | Yes | ID of the team |
| from | query | number | Yes | The starting epoch timestamp (in milliseconds) |
| to | query | number | Yes | The ending epoch timestamp (in milliseconds) |
| gamesonly | query | boolean | No | If the field is present and true on the request only games will be returned |
| workoutsonly | query | string | No | If the field is present and true on the request only live workouts will be returned. Workouts are only shown in the response by using this parameter; if not provided or false workouts will not be returned. |
Responses
- 200OK
{ "events": [ { "id": "cf3ba789-06c4-11e8-bb65-0242286dfad2", "name": "TeamAppTeam vs TestTeamAlpha", "results": [ { "id": "cf56d0aa-06c4-11e8-bb65-0242286dfad2", "name": null, "type": "GAME_ROUND", "started_at": 1517430299810, "ended_at": 1517431728868, "_stats": "https://api.shottracker.com/v1/data/stats/cf56d0aa-06c4-11e8-bb65-0242286dfad2/stats", "_stats_details": "https://api.shottracker.com/v1/data/stats/cf56d0aa-06c4-11e8-bb65-0242286dfad2/stats/details", "_shots": "https://api.shottracker.com/v1/data/stats/cf56d0aa-06c4-11e8-bb65-0242286dfad2/shots", "_locations": [ "https://api.shottracker.com/v1/data/sensors/locations?id=cf56d0aa-06c4-11e8-bb65-0242286dfad2&from=1517430299810&to=1517431728868" ], "_possessions": "https://api.shottracker.com/v1/data/stats/cf56d0aa-06c4-11e8-bb65-0242286dfad2/possessions", "_possessions_summary": "https://api.shottracker.com/v1/data/stats/cf56d0aa-06c4-11e8-bb65-0242286dfad2/possessions/summary" }, { "id": "23d3344b-06c8-11e8-bb65-0242286dfad2", "name": null, "type": "GAME_ROUND", "started_at": 1517431730064, "ended_at": 1517431732978, "_stats": "https://api.shottracker.com/v1/data/stats/23d3344b-06c8-11e8-bb65-0242286dfad2/stats", "_stats_details": "https://api.shottracker.com/v1/data/stats/23d3344b-06c8-11e8-bb65-0242286dfad2/stats/details", "_shots": "https://api.shottracker.com/v1/data/stats/23d3344b-06c8-11e8-bb65-0242286dfad2/shots", "_locations": [ "https://api.shottracker.com/v1/data/sensors/locations?id=23d3344b-06c8-11e8-bb65-0242286dfad2&from=1517431730064&to=1517431732978" ], "_possessions": "https://api.shottracker.com/v1/data/stats/23d3344b-06c8-11e8-bb65-0242286dfad2/possessions", "_possessions_summary": "https://api.shottracker.com/v1/data/stats/23d3344b-06c8-11e8-bb65-0242286dfad2/possessions/summary" } ], "is_practice_event": false, "is_game_event": true, "started_at": 1517430299810, "ended_at": 1517431732978, "game_type": "HALF", "_self": "https://api.shottracker.com/v1/data/teams/12345/games/cf3ba789-06c4-11e8-bb65-0242286dfad2", "totals": { "_stats_details": "https://api.shottracker.com/v1/data/stats/games/cf3ba789-06c4-11e8-bb65-0242286dfad2/stats/details" }, "game_attributes": { "home_team_id": 1, "home_team_name": "TestTeamAlpha", "away_team_id": 2, "away_team_name": "TeamAppTeam" } } ] } - 422Unprocessable Entity
{ "status": 422, "message": "Both from and to must be greater than 0 | from timestamp must be less than to timestamp | Request may not exceed more than 8 months", "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba" } - 500Internal Server Error
{ "status": 500, "message": "<General System Error Message>", "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba" }