Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Blackterz2/Proyecto_5to_Semestre/llms.txt

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

The Exercises API exposes the entire Blackterz exercise catalog in a single authenticated request. Each exercise object includes its name, category, static image, optional animated GIF URL, and a comma-separated string of associated muscle group names resolved via a SQL GROUP_CONCAT join. The catalog covers barbell, dumbbell, bodyweight, machine, and cable movements.

GET /api/ejercicios

Returns all exercises in the catalog, ordered alphabetically by name. Muscle groups are resolved by a SQL LEFT JOIN against the ejercicios_grupos_musculares and grupos_musculares tables, collapsed into a single musculos string per row using GROUP_CONCAT. Auth required: Yes — Authorization: Bearer <token>

Request

No query parameters or request body. Authentication is handled entirely by the Authorization header.
curl -X GET https://api.blackterzgym.com/api/ejercicios \
  -H "Authorization: Bearer <your_token>"

Response

status
string
required
Always "ok" on success.
data
array
required
Array of exercise objects. Ordered alphabetically by nombre.

Sample response

{
  "status": "ok",
  "data": [
    {
      "id": 32,
      "nombre": "Abdominales",
      "descripcion": "Ejercicio de peso corporal para Core.",
      "categoria": "fuerza",
      "imagen_url": "crunches.avif",
      "gif_url": null,
      "musculos": "Core"
    },
    {
      "id": 33,
      "nombre": "Abdominales sentado",
      "descripcion": "Ejercicio de peso corporal para Core.",
      "categoria": "fuerza",
      "imagen_url": "sit-ups.avif",
      "gif_url": null,
      "musculos": "Core, Flexores Cadera"
    },
    {
      "id": 61,
      "nombre": "Aductores en máquina",
      "descripcion": "Ejercicio de máquina para Aductores.",
      "categoria": "fuerza",
      "imagen_url": "hip-adduction.avif",
      "gif_url": null,
      "musculos": "Aductores"
    }
  ]
}

Error responses

Returned when the database query fails.
{
  "status": "error",
  "message": "Error interno del servidor"
}
Returned when no token is provided or the token is invalid/expired. Handled by the verificarToken middleware before reaching this controller.
{
  "status": "error",
  "message": "Token no válido o expirado"
}

Full curl example

curl -X GET https://api.blackterzgym.com/api/ejercicios \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Build docs developers (and LLMs) love