FITSTATS' import API automates the data upload process. While this process provides a extremely effective way to manage data, the initial setup has to be done by your IT specialist. Please contact us for further information.


Synopsis

To import assessment dates, run the following command:

curl https://app.fitstatswellness.com/import/assessments.php -F api_key=YOUR_API_KEY -F file=@YOUR_FILE


To import students/employees, run the following command:

curl https://https://app.fitstatswellness.com/import/athletes.php -F api_key=YOUR_API_KEY -F file=@YOUR_FILE


To import staff members, run the following command:

curl https://app.fitstatswellness.com/import/staff.php -F api_key=YOUR_API_KEY -F file=@YOUR_FILE


To import subgroups/classes, run the following command:

curl https://app.fitstatswellness.com/import/subgroups.php -F api_key=YOUR_API_KEY -F file=@YOUR_FILE


If you are using the following URL to login https://edu.fitstatswellness.com, please replace https://app.fitstatswellness.com/ by one of these in the commands above.


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 FITSTATS is able to provide should you encounter problems may be limited.
 

Finding your API Key

Log into FITSTATS 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.

blob1477664988293.png



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 FITSTATS support and ask them to check that the Import API is enabled for your account.


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 FITSTATS 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. The format of the date should be as described in the field header since we export in the format of the school/group setting. 


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


For athlete and staff users, FITSTATS matches records by athlete/staff id.