KinesteX

Workout Sessions API

Every completed workout session is stored server-side, tied to the userId the SDK was initialized with (sessions are persisted when the workout is launched with shouldSendStats: true). Fetch the history to build progress screens, completed-workout lists, or analytics.


typescript
1GET https://data.kinestex.com/api/workout-sessions

Headers:


HeaderDescription
x-api-keyYour company API key (server-side only)
x-user-idThe user's id — always send it; it must match the SDK's userId

Query params (all optional): page (default 1), limit (default 20, max 50), sort (default started_at_desc).


Response (trimmed to the most useful fields):


json
1{
2  "sessions": [
3    {
4      "id": 4978,
5      "content_title": "Fitness Lite",
6      "content_image_url": "https://cdn.kinestex.com/uploads%2F...webp",
7      "content_difficulty": "Medium",
8      "calories_burned": 1.03,
9      "actual_duration_seconds": 12,
10      "completion_percentage": 0.67,
11      "total_exercises": 10
12    }
13  ],
14  "pagination": { "page": 1, "limit": 20, "total": 1, "total_pages": 1, "has_more": false }
15}

Each session also carries planned_exercises[] (with per-exercise thumbnails and rep/time targets), accuracy_score, efficiency_score, total_mistakes, and timestamps.


Key rules:

  • The values are actuals: calories_burned is what the user really burned and actual_duration_seconds is real time spent (in seconds — format it; don't show "0 min" for short sessions).
  • completion_percentage (0–100, can be fractional like 0.67) is authoritative — never derive completion from exercise counts, since total_exercises includes untouched exercises.
  • Errors: 401 invalid x-api-key · 404 x-user-id not found for your company · 400 bad query param.

To open a full session summary in your app, pass the session id to the SDK's custom component view with route session/{id}. The complete card-building walkthrough (Swift + Kotlin) is in Displaying completed workouts.