Export all workouts

Download every completed workout of your organization with sets and repetitions, within the rate limit.

This walkthrough downloads every completed workout, athlete by athlete, including each set and repetition. It uses three ideas from the concepts section: pagination, ids and rate limits.

The plan

  1. Load the catalogs you will need to turn ids into names (/exercises, /metrics, /units).
  2. List athletes with GET /athletes.
  3. For each athlete, list completed workouts with GET /workouts?userId=…&limit=100. The list has no content.
  4. Fetch each workout with GET /workouts/{id} to get its tree.

The list is cheap and the detail is the expensive call, so fetch details only for workouts you do not already have.

Count your requests

Each workout detail is one request. With 30 requests per minute, 3,000 workouts take at least 100 minutes. Budget for it:

WorkoutsDetail requestsMinimum time
1,0001,000about 34 minutes
10,00010,000about 5 hours 40 minutes

If you only need a metric's evolution and not the set structure, Analytics aggregates it per athlete in one request.

Narrow the export

  • Filter by time: from and to filter completed workouts by completedAt.
  • Filter by kind: trainingType=vbt|jump|sprint|reaction.
  • Filter by exercise: exerciseId.
  • Include pending workouts (assigned, not yet performed) with status=pending.

Handle failures

A long export will meet a 429 or a transient 5xx. Wrap every call with the retry logic from Error codes, and make the job resumable: store the ids you already saved.

On this page