Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Lokhy87/gymApp/llms.txt

Use this file to discover all available pages before exploring further.

The history endpoint returns every workout entry recorded by the authenticated user, with no pagination. Each object includes the exercise name as a denormalised string so no secondary request is needed to display a complete log. This endpoint requires a valid JWT. See Authentication for how to obtain a token.

Get workout history

GET /api/history This endpoint accepts no query parameters. All entries for the authenticated user are returned in the order they are stored in the database. Example request
curl https://api.gymflow.example/api/history \
  -H "Authorization: Bearer <your_token>"
Example response — 200 OK
[
  {
    "id": 301,
    "sets": 4,
    "reps": 8,
    "weight": 80.0,
    "comments": "Felt strong today",
    "date": "2024-05-15 09:32:00",
    "exercise_name": "Bench Press"
  },
  {
    "id": 302,
    "sets": 3,
    "reps": 12,
    "weight": 0.0,
    "comments": null,
    "date": "2024-05-15 09:45:00",
    "exercise_name": "Pull Up"
  }
]
An empty array [] is returned when the user has no logged workouts.
id
integer
Unique identifier for the workout entry. Use this with PUT /api/workouts/{id} or DELETE /api/workouts/{id} to modify the record.
sets
integer
Number of sets performed.
reps
integer
Number of repetitions per set.
weight
float
Weight used. Returns 0 when no weight was recorded at logging time.
comments
string | null
Free-text notes attached to the entry. null when none were provided.
date
string
Server-side timestamp when the entry was created, formatted as Y-m-d H:i:s (e.g. "2024-05-15 09:32:00"). This date is always set by the server and cannot be overridden by the client.
exercise_name
string
Display name of the exercise performed. This is the same string that must be passed as the exercise parameter to GET /api/progress.
Error responses
StatusMeaning
401Missing or invalid Bearer token.

Build docs developers (and LLMs) love