AthleteMonitoring system provides  a ReST API interface using which you can pull data from AthleteMonitoring to your application.


This document outlines the API architecture and schema.

There are three API endpoints currently available – 

A. Get Participation Log
B. Get Participation Log by Team
C. Get Participation Log by Athlete

The BASE_URL for all endpoints is 'https://app.athletemonitoring.com/export' or 'https://app.athletemonitoring.eu/export' or 'https://app.athletemonitoring.in/export', based on your AthleteMonitoring environment.

Get Participation Log 

Endpoint - [POST] BASE_URL/participationLog.php

The endpoint requires following parameters to be provided in the request body as part of x-www-form-urlencoded

api_key
from
to

Here, api_key is your unique AthleteMonitoring API Key, “from” is the start date range in YYYY-MM-DD format, “to” is end date range in YYYY-MM-DD format.

The endpoint returns a JSON object in response (sample JSON file at the end of this page). The response JSON contains the following keys.

response_code ( this will be 1 if the API request was successful, else 0 if some internal error took place)
response_message ( this will be give details of the response, this will be “success” in case response_code =1, where respnonse_code=0 this will provide details of the error.

data ( this will be an array containing the log object).


Each object of the data array will look like –

 {

            "color": "HIGH_RISK",  

            "player_id": "80",

            "athlete_id": "56478573673",

            "team_id": "14",

            "date": "2019-05-28",

            "return_to_partial_training": "2019-05-28",

            "return_to_full_training": "2019-05-28",

            "return_to_competition": "2019-05-28",

            "health_problem_resolved": null,

            "training_competition_status": "Full participation",

            "training_restrictions": ""

            }
 

The value of the “color” parameter will be one of these three –
HIGH_RISK
LOW_RISK
ELEVATED_RISK

 This represents the current classification of the injury.

The “player_id” parameter represents the internal AthleteMonitoring ID of the user.
The “athlete_id” parameter represents the custom ID which you have assigned to this user.

Get Participation Log by Team

Endpoint - [POST] BASE_URL/participationLog.php
 

This endpoint requires one additional parameter to be provided – “team_ids”. Which accepts comma separated team IDs for the teams for which you want the data.
The response is same as the Get Participation Log endpoint

Get Participation Log by Athlete

 

Endpoint - [POST] BASE_URL/participationLog.php

This endpoint requires two additional parameters to be provided – “team_ids”. Which accepts comma separated team IDs for the teams for which you want the data and “athlete_ids”. Which accepts the comma separated athlete_ids.

Using these parameters you can filter the result to specific teams and specific players within the team.

The response is same as the Get Participation Log endpoint

Below we have provided sample CuRL request for all three endpoints :

A. Get Participation Log 

curl --location --request POST 'BASE_URL/participationLog.php' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--data-urlencode 'api_key=ef82600a8221bcb9e44f98d4c242430e8ee86be659de8eea33f9872176a05b2d' \

--data-urlencode 'from=2023-01-12' \

--data-urlencode 'to=2023-01-12'

B. Get Participation Log by Team 

curl --location --request POST 'BASE_URL/participationLog.php' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--data-urlencode 'api_key=ef82600a8221bcb9e44f98d4c242430e8ee86be659de8eea33f9872176a05b2d' \

--data-urlencode 'from=2023-01-12' \

--data-urlencode 'to=2023-01-12' \

--data-urlencode 'team_ids=4667,14'

 

C. Get Participation Log by Team and Athlete 

curl --location --request POST 'BASE_URL/participationLog.php' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--data-urlencode 'api_key=ef82600a8221bcb9e44f98d4c242430e8ee86be659de8eea33f9872176a05b2d' \

--data-urlencode 'from=2023-01-11' \

--data-urlencode 'to=2023-01-11' \

--data-urlencode 'team_ids=14' \

--data-urlencode 'athlete_ids=25426

 

 

 

Getting your API_KEY : 

 

To find your API_KEY login into your AthleteMonitoring staff dashboard, from the top right menu option dropdown ( where your profile picture is displayed) select “Profile”.


 



Once the profile page opens up, click on the gear icon. Your API_KEY will be visible there.