Select Page

CC Athletics API Documentation

Back to the blog

This documentation describes how to fetch your data from CC Athletics database through REST API endpoints.

In short, the steps are:
1. Get an API key from your Cloud dashboard – and insert it in the header when using the following endpoints:
2. Use getTeams endpoint (see below) to retrieve a list of all teams
3. Use getAthletes endpoint (see below) to retrieve a list of all athletes

Authentication

API Key

  • Each API request requires a valid API key
  • Include the API key in the X-API-Key header
  • API keys can be generated and managed in your ForceMate Cloud dashboard Account -> API Keys

Example Authentication

curl https://europe-west1-forcemate-desktop.cloudfunctions.net/get_athletes \
-H "X-API-Key: fm_your_api_key_here"

Endpoints

Get Teams

  • Endpoint: GET https://europe-west1-forcemate-desktop.cloudfunctions.net/get_teams
  • Description: Retrieve all teams for your organization
  • Response Format:
{
  "teams": [
    {
      "id": "team_123",
      "name": "Team Alpha",
      "creation_date": 1623456789
    }
  ]
}

Get Athletes

  • Endpoint: GET https://europe-west1-forcemate-desktop.cloudfunctions.net/get_athletes
  • Description: Retrieve athletes including all recordings (optionally filtered by team)
  • Query Parameters:
    • team_id (optional): Filter athletes by specific team
    • min_birth_year (integer, optional)
      • Filter athletes born on or after this year
      • Example: min_birth_year=1990
    • max_birth_year (integer, optional)
      • Filter athletes born on or before this year
      • Example: max_birth_year=2005
    • tests_date_from (string, optional)
      • Filter tests recorded on or after this date
      • Format: YYYY-MM-DD
      • Example: tests_date_from=2024-01-01
    • tests_date_to (string, optional)
      • Filter tests recorded on or before this date
      • Format: YYYY-MM-DD
      • Example: tests_date_to=2024-12-31
    • analysis_type (string, optional)
      • Filter by type of analysis
      • Valid values: “jump”, “isometric”
      • Example: analysis_type=jump
    • isometric_exercise_names (string, optional)
      • Comma-separated list of isometric exercise names to include
      • Only applies when analysis_type is “isometric”
      • Example: isometric_exercise_names=Mid-thigh pull,Squat
  • Response Format:
{
  "athletes": [
    {
      "id": "athlete_456",
      "name": "John Doe",
      "team_id": "team_123",
      "player_info": {},
      "recordings": []
    }
  ],
  "total": 1
}

Get raw .csv from specific jump or isometric trial

  • Endpoint: GET https://europe-west1-forcemate-desktop.cloudfunctions.net/get_csv_download_url
  • Description: Retrieve a download link for a .csv file of a raw jump recording (raw Newton values in 1/2 columns, depending on number of plates used)
  • Query Parameters:
    • path (required): Path where the .csv file is stored in our database. Get this url path from a jump result or isometric trial, and use the value in the key “path_to_this_jump_raw_csv” or “path_to_raw_csv”
    • downsample_factor (optional). An integer above 1. This downsamples the data by the factor. So if raw data is 960 Hz. A decimation factor of 20 will give 48 Hz. A Savitzky-Golay filter is used followed to prevent aliasing and preserve signal time characteristics.
  • Response format
{
    "download_url": "https://storage.googleapis.com/forcemate-desktop.appspot.com/organisations/frC6h5a ....
}

Error Handling

  • 401 Unauthorized: Invalid or missing API key
  • 500 Internal Server Error: Unexpected server-side issue

Rate Limits

  • Rate limits apply to prevent abuse
  • Contact support for specific rate limit details

Support

Best Practices

  • Keep your API key confidential
  • Use HTTPS for all API requests
  • Implement proper error handling in your client