Event API Overview

The ShotTracker Event API consists of REST endpoints and websockets to deliver data in realtime. The API reference is broken down into the following sections:

Use Cases

Access to ShotTracker data can drive applications and solutions that do the following:

  • Display a leaderboard for team and player stats over the course of a season or a real time event.

  • Analyze stats and shots to reflect trends over the course of a season or a real time event.

  • Show live player movement in applications, broadcast or augmented reality solutions.

  • Analyze team and player movement for trends.

Authentication

All requests to the REST API must be signed using the ShotTracker issued username and secret. A ShotTracker API username/secret pair contains specific privileges; be sure to keep both secured.

Signing a request is done using HMAC. The following headers are needed for signing and required to be sent with each request.

Header Name Description
date Standard UTC date; be sure to keep the current time as the clock must not skew more than 5 minutes
host The servers host
Authorization The full hmac value with signature; see example below

Below is a nodejs example illustrating the data required and how to formulate the data into the signing stream.

var crypto = require("crypto");

var userName = 'ShotTracker supplied user name here';
var secret = 'ShotTracker supplied secret here';
var host = 'devapi.shottracker.com';
var pathUriWithoutQueryString = '/v1/data/live/_search';
var method = 'GET';
var date = new Date().toUTCString();

var requestLine = method + ' ' + pathUriWithoutQueryString + ' HTTP/1.1';
var stringToSign = 'date: ' + date.trim() + '\n'
                 + 'host: ' + host + '\n'
                 + requestLine;
var encodedSignature = crypto.createHmac("sha1", secret).update(stringToSign).digest("base64");
var hmacAuth = 'hmac username="' + userName + '",algorithm="hmac-sha1",headers="date host request-line",signature="' + encodedSignature + '"';

console.log('date: ' + date);
console.log('Authorization: ' + hmacAuth);

Note Only the API (REST Resources) require a signed request. Authentication to the websocket is done by only providing the acquired subscription token.

Environment Endpoints

Development/ShotTracker Lab

Production

Getting Started

When working with live data, how to get the data during the development cycle is the first step. To get started there is a ShotTracker mock service which plays a continuous loop of live data.

mock example

The data is only a few minutes in length and represents a portion of a live practice scrimmage. The mock service does not expose the Live Notification endpoints directly but they can be simulated. To simulate sending notifications from the mock service, the following mock service endpoints may be used. Please contact ShotTracker to obtain the {key}.

Start Notify

PUT http://mockapi.shottracker.com:8080/mock/{key}/do/live/notify/start?url={your notify url}

End Notify

PUT http://mockapi.shottracker.com:8080/mock/{key}/do/live/notify/end?url={your notify url}

Mock Service Endpoints

Mock Service Security

The mock service offers both a “Security Required” and “No Security Required” REST API access. “Security Required” means the request must contain the Authorization header. The “No Security Required” endpoint gives a developer the freedom to work with data and introduce authentication at a later point in the development cycle. In the non-mock environments all REST API’s are “Security Required”.

Below is the username and secret to use with the Security Required Mock Service API.

username: 2e4118d42e5011e6b4a4deecc6e6f587
secret: 2d64b892e8d434100001

Important The above username and secret is restricted only to the mock service. For access to the non-mock environments please contact ShotTracker to obtain a username and secret.

Quickstart Examples

Subscribing to Live Event

Below is a nodejs example that brings together using the REST endpoints and migrating controller to the websocket to consume the live stats, shots and player/ball locations.

var http = require('http')
var WebSocket = require('ws');

function subscribeToEvent(liveId, callback) {
  var options = {
      host: 'mockapi.shottracker.com',
      port: 8080,
      path: `/v1/data/live/${liveId}/_subscribe`,
      method: 'GET',
      headers: {
        Accept: 'application/json',
      }
    }

    console.log(`Requesting token from ${options.host}`)

    http.request(options, function(response) {
      var subscribeResponseData = '';
      response.on('data', function (chunk) {
        subscribeResponseData += chunk;
      });

      response.on('end', function () {
          var liveToken = JSON.parse(subscribeResponseData).token
          console.log(`Got token ${liveToken}`)
          callback(`ws://mocklive.shottracker.com:8081/?token=${liveToken}`);
      });
    }).end();
}

function establishWebsocketConnection(url) {
  console.log(`Connecting to ${url}`);
  wsConnection = new WebSocket(url);
  wsConnection.addEventListener('open', function(event){
    sendPing(this);
  });
  wsConnection.addEventListener('message', function(payload){
    console.log(payload.data);
    // TODO: Handle payload data
  });
}

function sendPing(conn) {
  setInterval(function(){
    conn.send(JSON.stringify({action: 'ping'}));
  },60000);
}

var liveIdFromSearchOrNotify = 'practice-123'
subscribeToEvent(liveIdFromSearchOrNotify, establishWebsocketConnection);

Team Player Stats

The following command will retrieve team player stats over the from/to range.

curl -X GET "http://mockapi.shottracker.com:8080/v1/data/teams/490/players/practice/stats?from=1530403200000&to=1531353600000"

Team Events

The following command will retrieve past events over the from/to range.

curl -X GET "http://mockapi.shottracker.com:8080/v1/data/teams/490/events?from=1522540800000&to=1525132800000"

Data Overview

ShotTracker is a sensor based system that captures team and player stats in real time. The data that ShotTracker captures is used to build box scores, plot shots and show player and ball movement. ShotTracker data is broken down into 3 main categories, box score and possession stats, shots and locations.

Box Score Stats

The system will emit all box score stats under the following abbreviations:

Stat Name Description
FGA field goal attempt
FG field goal
FGA3 3 point field goal attempt
FG3 3 point field goal
FGA2 2 point field goal attempt
FG2 2 point field goal
FGA_CAS catch and shoot field goal attempt
FG_CAS catch and shoot field goal
FGA3_CAS catch and shoot 3 point field goal attempt
FG3_CAS catch and shoot 3 point field goal
FGA2_CAS catch and shoot 2 point field goal attempt
FG2_CAS catch and shoot 2 point field goal
FGA_OTD off the dribble field goal attempt
FG_OTD off the dribble field goal
FGA3_OTD off the dribble 3 point field goal attempt
FG3_OTD off the dribble 3 point field goal
FGA2_OTD off the dribble 2 point field goal attempt
FG2_OTD off the dribble 2 point field goal
FTA free throw attempt
FT free throw
PTS points
AST assist
TO turnover
STL steal
REB rebound
OFFENSIVE_REB offensive rebound; typically paired with a REB to give more context
DEFENSIVE_REB defensive rebound; typically paired with a REB to give more context
DIST distance traveled in cm
FL foul
BLK block
TEAM_SCORE the current team score for the given team_id; only included for scoring stat in games
OPPOSING_TEAM_SCORE the current opposing team score from the team_id; only included for scoring stat in games

In most cases, the stats will be paired together to represent the most current value(s) on the box score for the given player. Stats data will be paired together in single response; the example JSON snippet below represents a made field goal attempt:

{“type”:“stats”,“data”:{“occurred_at”:1500571319432,“team_id”:461,“player_id”:2623,“stats”:{“FGA”:15.0,“FGA2”:15.0",“FG”:8.0,“FG2”:8.0,“PTS”:17.0},“classification”:“TWO_POINT_MAKE”,“version”:1941}}

The values in the above example reflect the most current stat values that would be reflective on the players box score.

Stats can also change with a manual correction. This means the example above would change to the following if the shot is deleted:

{“type”:“stats”,“data”:{“occurred_at”:1500571319432,“team_id”:461,“player_id”:2623,“stats”:{“FGA”:14.0,“FG”:7.0,“PTS”:15.0},“classification”:“DELETED_TWO_POINT_MAKE”,“version”:1942}}

Both adding and deleting of the field goal looks the same in the paired together stats response. As a result a classification field is added to each stats response to give more context around what the collected stats values represent. The following are the general the classification values but do not represent the full list. Stats can be custom made by teams which can also be updatable. Some non-shooting stats are update from one type to another which can also be reflected in the classification.

Classification Value Description
FREE_THROW_MISS Missed free throw
FREE_THROW_MAKE Made free throw
TWO_POINT_MISS Missed field goal
TWO_POINT_MAKE Made field goal
THREE_POINT_MISS Missed 3 point field goal
THREE_POINT_MAKE Made 3 point field goal
ASSIST Assist
TURNOVER Turnover
STEAL Steal
REBOUND Rebound
OFFENSIVE_REBOUND Offensive rebound
DEFENSIVE_REBOUND Defensive rebound
DISTANCE Distance traveled
DELETED_FREE_THROW_MISS Deleted missed free throw
DELETED_FREE_THROW_MAKE Deleted made free throw
UPDATED_FREE_THROW_MAKE_TO_MISS Updated free throw make to miss
UPDATED_FREE_THROW_MISS_TO_MAKE Updated free throw miss to make
DELETED_TWO_POINT_MISS Deleted missed field goal
DELETED_TWO_POINT_MAKE Deleted made field goal
UPDATED_TWO_POINT_MAKE_TO_MISS Updated field goal from make to miss
UPDATED_TWO_POINT_MISS_TO_MAKE Updated field goal from miss to make
DELETED_THREE_POINT_MISS Deleted missed 3 point field goal
DELETED_THREE_POINT_MAKE Deleted made 3 point field goal
UPDATED_THREE_POINT_MAKE_TO_MISS Updated 3 point field goal from make to miss
UPDATED_THREE_POINT_MISS_TO_MAKE Updated 3 point field goal from miss to make
DELETED_ASSIST Deleted assist
DELETED_TURNOVER Deleted turnover
DELETED_STEAL Deleted steal
DELETED_REBOUND Deleted rebound
DELETED_OFFENSIVE_REBOUND Deleted offensive rebound
DELETED_DEFENSIVE_REBOUND Deleted defensive rebound

Possession Stats

Possession stats are grouped together into the following ball movement groups:

Possession Group Abbreviation Description
HC half court
PT0_BR0 0 paint touch; 0 ball reversals
PT1_BR0 1 paint touch; 0 ball reversals
PT0_BR1 0 paint touch; 1 ball reversal
PT0_BR2 0 paint touch; 2 ball reversals
PT1_BR1 1 paint touch; 1 ball reversal
PT1_BR2 1 paint touch; 2 ball reversals
TRANSITION transition
PASS0_2 0-2 passes
PASS3_5 3-5 passes
PASS6 6+ passes
BS0 0 ball screens
BS_ALL all ball screens
BS1 1 ball screen
BS2 2 ball screens
BS3 3+ ball screens
BS_LW ball screen possessions on the left wing
BS_MW ball screen possessions on the middle wing
BS_RW ball screen possessions on the right wing
BS_PNP pick and pop ball screen possessions
BS_PNSR pick and roll ball screen possessions
BS_PNSR pick and short roll ball screen possessions
BS_SS screened shot ball screen possessions
BS_HANDOFF handoff ball screen possessions
BS_DRAG drag ball screen possessions

Each group could contain the following calculated stat summaries:

Possession Summary Stat Name Description
POSS number of possessions
POSS_PCT percent of possessions
PTS points
PPP points per possession
2PTM 2 point makes
2PTA 2 point attempts
2PT_PCT 2 point percent
3PTM 3 point makes
3PTA 3 point attempts
3PT_PCT 3 point percent
TO turnovers
TO_PCT turnover percent
EFG effective field goal

Shots

Shots are location data for each made and missed shot including the ShotTracker zone. Below is an example shot:

{“type”:“shot”,“data”:{“occurred_at”:1500571319432,“team_id”:461,“player_id”:2623,“is_make”:true,“is_3point”:false,“zone”:1,“hoop_player_x”:685,“hoop_player_y”:-475,“status”:“RECORDED”}}

Shot data contains a hoop_player_x and hoop_player_y that represents the xy location of the shot from the hoop. Representing a shot from the hoop assumes that the positive y runs from the hoop to the center of the court and positive x runs from the hoop to the right. Shots are also assigned a zone number 1 - 14 that represents the specific location around the hoop the shot occurred. The map below shows the shot locations.

zonemap

Note: All xy data is returned as mm.

Shots can be labeled with the following values; note, shot labels can be null.

Label Name Description
DUNK Dunk
LAYUP Layup
FADEAWAY Fade away
TIPIN Tip in
JUMPSHOT Jump shot
ALLEYOOP Allyoop
DRIVINGLAYUP Driving layup
HOOKSHOT Hook shot
FLOATINGJUMPSHOT Floating jump shot
STEPBACKJUMPSHOT Stepback jump shot
PULLUPJUMPSHOT Pullup jump shot
TURNAROUNDJUMPSHOT Turnaround jump shot
WRONGBASKET Wrong basket
ONEOFONE Free throw 1 of 1
ONEOFTWO Free throw 1 of 2
ONEOFTHREE Free throw 1 of 3
TWOOFTWO Free throw 2 of 2
TWOOFTHREE Free throw 2 of 3
THREEOFTHREE Free throw 3 of 3

Locations

The location data contains plotable xyz data for each player and ball on the court. Below are a few examples:

{“type”:“location”,“data”:{“occurred_at”:1500571321532,“type”:“PLAYER”,“id”:2942,“x”:2314,“y”:-8635,“z”:69,“speed”:0.1,“dist”:1.3}}

{“type”:“location”,“data”:{“occurred_at”:1500571321532,“type”:“BALL”,“id”:2147549498,“x”:-6039,“y”:-8833,“z”:1705,“speed”:0.1}}

The type denotes what sensor; either the player or ball. The id in the PLAYER event relates to the player list from the subscription request. The xyz reflects the current location of the sensor at the given occurred_at. Lastly, the speed (m/s) and distance (km) reflect the current movement speed and total distance traveled by the sensor.

Note: All xyz data is returned as mm.

Live

The Live services allow a consumer to discover an existing live event and obtain the needed meta-data about the team and players. If the event is in the middle of a practice or game the consumer can request all existing stats and shots. Consumers can also request information about the court to aid in the handling of plotting locations and shots. When subscribing to an event or live id the subscription response includes the stats endpoints to catch up to current. The websocket provides only the current event.

Request Subscription Token

Request Subscription Token
GET/v1/data/live/{live_id}/_subscribe{?dt}

The live_id indicates the lowest level of an event. For a practice the live_id is a drill and for a game it is the specific live period. For practices consumers can only subscribe to each drill and follow the practice using this endpoint. As drills change in the practice the consumer will receive marker messages for the next live_id to subscribe to. If the live event is a game, the event_id should be used with game schedule subscription endpoint. Using the schedule game subscription the consumer will subscribe to the whole game and won’t need to reconnect after each period. If a games live_id is used on this endpoint, the consumer will need to resubscribe as each period changes.

Example URI

GET /v1/data/live/live_id/_subscribe?dt=
URI Parameters
HideShow
live_id
string (required) 

ID of the live session

dt
string (optional) 

Subscribe to a specific data type. More than one data type can be passed using the &dt= notation. Possible values for this field are STATS, SHOTS, or LOCATIONS.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "token": "6141681d-df46-11e6-a818-f20e96351dc1",
  "token_data_types": [
    "STATS",
    "SHOTS",
    "LOCATIONS"
  ],
  "active_state": "LIVE",
  "active_type": "GAME_ROUND",
  "active_team_colors": {
    "teams": [
      {
        "id": 1,
        "color": "FFFF00"
      },
      {
        "id": 2,
        "color": "00FFFF"
      }
    ]
  },
  "active_name": "H1",
  "teams": [
    {
      "id": 461,
      "name": "TeamAppTeam",
      "logo_image_link": "<image link>",
      "gender": "MEN",
      "conference_name": "ACC",
      "players": [
        {
          "id": 123,
          "first_name": "John",
          "last_name": "Doe",
          "display_name": "John Doe",
          "jersey_number": 1,
          "position": "center",
          "profile_image_link": "<image link>",
          "is_active": true
        }
      ]
    }
  ],
  "_stats": "https://api.shottracker.com/v1/data/stats/6141681d-df46-11e6-a818-f20e96351dc1/stats",
  "_stats_details": "https://api.shottracker.com/v1/data/stats/6141681d-df46-11e6-a818-f20e96351dc1/stats/details",
  "_shots": "https://api.shottracker.com/v1/data/stats/6141681d-df46-11e6-a818-f20e96351dc1/shots",
  "_possession": "https://api.shottracker.com/v1/data/stats/6141681d-df46-11e6-a818-f20e96351dc1/possessions",
  "_possession_summary": "http://api.shottracker.com/v1/data/stats/6141681d-df46-11e6-a818-f20e96351dc1/possessions/summary",
  "event_completed_results": [
    {
      "id": "a59e3734-101f-11e8-be3e-0242286dfad2",
      "started_at": 123456789,
      "ended_at": 234567890,
      "type": "GAME_ROUND",
      "name": null,
      "_stats": "http://api.shottracker.com/v1/data/stats/a59e3734-101f-11e8-be3e-0242286dfad2/stats",
      "_stats_details": "http://api.shottracker.com/v1/data/stats/a59e3734-101f-11e8-be3e-0242286dfad2/stats/details",
      "_shots": "http://api.shottracker.com/v1/data/stats/a59e3734-101f-11e8-be3e-0242286dfad2/shots",
      "_possession": "http://api.shottracker.com/v1/data/stats/a59e3734-101f-11e8-be3e-0242286dfad2/possessions",
      "_possession_summary": "http://api.shottracker.com/v1/data/stats/a59e3734-101f-11e8-be3e-0242286dfad2/possessions/summary"
    }
  ],
  "event_totals": {
    "team_scores": [
      {
        "id": 1,
        "score": 0
      },
      {
        "id": 2,
        "score": 0
      }
    ]
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 400,
  "message": "The live id is no longer active",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to LOCATIONS|STATS|SHOTS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Invalid id",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Video Recording

Video Recording
PUT/v1/data/live/{live_id}/video{?id,started_at}

Video providers can index video with ShotTracker live events. A provider must supply a unique identifier for the video and the exact epoch UTC timestamp when the video was started. For full integration, the provider must be a registered as a video provider so that it is known how ShotTracker can call back to get the video.

Example URI

PUT /v1/data/live/live_id/video?id=&started_at=
URI Parameters
HideShow
live_id
string (required) 

ID of the live session

id
string (required) 

The consumer supplied id representing a video recording. Max size is 255 bytes.

started_at
number (optional) 

The exact epoch timestamp (in milliseconds) the video recording was started. If not provided it is assumed the video starts at the time of the call.

Response  204

Live Data Feed

All live data is delivered over a websocket (ws://live.shottracker.com). A websocket is a long lived connection between the realtime server and the client application. Before attaching to the websocket a client must request a subscription token.

Important: Tokens are only one time use. If a token is used to attach to a live session a new token is needed to reattach.

Example Connection Request

ws://live.shottracker.com?token=6141681d-df46-11e6-a818-f20e96351dc1

Example Connection Response

  • Ack Response (application/json)

    {"data":{"socketSessionId":"2edbccd1","serverAttributes":{"maxInputBufferSizeInBytes":8192,"connectionTimeoutInMs":120000}},"action":"subscribe","type":"ack"}

Keep Alives

The Ack response indicates how long the connection will stay open before timing out when no data is traveling over the connection (connectionTimeoutInMs). Clients should send a ping request to ensure the connection stays open when no data is received. The server will send back a corresponding pong response.

  • Ping Request (application/json)

    {"action":"ping"}
  • Pong Response (application/json)

    {"type":"pong"}

Data Type Responses

  • Stats Response (application/json)

    {"type":"stats","data":{"occurred_at":1484865816836,"team_id":461,"player_id":123,"stats":{"FGA":4.0,"PTS":4.0,"FG":2.0},"classification":"TWO_POINT_MAKE","version":317,"game_clock":"1:2.3","shot_clock":"4.5","period":"Q1"}}
  • Shots Response (application/json)

    {"type":"shot","data":{"occurred_at":1484865816836,"team_id":461,"player_id":123,"is_make":true,"is_3point":true,"zone":1,"advanced_zone":2,"hoop_x":10,"hoop_y":11669,"hoop_player_x":12,"hoop_player_y":3,"status":"RECORDED","game_clock":"1:2.3","shot_clock":"4.5","period":"Q1","label":"JUMPSHOT"}}
  • Location Response (application/json)

    {"type":"location","data":{"locations":[{"occurred_at":1478800197342,"type":"PLAYER","id":123,"x":123,"y":456,"z":789,"speed":0.1,"dist":1.3},{"occurred_at":1478800197342,"type":"PLAYER","id":456,"x":456,"y":789,"z":123,"speed":0.1,"dist":1.3},{"occurred_at":1478800197342,"type":"BALL","id":9456,"x":456,"y":789,"z":123,"speed":0.2}]}}
  • Possession Response (application/json)

    {"type":"possession","data":{"state":"SAVED","possession":{"stats":[{"timestamp":1638481004439,"possession_type":"LBTO","player_id":1,"game_clock":"12:34.5","shot_clock":"09.1"}],"start_timestamp":1638481003439,"end_timestamp":1638481004439,"team_id":1,"player_ids":[1,2,3,4,5],"opposing_player_ids":[6,7,8,9,10],"start_game_clock":"12:34.5","end_game_clock":"12:34.5","period":"Q1","possession_attributes":{"turnover":1,"passes":5,"half_court":true,"paint_touch":false,"ball_reversals":6,"ball_screens":7,"ball_screens_left_wing":8,"ball_screens_middle_wing":9,"ball_screens_right_wing":10,"ball_screens_pick_n_pop":11,"ball_screens_pick_n_roll":12,"ball_screens_pick_n_short_roll":13,"ball_screens_screened_shot":14,"ball_screens_handoff":15,"ball_screens_drag":16,"ball_screens_pop":0,"ball_screens_roll":0,"ball_screens_slip":0,"ball_screens_short_roll":0,"ball_screens_reject":0,"ball_screens_re_screen":0,"ball_screens_stay":0,"ball_screens_step_up":0,"ball_screens_snake":0,"ball_screens_split":0,"ball_screens_other":0}}}}

Marker Type Responses

Markers are multi-purpose messages emitted to indicate the period change in games or drill changes in practice, updates in game to jersey colors or which players are currently active on the floor. Some marker messages contain an additional data field depending on their type; the PLAY_NEXT and DRILL_NEXT markers are the exception to this rule.

Game State Markers

  • Pregame Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197300,"type":"PREGAME"}}
  • Start Play Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197300,"type":"PLAY_START"}}
  • End of First Half Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197333,"type":"END_FIRST_HALF"}}
  • End of First Quarter Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197333,"type":"END_FIRST_QUARTER"}}
  • End of Second Quarter Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197333,"type":"END_SECOND_QUARTER"}}
  • End of Third Quarter Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197333,"type":"END_THIRD_QUARTER"}}
  • End of Over Time Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197333,"type":"END_OVER_TIME"}}
  • Play Next Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197339,"live_id":"a1140480-e1d5-4684-a619-402984b5c9ba","type":"PLAY_NEXT"}}
  • Start of Second Half Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197366,"type":"START_SECOND_HALF"}}
  • Start of Second Quarter Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197366,"type":"START_SECOND_QUARTER"}}
  • Start of Third Quarter Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197366,"type":"START_THIRD_QUARTER"}}
  • Start of Fourth Quarter Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197366,"type":"START_FOURTH_QUARTER"}}
  • Start of Over Time Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197366,"type":"START_OVER_TIME"}}
  • End Play Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197400,"type":"PLAY_END"}}

Game Jersey Color Marker

When a game starts or while the game is running, an update will be sent when the jersey colors for the teams are initially set or changed. This will typically only happens before play starts but should be considered if the consumer subscribes to the game before it is started.

  • Jersey Color Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1616535390628,"type":"JERSEY_COLOR","data":{"teams":[{"id":461,"color":"0DDAFF"},{"id":493,"color":"00FF09"}]}}}

Practice State Markers

  • Drill Start Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197300,"type":"DRILL_START"}}
  • Drill End Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197333,"type":"DRILL_END"}}
  • Drill Next Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197339,"live_id":"a1e80480-e1d5-4684-a619-402984b5c9ba","type":"DRILL_NEXT"}}
  • Practice End Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197400,"type":"PRACTICE_END"}}

System State Markers

  • Live State Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197300,"type":"LIVE"}}
  • Paused State Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197300,"type":"PAUSED"}}
  • Foul State Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1478800197300,"type":"FOUL"}}

Lineup Detection Marker

The ShotTracker system uses auto detection for active players who are on court in practice scrimmages and games.

Lineup Status The lineup message will contain the following status:

Status Description
ADDED The player_id has been added to the active lineup
REMOVED The player_id has been removed from the active lineup
RESET There is a substitution and all on-court players will be sent again; player_id will be 0
  • Lineup Marker Response (application/json)

    {"type":"marker","data":{"occurred_at":1616535390628,"type":"LINEUP","data":{"player_id":123456,"status":"ADDED"}}}

Game Clock Response

The clock message is automatically emitted for games only.

Period The clock message will contain the following period labels:

Period Description
PRE Pre game
H1 First half
H2 Second half
Q1 First quarter
Q2 Second quarter
Q3 Third quarter
Q4 Fourth quarter
OT Over time

Clocks The clock message contains both the game and shot clock values. Each clock is broken down to the specific minutes (min), seconds (sec) and sub seconds (sub_sec) values. The values can return as null; specifically the sub_sec. In the event a clock is not detected the object will be empty: example “shot_clock”:{}.

  • Response (application/json)

    {"type":"clock","data":{"period":"H1",""game_clock":{"min":"9","sec":"39","sub_sec":null},"shot_clock":{"sec":"12","sub_sec":null}}}

Live Notification

A live notify allows a service to be invoked when a practice drill or game is started. This eliminates the need to poll the search resource for new live events. When a notify url is registered the service will be called with the following query parameters:

PUT https://{url}?notify_id={registered notify id}&action=LIVE&data={live id}&state=[START|END]

The notification state indicates either the START or END of a practice drill or game half, quarter, etc… When a notification is created end notifications are disabled by default. Use the enable or disable endpoints to toggle notifications for the end notification state.

List LIVE Notifies

List LIVE Notifies
GET/v1/data/live/notify

Example URI

GET /v1/data/live/notify
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "notifications": [
    {
      "id": "abc-123",
      "action": "LIVE",
      "url": "http://localhost",
      "end_notification": false
    }
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Create LIVE Notify

Create LIVE Notify
PUT/v1/data/live/notify{?url}

Example URI

PUT /v1/data/live/notify?url=
URI Parameters
HideShow
url
string (required) 

Consumer provided url that will be called with the notification

Response  204
HideShow
Headers
X-ShotTracker-Notify-Id: <Live notify_id>
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Update LIVE Notify URL

Update LIVE Notify URL
PUT/v1/data/live/notify/{notify_id}{?url}

Example URI

PUT /v1/data/live/notify/notify_id?url=
URI Parameters
HideShow
notify_id
string (required) 

Specific id for the notify to update

url
string (required) 

New consumer provided url that will be called with the notification

Response  204
Response  422
HideShow
Body
{
  "status": 422,
  "message": "Notify id not found",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Enable LIVE End Notify

Enable LIVE End Notify
PUT/v1/data/live/notify/{notify_id}/_enableEndNotify

Example URI

PUT /v1/data/live/notify/notify_id/_enableEndNotify
URI Parameters
HideShow
notify_id
string (required) 

Specific id for the notify to update

Response  204
Response  422
HideShow
Body
{
  "status": 422,
  "message": "Notify id not found",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Disable LIVE End Notify

Disable LIVE End Notify
PUT/v1/data/live/notify/{notify_id}/_disableEndNotify

Example URI

PUT /v1/data/live/notify/notify_id/_disableEndNotify
URI Parameters
HideShow
notify_id
string (required) 

Specific id for the notify to update

Response  204
Response  422
HideShow
Body
{
  "status": 422,
  "message": "Notify id not found",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Delete LIVE Notify

Delete LIVE Notify
DELETE/v1/data/live/notify/{notify_id}

Example URI

DELETE /v1/data/live/notify/notify_id
URI Parameters
HideShow
notify_id
string (required) 

Specific id for the notify to update

Response  204
Response  422
HideShow
Body
{
  "status": 422,
  "message": "Notify id not found",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Schedule

Game Schedule Matchup

Game Schedule Matchup
GET/v1/data/schedule/games/matchup{?from,to,team_id,reference,gender}

The matchup endpoint is a more advanced way to find games using either the ShotTracker team ids, the Genius team ids or the NCAA team codes. The endpoint requires the reference and gender query parameters are given for context.

Example URI

GET /v1/data/schedule/games/matchup?from=&to=&team_id=&reference=&gender=
URI Parameters
HideShow
from
number (required) 

starting event scheduled timestamp; epoch UTC milliseconds

to
number (optional) 

ending event schedule timestamp; epoch UTC milliseconds

team_id
number (required) 

ID of the team; more than one team query parameter is supported to indicate both teams in the game

reference
string (required) 

indicates the type of team id passed in the team query parameter; values are SHOTTRACKER, GENIUS or NCAA

gender
string (required) 

the gender of the teams indicated in the team query parameter; values are MEN or WOMEN

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "games": [
    {
      "event_id": "062a3726-3b0f-11eb-86c4-02420043683b",
      "facility_name": "ShotTracker Lab",
      "court_name": "main court",
      "location_id": "/6e4118d4-2e50-11e6-b4a4-deecc6e6f586/6e4118d4-2e50-11e6-b4a4-deecc6e6f581",
      "tournament": null,
      "tipoff_at": 1604052000000,
      "gender": "MEN",
      "status": "ACTIVE",
      "home_team_id": 481,
      "home_team_name": "ShotTrackerW",
      "away_team_id": 493,
      "away_team_name": "BWB",
      "_results": "https://api.shottracker.com/v1/data/games/cf3ba789-06c4-11e8-bb65-0242286dfad2"
    }
  ]
}

Game Schedule

Game Schedule
GET/v1/data/schedule/games{?from,to,team_id}

Example URI

GET /v1/data/schedule/games?from=&to=&team_id=
URI Parameters
HideShow
from
number (required) 

starting event scheduled timestamp; epoch UTC milliseconds

to
number (optional) 

ending event schedule timestamp; epoch UTC milliseconds

team_id
number (optional) 

ID of the team

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "games": [
    {
      "event_id": "062a3726-3b0f-11eb-86c4-02420043683b",
      "facility_name": "ShotTracker Lab",
      "court_name": "main court",
      "location_id": "6e4118d4-2e50-11e6-b4a4-deecc6e6f586@6e4118d4-2e50-11e6-b4a4-deecc6e6f581",
      "tournament": null,
      "tipoff_at": 1604052000000,
      "gender": "MEN",
      "status": "ACTIVE",
      "home_team_id": 481,
      "home_team_name": "ShotTrackerW",
      "away_team_id": 493,
      "away_team_name": "BWB",
      "_results": "https://api.shottracker.com/v1/data/games/cf3ba789-06c4-11e8-bb65-0242286dfad2"
    }
  ]
}

Scheduled Game Subscription Token

Scheduled Game Subscription Token
GET/v1/data/schedule/games/{event_id}/_subscribe{?dt}

When a game is not yet live, it might be necessary to subscribe to the game. This endpoint allows a consumer to subscribe to a scheduled or an already active game with only the games event_id returned from the game scheduler. The example response below reflects subscribing to a scheduled, non-active game. If the game is active the response is identical to the live game subscription.

Example URI

GET /v1/data/schedule/games/event_id/_subscribe?dt=
URI Parameters
HideShow
event_id
string (required) 

ID of the event

dt
string (optional) 

Subscribe to a specific data type. More than one data type can be passed using the &dt= notation. Possible values for this field are STATS, SHOTS, or LOCATIONS.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "token": "6141681d-df46-11e6-a818-f20e96351dc1",
  "token_data_types": [
    "STATS",
    "SHOTS",
    "LOCATIONS"
  ],
  "active_state": null,
  "active_type": null,
  "active_team_colors": null,
  "active_name": null,
  "teams": [
    {
      "id": 461,
      "name": "TeamAppTeam",
      "logo_image_link": "<image link>",
      "gender": "MEN",
      "conference_name": "ACC",
      "players": [
        {
          "id": 123,
          "first_name": "John",
          "last_name": "Doe",
          "display_name": "John Doe",
          "jersey_number": 1,
          "position": "center",
          "profile_image_link": "<image link>",
          "is_active": true
        }
      ]
    }
  ],
  "_stats": null,
  "_stats_details": null,
  "_shots": null,
  "_possession": null,
  "_possession_summary": null,
  "event_totals": {
    "team_scores": []
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 400,
  "message": "The game is no longer active",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to LOCATIONS|STATS|SHOTS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Invalid id",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Locations

List Locations

List Locations
GET/v1/data/locations

Example URI

GET /v1/data/locations
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "locations": [
    {
      "facility_name": "Test Facility",
      "court_name": "Test Facility Main Court",
      "location_id": "114118d4-2e50-11e6-b4a4-deecc6e6f111@9e4118d4-2e50-11e6-b4a4-deecc6e6f112"
    }
  ]
}

Location Court Layout

Location Court Layout
GET/v1/data/locations/{location_id}/courtlayout

Example URI

GET /v1/data/locations/location_id/courtlayout
URI Parameters
HideShow
location_id
string (required) 

ID of the live session

Response  200
HideShow
Headers
Content-Type: application/json
Body
{"xne":0,"yne":0,"xse":2,"yse":2,"xsw":4,"ysw":4,"xnw":6,"ynw":6,"hoops":[{"name":"North hoop",x":0,"y":0,"z":13},{"name":"South Hoop",x":10,"y":10,"z":23}]}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "Error obtaining court info",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

List Nearest Locations

List Nearest Locations
GET/v1/data/locations/nearest/latlong/{latitude}/{longitude}{?radius,unit}

Example URI

GET /v1/data/locations/nearest/latlong/latitude/longitude?radius=&unit=
URI Parameters
HideShow
latitude
number (required) 

Callers current latitude

longitude
number (required) 

Callers current longitude

radius
number (required) 

The radius to include facilities

unit
string (required) 

The unit of measure; either MILES or KILOMETERS

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "locations": [
    {
      "facility_name": "Joes Gym",
      "court_name": "main court",
      "location_id": "114118d4-2e50-11e6-b4a4-deecc6e6f112@9e4118d4-2e50-11e6-b4a4-deecc6e6f122",
      "distance": {
        "unit": "MILES",
        "value": 11.76
      }
    }
  ]
}

Users

All user services require a user access token. This token is obtained using an oAuth2 Implicit Flow.

User Profile

User Profile
GET/v1/data/user/profile

Example URI

GET /v1/data/user/profile
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 123,
  "first_name": "User First Name",
  "last_name": "User Last Name",
  "email": "user@shottracker.com"
}

Teams

List Teams

List Teams
GET/v1/data/teams

Example URI

GET /v1/data/teams
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "teams": [
    {
      "id": 46,
      "name": "Test Team",
      "gender": "MEN",
      "conference_name": "ACC"
    }
  ]
}

Team Attributes

Team Attributes
GET/v1/data/teams/{team_id}{?game_event_id}

The current active players on the team. The game_event_id parameter can be used to look up all of the players on the team at the time of a game. Players who are no longer on the team will have an ‘is_active’ false.

Example URI

GET /v1/data/teams/team_id?game_event_id=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

game_event_id
string (optional) 

ID of the game

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 46,
  "name": "Test Team",
  "gender": "MEN",
  "conference_name": "ACC",
  "logo_image_link": "...",
  "players": [
    {
      "id": 1,
      "first_name": "john",
      "last_name": "doe",
      "jersey_number": 1,
      "position": "center",
      "profile_image_link": "...",
      "display_name": "john doe",
      "is_active": true
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "Restricted resource",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Game not found | Team not found in game",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Search Team Events

Search Team Events
GET/v1/data/teams/{team_id}/events{?from,to,gamesonly}

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.

Example URI

GET /v1/data/teams/team_id/events?from=&to=&gamesonly=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

from
number (required) 

The starting epoch timestamp (in milliseconds)

to
number (required) 

The ending epoch timestamp (in milliseconds)

gamesonly
boolean (optional) 

If the field is present on the request only games will be returned

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "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",
          "_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",
          "_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"
      }
    }
  ]
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Game Event

Game Event
GET/v1/data/teams/{team_id}/games/{event_id}

A self reference to a specific teams game event.

Example URI

GET /v1/data/teams/team_id/games/event_id
URI Parameters
HideShow
team_id
number (required) 

ID of the team

event_id
string (required) 

The specific event id for the game

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "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",
      "_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",
      "_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"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "game event not found",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Practice Event

Practice Event
GET/v1/data/teams/{team_id}/practices/{event_id}

A self reference to a specific teams practice event.

Example URI

GET /v1/data/teams/team_id/practices/event_id
URI Parameters
HideShow
team_id
number (required) 

ID of the team

event_id
string (required) 

The specific event id for the practice

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "cf3ba789-06c4-11e8-bb65-0242286dfad2",
  "name": "Team Practice",
  "results": [
    {
      "id": "cf56d0aa-06c4-11e8-bb65-0242286dfad2",
      "name": "Scrimmage Drill 1",
      "type": "SCRIMMAGE",
      "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",
      "_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": "Scrimmage Drill 2",
      "type": "SCRIMMAGE",
      "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",
      "_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": true,
  "is_game_event": false,
  "started_at": 1517430299810,
  "ended_at": 1517431732978,
  "_self": "https://api.shottracker.com/v1/data/teams/12345/practices/cf3ba789-06c4-11e8-bb65-0242286dfad2"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "practice event not found",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Team Practice Stats

Team Practice Stats
GET/v1/data/teams/{team_id}/players/practice/stats{?from,to}

A practice can consist of a team practice with shooting and scrimmage drills or a players individual workout. This endpoint will return team players stats that include both team practice drills (shooting and scrimmage) and workouts.

Example URI

GET /v1/data/teams/team_id/players/practice/stats?from=&to=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

from
number (required) 

The starting epoch timestamp (in milliseconds)

to
number (required) 

The ending epoch timestamp (in milliseconds)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 461,
  "name": "team name",
  "player_stats": [
    {
      "id": 123,
      "player_details": {
        "id": 123,
        "firstname": "John",
        "lastname": "Doe",
        "profile_image_link": "<image link>"
      },
      "version": 1,
      "stats": {
        "FG": 1,
        "FGA": 2,
        "PTS": 2
      }
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to STATS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Team Practice Scrimmage Stats

Team Practice Scrimmage Stats
GET/v1/data/teams/{team_id}/players/practice/scrimmage/stats{?from,to}

Example URI

GET /v1/data/teams/team_id/players/practice/scrimmage/stats?from=&to=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

from
number (required) 

The starting epoch timestamp (in milliseconds)

to
number (required) 

The ending epoch timestamp (in milliseconds)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 461,
  "name": "team name",
  "player_stats": [
    {
      "id": 123,
      "player_details": {
        "id": 123,
        "firstname": "John",
        "lastname": "Doe",
        "profile_image_link": "<image link>"
      },
      "version": 1,
      "stats": {
        "FG": 1,
        "FGA": 2,
        "PTS": 2
      }
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to STATS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Team Practice Shooting Drill Stats

Team Practice Shooting Drill Stats
GET/v1/data/teams/{team_id}/players/practice/shooting/stats{?from,to}

Example URI

GET /v1/data/teams/team_id/players/practice/shooting/stats?from=&to=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

from
number (required) 

The starting epoch timestamp (in milliseconds)

to
number (required) 

The ending epoch timestamp (in milliseconds)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 461,
  "name": "team name",
  "player_stats": [
    {
      "id": 123,
      "player_details": {
        "id": 123,
        "firstname": "John",
        "lastname": "Doe",
        "profile_image_link": "<image link>"
      },
      "version": 1,
      "stats": {
        "FG": 1,
        "FGA": 2,
        "PTS": 2
      }
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to STATS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Team Practice Shots

Team Practice Shots
GET/v1/data/teams/{team_id}/players/practice/shots{?from,to}

Example URI

GET /v1/data/teams/team_id/players/practice/shots?from=&to=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

from
number (required) 

The starting epoch timestamp (in milliseconds)

to
number (required) 

The ending epoch timestamp (in milliseconds)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 461,
  "name": "team name",
  "player_shots": [
    {
      "id": 123,
      "player_details": {
        "id": 123,
        "firstname": "John",
        "lastname": "Doe",
        "profile_image_link": "<image link>"
      },
      "shots": [
        {
          "occurred_at": 123456789,
          "is_make": true,
          "is_3point": true,
          "zone": 1,
          "advanced_zone": 2,
          "hoop_player_x": 12,
          "hoop_player_y": 3,
          "status": "RECORDED",
          "game_clock": "1:2.3",
          "shot_clock": "4.5",
          "period": "Q1",
          "label": "DUNK"
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to SHOTS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Team Practice Scrimmage Shots

Team Practice Scrimmage Shots
GET/v1/data/teams/{team_id}/players/practice/scrimmage/shots{?from,to}

Example URI

GET /v1/data/teams/team_id/players/practice/scrimmage/shots?from=&to=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

from
number (required) 

The starting epoch timestamp (in milliseconds)

to
number (required) 

The ending epoch timestamp (in milliseconds)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 461,
  "name": "team name",
  "player_shots": [
    {
      "id": 123,
      "player_details": {
        "id": 123,
        "firstname": "John",
        "lastname": "Doe",
        "profile_image_link": "<image link>"
      },
      "shots": [
        {
          "occurred_at": 123456789,
          "is_make": true,
          "is_3point": true,
          "zone": 1,
          "advanced_zone": 2,
          "hoop_player_x": 12,
          "hoop_player_y": 3,
          "status": "RECORDED",
          "game_clock": "1:2.3",
          "shot_clock": "4.5",
          "period": "Q1",
          "label": "DUNK"
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to SHOTS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Team Practice Shooting Drill Shots

Team Practice Shooting Drill Shots
GET/v1/data/teams/{team_id}/players/practice/shooting/shots{?from,to}

Example URI

GET /v1/data/teams/team_id/players/practice/shooting/shots?from=&to=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

from
number (required) 

The starting epoch timestamp (in milliseconds)

to
number (required) 

The ending epoch timestamp (in milliseconds)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 461,
  "name": "team name",
  "player_shots": [
    {
      "id": 123,
      "player_details": {
        "id": 123,
        "firstname": "John",
        "lastname": "Doe",
        "profile_image_link": "<image link>"
      },
      "shots": [
        {
          "occurred_at": 123456789,
          "is_make": true,
          "is_3point": true,
          "zone": 1,
          "advanced_zone": 2,
          "hoop_player_x": 12,
          "hoop_player_y": 3,
          "status": "RECORDED",
          "game_clock": "1:2.3",
          "shot_clock": "4.5",
          "period": "Q1",
          "label": "DUNK"
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to SHOTS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Team Game Stats

Team Game Stats
GET/v1/data/teams/{team_id}/players/game/stats{?from,to}

Example URI

GET /v1/data/teams/team_id/players/game/stats?from=&to=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

from
number (required) 

The starting epoch timestamp (in milliseconds)

to
number (required) 

The ending epoch timestamp (in milliseconds)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 461,
  "name": "team name",
  "player_stats": [
    {
      "id": 123,
      "player_details": {
        "id": 123,
        "firstname": "John",
        "lastname": "Doe",
        "profile_image_link": "<image link>"
      },
      "version": 1,
      "stats": {
        "FG": 1,
        "FGA": 2,
        "PTS": 2
      }
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to STATS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Team Game Shots

Team Game Shots
GET/v1/data/teams/{team_id}/players/game/shots{?from,to}

Example URI

GET /v1/data/teams/team_id/players/game/shots?from=&to=
URI Parameters
HideShow
team_id
number (required) 

ID of the team

from
number (required) 

The starting epoch timestamp (in milliseconds)

to
number (required) 

The ending epoch timestamp (in milliseconds)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 461,
  "name": "team name",
  "player_shots": [
    {
      "id": 123,
      "player_details": {
        "id": 123,
        "firstname": "John",
        "lastname": "Doe",
        "profile_image_link": "<image link>"
      },
      "shots": [
        {
          "occurred_at": 123456789,
          "is_make": true,
          "is_3point": true,
          "zone": 1,
          "advanced_zone": 2,
          "hoop_player_x": 12,
          "hoop_player_y": 3,
          "status": "RECORDED",
          "game_clock": "1:2.3",
          "shot_clock": "4.5",
          "period": "Q1",
          "label": "DUNK"
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to SHOTS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Games

Game Event

Game Event
GET/v1/data/games/{event_id}

A self reference to a specific game event.

Example URI

GET /v1/data/games/event_id
URI Parameters
HideShow
event_id
string (required) 

The specific event id for the game

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "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",
      "_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",
      "_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/games/cf3ba789-06c4-11e8-bb65-0242286dfad2",
  "totals": {
    "_stats_details": "https://api.shottracker.com/v1/data/stats/games/cf3ba789-06c4-11e8-bb65-0242286dfad2/stats/details"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "game event not found",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Player Lineups

Player Lineups
GET/v1/data/games/{event_id}/lineups{?at}

Returns players in lineups for a given game and at a specific timestamp.

Example URI

GET /v1/data/games/event_id/lineups?at=
URI Parameters
HideShow
event_id
string (required) 

ID of the game

at
number (required) 

The epoch timestamp (in milliseconds)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "player_ids": [
    "123",
    "456",
    "789"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 400,
  "message": "Parameter 'at' must be greater than 0 | Parameter 'at' is invalid",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "Restricted resource",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Game not found",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Sensor Assignments History

Sensor Assignments History
GET/v1/data/games/{event_id}/sensor/assignments/history

Returns the sensor assignment history during the certain game. The timestamp in the response indicates the sensor was assigned to the player_id at that time for the game. Multiple sensor assignments will be seen for the same player indicating the assignment at the start of each quarter or half and at time when the sensor was changed.

Example URI

GET /v1/data/games/event_id/sensor/assignments/history
URI Parameters
HideShow
event_id
string (required) 

ID of the game

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "sensor_assignments_history": [
    {
      "sensor_id": "456",
      "player_id": "123",
      "team_id": "461",
      "timestamp": 1620135099
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "Restricted resource",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Game not found",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Stats

Stats

Stats
GET/v1/data/stats/{id}/stats

Returns all team and player box score stats. Team stats are included under player_stats with an id of 0.

Example URI

GET /v1/data/stats/id/stats
URI Parameters
HideShow
id
string (required) 

ID of the session

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "teams": [
    {
      "id": 461,
      "name": "team name",
      "player_stats": [
        {
          "id": 123,
          "player_details": {
            "id": 123,
            "firstname": "John",
            "lastname": "Doe",
            "profile_image_link": "<image link>"
          },
          "version": 1,
          "stats": {
            "FG": 1,
            "FGA": 2,
            "PTS": 2
          }
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to STATS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Invalid id",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Stats Details

Stats Details
GET/v1/data/stats/{id}/stats/details

Returns all team and player stat details. Team stats are included under player_stats with an id of 0.

Example URI

GET /v1/data/stats/id/stats/details
URI Parameters
HideShow
id
string (required) 

ID of the session

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "teams": [
    {
      "id": 461,
      "name": "team name",
      "player_stats": [
        {
          "id": 123,
          "player_details": {
            "id": 123,
            "firstname": "John",
            "lastname": "Doe",
            "profile_image_link": "<image link>"
          },
          "stats": {
            "FGA": [
              {
                "occurred_at": 123456789,
                "value": 1,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              },
              {
                "occurred_at": 234567890,
                "value": 1,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              }
            ],
            "FG": [
              {
                "occurred_at": 123456789,
                "value": 1,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              }
            ],
            "PTS": [
              {
                "occurred_at": 123456789,
                "value": 2,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              }
            ]
          }
        },
        {
          "id": 0,
          "player_details": null,
          "stats": {
            "TO": [
              {
                "occurred_at": 123456789,
                "value": 1,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              }
            ]
          }
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to STATS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Invalid id",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Game Stats Details

Game Stats Details
GET/v1/data/stats/games/{event_id}/stats/details

Returns all team and player stat details for the whole game. Team stats are included under player_stats with an id of 0.

Example URI

GET /v1/data/stats/games/event_id/stats/details
URI Parameters
HideShow
event_id
string (required) 

ID of the game event

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "teams": [
    {
      "id": 461,
      "name": "team name",
      "player_stats": [
        {
          "id": 123,
          "player_details": {
            "id": 123,
            "firstname": "John",
            "lastname": "Doe",
            "profile_image_link": "<image link>"
          },
          "stats": {
            "FGA": [
              {
                "occurred_at": 123456789,
                "value": 1,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              },
              {
                "occurred_at": 234567890,
                "value": 1,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              }
            ],
            "FG": [
              {
                "occurred_at": 123456789,
                "value": 1,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              }
            ],
            "PTS": [
              {
                "occurred_at": 123456789,
                "value": 2,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              }
            ]
          }
        },
        {
          "id": 0,
          "player_details": null,
          "stats": {
            "TO": [
              {
                "occurred_at": 123456789,
                "value": 1,
                "game_clock": "1:2.3",
                "shot_clock": "4.5",
                "period": "Q1",
                "x": 30,
                "y": 20,
                "z": 10,
                "hoop_to_event_x": 50,
                "hoop_to_event_y": 60
              }
            ]
          }
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to STATS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Invalid id",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Shots

Shots
GET/v1/data/stats/{id}/shots

Example URI

GET /v1/data/stats/id/shots
URI Parameters
HideShow
id
string (required) 

ID of the session

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "teams": [
    {
      "id": 461,
      "name": "team name",
      "player_shots": [
        {
          "id": 123,
          "player_details": {
            "id": 123,
            "firstname": "John",
            "lastname": "Doe",
            "profile_image_link": "<image link>"
          },
          "shots": [
            {
              "occurred_at": 123456789,
              "is_make": true,
              "is_3point": true,
              "zone": 1,
              "advanced_zone": 2,
              "hoop_player_x": 12,
              "hoop_player_y": 3,
              "status": "RECORDED",
              "game_clock": "1:2.3",
              "shot_clock": "4.5",
              "period": "Q1",
              "label": "DUNK"
            }
          ]
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to SHOTS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Invalid id",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Stats Possessions

Stats Possessions
GET/v1/data/stats/{id}/possessions

Example URI

GET /v1/data/stats/id/possessions
URI Parameters
HideShow
id
string (required) 

ID of the session

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "teams": [
    {
      "id": 515,
      "name": "STQA",
      "team_player_details": [
        {
          "id": 3403,
          "first_name": "John",
          "last_name": "Doe",
          "profile_image_link": ""
        },
        {
          "id": 3932,
          "first_name": "Jim",
          "last_name": "Doe",
          "profile_image_link": ""
        }
      ],
      "possessions": [
        {
          "_locations": "https://api.shottracker.com/v1/data/sensors/locations?id=abc-123&from=1580408461984&to=1580408463984",
          "start_timestamp": 1580408461984,
          "end_timestamp": 1580408463984,
          "start_game_clock": "12:30.0",
          "end_game_clock": "12:25.0",
          "period": "Q1",
          "player_ids": [
            3065,
            3403,
            3531,
            3532,
            3932
          ],
          "opposing_player_ids": [
            6833,
            6835,
            6836,
            6837,
            6838
          ],
          "stats": [
            {
              "timestamp": 1580408461984,
              "possession_type": "DEFENSIVE_REB",
              "details": [
                "DEFENSIVE_REB",
                "REB"
              ],
              "player_id": 3403
            },
            {
              "timestamp": 1580408463984,
              "game_clock": "12:30.0",
              "shot_clock": "10.0",
              "possession_type": "FGA",
              "details": [
                "FGA",
                "FGA3",
                "FGA_OTD",
                "FGA3_OTD"
              ],
              "player_id": 3932,
              "shot_attributes": {
                "shot_distance_cm": 755.0178607158906,
                "x": 4096,
                "y": 5320,
                "z": -1,
                "zone": 12,
                "advanced_zone": 18,
                "is_3point": true
              }
            }
          ],
          "possession_attributes": {
            "turnover": 0,
            "passes": 1,
            "half_court": false,
            "paint_touch": true,
            "ball_reversals": 1,
            "ball_screens": 1,
            "ball_screens_left_wing": 1,
            "ball_screens_middle_wing": 0,
            "ball_screens_right_wing": 0,
            "ball_screens_pick_n_pop": 1,
            "ball_screens_pick_n_roll": 0,
            "ball_screens_pick_n_short_roll": 0,
            "ball_screens_screened_shot": 0,
            "ball_screens_handoff": 0,
            "ball_screens_drag": 0,
            "ball_screens_pop": 0,
            "ball_screens_roll": 0,
            "ball_screens_slip": 0,
            "ball_screens_short_roll": 0,
            "ball_screens_reject": 0,
            "ball_screens_re_screen": 0,
            "ball_screens_stay": 0,
            "ball_screens_step_up": 0,
            "ball_screens_snake": 0,
            "ball_screens_split": 0,
            "ball_screens_other": 0
          }
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to STATS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Invalid id",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Stats Possessions Summary

Stats Possessions Summary
GET/v1/data/stats/{id}/possessions/summary

Example URI

GET /v1/data/stats/id/possessions/summary
URI Parameters
HideShow
id
string (required) 

ID of the session

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "teams": [
    {
      "id": 1,
      "name": "shottracker team",
      "possession_summary": [
        {
          "summary": [
            {
              "type": "OVERALL",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT0_BR0",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT1_BR0",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT0_BR1",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT0_BR2",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT1_BR1",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT1_BR2",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "TRANSITION",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PASS0_2",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PASS3_5",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PASS6",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS0",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS_ALL",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS1",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS2",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS3",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            }
          ]
        }
      ]
    },
    {
      "id": 2,
      "name": "shottracker team2",
      "possession_summary": [
        {
          "summary": [
            {
              "type": "OVERALL",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT0_BR0",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT1_BR0",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT0_BR1",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT0_BR2",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT1_BR1",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PT1_BR2",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "TRANSITION",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PASS0_2",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PASS3_5",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "PASS6",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS0",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS_ALL",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS1",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS2",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            },
            {
              "type": "BS3",
              "POSS": 0,
              "POSS_PCT": 0,
              "PTS": 0,
              "PPP": 0,
              "2PTM": 0,
              "2PTA": 0,
              "2PT_PCT": 0,
              "3PTM": 0,
              "3PTA": 0,
              "3PT_PCT": 0,
              "TO": 0,
              "TO_PCT": 0
            }
          ]
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 403,
  "message": "No access to STATS data",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 404,
  "message": "Invalid id",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": 500,
  "message": "<General System Error Message>",
  "shottrackerRequestId": "f1e80480-e1d5-4684-a619-402984b5c9ba"
}

Sensors Locations

Sensor Locations

Sensor Locations
GET/v1/data/sensors/locations{?id,from,to}

Returns an array of player and ball locations.

Example URI

GET /v1/data/sensors/locations?id=&from=&to=
URI Parameters
HideShow
id
string (required) 

Id of the session

from
number (required) 

the starting timestamp

to
number (required) 

the ending timestamp

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "locations": [
      {
        "x": 5785,
        "t": 163475794089,
        "z": 45,
        "type": "PLAYER",
        "sid": "649778d4-31db-11ec-942c-0242615ec82f",
        "y": 7930,
        "tag": "65575",
        "tid": 515,
        "speed": 0.238894,
        "pid": 6844
      }
    ]
  },
  {
    "locations": [
      {
        "x": 5785,
        "t": 163475794589,
        "z": 45,
        "type": "PLAYER",
        "sid": "649778d4-31db-11ec-942c-0242615ec82f",
        "y": 8000,
        "tag": "65575",
        "tid": 515,
        "speed": 0.238894,
        "pid": 6844
      }
    ]
  }
]