These four endpoints form the manual CRUD surface for schedule entries. Each entry ties a teacher, subject, and classroom to a day and time slot within a given academic period. The service validates that all referenced IDs exist in their respective upstream services before writing to the database. Base URL: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.
http://localhost:8004
GET /horarios
Returns every schedule entry stored in the database, enriched with human-readable names fetched from the catalog services. No authentication is required.Response
Auto-assigned primary key.
Foreign key to the teacher record.
Foreign key to the subject record.
Foreign key to the classroom record.
Foreign key to the academic period.
Day of the week, normalised to upper-case Spanish:
LUNES, MARTES, MIERCOLES, JUEVES, VIERNES, SABADO.Start time in
HH:MM format.End time in
HH:MM format.Teacher’s display name (resolved from usuarios-service;
null if upstream is unavailable).Teacher’s email address.
Subject name.
Subject code.
Subject’s assigned shift.
Classroom name.
Classroom capacity.
POST /horarios
Creates a single schedule entry. RequiresADMIN role. The service validates that the referenced teacher, subject, and classroom IDs exist, that the period exists, and that the requested time slot is compatible with the teacher’s shift (turno).
Headers
Bearer <token> — must decode to rol: ADMIN.Request body
ID of an existing teacher in the usuarios service.
ID of an existing subject in the materias service.
ID of an existing classroom in the aulas service.
ID of an existing academic period.
Day of the week. Accepted values (case-insensitive):
LUNES, MARTES, MIERCOLES, JUEVES, VIERNES, SABADO.Start time in
HH:MM format (e.g. "08:00").End time in
HH:MM format. Must be after hora_inicio.Optional explicit primary key. If omitted, one is assigned automatically. Returns
409 if the ID already exists.Response
- 201 — created
- 400 — conflict or validation
- 403 — forbidden
- 409 — duplicate id
Returns the full
HorarioRead object including resolved catalog names.PUT /horarios/
Replaces an existing schedule entry in full. The body has the same shape asPOST /horarios. Requires ADMIN role.
Path parameters
ID of the entry to update.
Headers
Bearer <token> — must decode to rol: ADMIN.Request body
Same fields asPOST /horarios (all required except id, which is taken from the path).
Response
- 200 — updated
- 404 — not found
- 400 — conflict or validation
- 409 — integrity error
Returns the updated
HorarioRead object.DELETE /horarios/
Deletes a schedule entry. Returns204 No Content on success. Requires ADMIN role.
Path parameters
ID of the entry to delete.
Headers
Bearer <token> — must decode to rol: ADMIN.Response
- 204 — deleted
- 404 — not found
Empty response body.
All write endpoints return
502 Bad Gateway if the usuarios, materias, or aulas services are unreachable at the time of the request.