Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Luisanchez0/modulo_Horario/llms.txt

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

The aulas service maintains the inventory of classrooms available for scheduling. It validates admin credentials by forwarding the Authorization header to the usuarios service (GET /auth/me) before allowing write operations. Read endpoints are open to any caller. Base URL: http://localhost:8003

GET /aulas

Returns all classrooms. No authentication required.

Response

An array of classroom objects.
id
integer
Auto-assigned primary key.
nombre
string
Classroom identifier, e.g. "Aula 201" or "Laboratorio A".
capacidad
integer
Maximum seating capacity.
curl -s http://localhost:8003/aulas

GET /aulas/

Returns a single classroom by ID. No authentication required.

Path parameters

aula_id
integer
required
ID of the classroom to retrieve.

Response

A single classroom object.
curl -s http://localhost:8003/aulas/1

POST /aulas

Creates a new classroom. Requires ADMIN role.

Headers

Authorization
string
required
Bearer <token> — must decode to rol: ADMIN.

Request body

nombre
string
required
Classroom name or identifier.
capacidad
integer
required
Seating capacity.

Response

Returns the created classroom object.
id
integer
Auto-assigned primary key.
nombre
string
Classroom name.
capacidad
integer
Seating capacity.
curl -s -X POST http://localhost:8003/aulas \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJ..." \
  -d '{
    "nombre": "Aula 305",
    "capacidad": 35
  }'

PUT /aulas/

Replaces a classroom’s name and capacity. Both fields are required. Requires ADMIN role.

Path parameters

aula_id
integer
required
ID of the classroom to update.

Headers

Authorization
string
required
Bearer <token> — must decode to rol: ADMIN.

Request body

nombre
string
required
New classroom name.
capacidad
integer
required
New seating capacity.

Response

{ "message": "Aula updated" }
curl -s -X PUT http://localhost:8003/aulas/3 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJ..." \
  -d '{
    "nombre": "Aula 305 Renovada",
    "capacidad": 40
  }'

DELETE /aulas/

Deletes a classroom from the inventory. Requires ADMIN role.

Path parameters

aula_id
integer
required
ID of the classroom to delete.

Headers

Authorization
string
required
Bearer <token> — must decode to rol: ADMIN.

Response

{ "message": "Aula deleted" }
curl -s -X DELETE http://localhost:8003/aulas/3 \
  -H "Authorization: Bearer eyJ..."

Health check

GET /health
endpoint
Returns { "status": "ok", "service": "aulas-service" }. No authentication required. Useful for liveness probes.
curl -s http://localhost:8003/health
Deleting a classroom that is referenced by existing horario records may leave orphaned foreign keys in the horarios service. Remove or reassign those schedule entries before deleting the classroom.

Build docs developers (and LLMs) love