AthleteMonitoring Export API automates the data export process. While this process provides a extremely effective way to send data to an external database has to be done by your IT specialist. Please contact us to activate this optional feature.

Syntax

To export all your teams' wellness between 2 dates, run the following command:

curl https://app.athletemonitoring.com/export/wellnessLog.php -F api_key=YOUR_API_KEY -F from=YYYY-MM-DD -F to=YYYY-MM-DD -o wellness_log.csv 


To export wellness data for specific team(s) between 2 dates, run the following command:

curl https://app.athletemonitoring.com/export/wellnessLog.php -F api_key=YOUR_API_KEY -F from=YYYY-MM-DD -F to=YYYY-MM-DD -F team_ids=<team_id>,<team_id>,<team_id> -o wellness_log.csv


To export wellness data for specific athlete(s) between 2 dates, run the following command:

curl https://app.athletemonitoring.com/export/wellnessLog.php -F api_key=YOUR_API_KEY -F from=YYYY-MM-DD -F to=YYYY-MM-DD -F team_ids=<team_id> -F athlete_ids=<athlete_id>,<athlete_id> -o wellness_log.csv 


If you use app.athletemonitoring.eu or app.athletemonitoring.in, when you login into AthleteMonitoring, change app.athletemonitoring.com by the appropriate address.


Curl

Curl is an open-source tool and library used for transferring data. Curl can be downloaded from https://curl.haxx.se/. Additionally you will probably want to add curl to your PATH environment variable.


Alternatively on Linux you should be able to install curl via your package manager (yum, apt-get, etc). You may use a tool other than Curl to upload your data to the AthleteMonitoring API. That is outside the scope of this document however. The support AthleteMonitoring  is able to provide should you encounter problems may be limited.

Finding your API Key

Log into AthleteMonitoring using the owner account.

Go to the owner’s profile (top right):

 

 

 

 

 

Click the gear icon:

 

 

Here you can see your API key as well as a template files for each of the imports.


If you do not see this icon please confirm that you are logged in as the account owner. If you still do not see the option please contact our support team and ask them to check that the Export API is enabled for your account.


Finding <team_id>

To find the team_id value, open Team settings and look at your browser's address bar : the number after '?id=' is the team id.

Exemple:  team_ids=14,34,454 -o wellness_log.csv


Finding <athlete_id>

To find the athlete_id value, open the athlete profile and look at your browser's address bar : the number after '?id=' is the athlete id.

Exemple:  athlete_ids=id=163,5696,3698 -o wellness_log.csv


File Formats

The page displaying your API Key (see the previous section) has templates for each of the imports. The import files you upload to AthleteMonitoring must match the format of the templates.


The file should be in .csv format. The first line of the file is treated as a header and will not be imported. All dates should be in YYYY-MM-DD format. The imports will end when the encounter a blank.


The same data can safely be imported multiple times. AthleteMonitoring  will attempt to match the data to existing records and update them instead of creating new ones where possible. 


For athlete and staff AthleteMonitoring  matches records by athlete id/staff id. For assessment dates and subgroups AthleteMonitoring matches by name.