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 exercise endpoints expose the GymFlow exercise catalogue and its related muscle data. All three endpoints require a valid JWT in the Authorization header — they follow the same authentication rules as the rest of the /api routes. They are typically called to populate selection lists before a user logs a workout. See Authentication for how to obtain a token.

List exercises

Returns all exercises, or a filtered subset by muscle group. GET /api/exercises
muscle_group_id
integer
When provided, only exercises belonging to the specified muscle group are returned. Omit to return all exercises.
Example — all exercises
curl https://api.gymflow.example/api/exercises
Example — filtered by muscle group
curl "https://api.gymflow.example/api/exercises?muscle_group_id=3"
Example response — 200 OK
[
  {
    "id": 1,
    "name": "Bench Press",
    "image": "bench_press.png",
    "muscle_group_id": 3
  },
  {
    "id": 2,
    "name": "Incline Dumbbell Press",
    "image": "incline_db_press.png",
    "muscle_group_id": 3
  }
]
id
integer
Unique identifier for the exercise. Use this value as exercise_id when creating a workout.
name
string
Display name of the exercise. This string must be used verbatim when querying the progress endpoint.
image
string
Filename or path to the exercise illustration. May be null if no image is available.
muscle_group_id
integer
The ID of the muscle group this exercise belongs to. Matches the id field returned by /api/muscle_groups.
Error responses
StatusMeaning
404No exercises exist (empty catalogue) or no exercises match the given muscle_group_id.

List exercise–muscle mappings

Returns the join table between exercises and individual muscles, including the role each muscle plays (primary mover, secondary, etc.). GET /api/exercises_muscles Example request
curl https://api.gymflow.example/api/exercises_muscles
Example response — 200 OK
[
  {
    "id": 1,
    "role": "primary",
    "muscle_id": 5,
    "exercise_id": 1
  },
  {
    "id": 2,
    "role": "secondary",
    "muscle_id": 7,
    "exercise_id": 1
  }
]
id
integer
Unique identifier for this mapping record.
role
string
The muscle’s role in the exercise (for example "primary" or "secondary").
muscle_id
integer
ID of the muscle involved.
exercise_id
integer
ID of the exercise this mapping belongs to.
Error responses
StatusMeaning
404No mappings found in the database.

List muscle groups

Returns all muscle groups available in the catalogue. GET /api/muscle_groups Example request
curl https://api.gymflow.example/api/muscle_groups
Example response — 200 OK
[
  {
    "id": 1,
    "name": "Back",
    "image": "back.png"
  },
  {
    "id": 2,
    "name": "Legs",
    "image": "legs.png"
  },
  {
    "id": 3,
    "name": "Chest",
    "image": "chest.png"
  }
]
id
integer
Unique identifier for the muscle group. Pass this as muscle_group_id to filter exercises.
name
string
Display name of the muscle group.
image
string
Filename or path to the muscle group illustration. May be null.

Build docs developers (and LLMs) love