Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Pierrot-01/Hackathon_epis_2026/llms.txt

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

The teacher endpoints manage the roster of educators registered in Vanguardia EPIS. Teacher records store contact information, subject assignment, and the grade level each teacher is responsible for. Unlike the student endpoints, teacher operations are synchronous (no AI involvement) and do not use the in-memory session cache — every request reads from and writes to data/docentes.json directly.

GET /api/docentes

Returns the complete list of registered teachers. If the docentes.json file does not exist when the server starts, it is automatically created as an empty array.

Response

Returns an array of DocenteResultado objects. See the DocenteResultado schema below. Returns an empty array [] if no teachers have been registered yet.

Example

curl http://localhost:8000/api/docentes
[
  {
    "id": "DOC-002",
    "nombre": "Carlos Ruíz",
    "email": "[email protected]",
    "asignacion": "Tutoría 3° Sec",
    "grado_clave": "3ro",
    "estado": "Activo"
  }
]

POST /api/docentes

Creates a new teacher record or updates an existing one. The result is immediately persisted to data/docentes.json. Create mode — omit the id field. The server scans existing teacher IDs, finds the highest DOC-NNN number, and assigns the next one. If no teachers exist yet, the first teacher receives DOC-001. Update mode — include the id field with an existing teacher ID. All fields are overwritten with the provided values. Returns 404 if the ID does not match any record.

Request Body

id
string
Optional. If provided, the endpoint operates in update mode and replaces the matching teacher record. Must be an existing DOC-NNN ID. If omitted, a new ID is auto-generated.
nombre
string
required
Full name of the teacher. Example: "Carlos Ruíz".
email
string
required
Institutional email address. Example: "[email protected]".
asignacion
string
required
Subject or role assignment for this teacher. Example: "Tutoría 3° Sec", "Matemáticas 1° Sec".
grado_clave
string
required
The grade level this teacher is assigned to, used to link teachers with their student cohort. Example: "3ro", "1ro", "5to".
estado
string
default:"Activo"
Employment status of the teacher. Defaults to "Activo". Other values can be set freely, e.g. "Inactivo", "Con licencia".

Response

Returns the full DocenteResultado object for the created or updated teacher.

Errors

StatusDetail
404"Docente no encontrado" — an id was provided in update mode but no matching record exists in the dataset.
422Pydantic validation error — one or more required fields (nombre, email, asignacion, grado_clave) were missing from the request body.

Example — Create

curl -X POST http://localhost:8000/api/docentes \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Lucía Mamani Torres",
    "email": "[email protected]",
    "asignacion": "Comunicación 2° Sec",
    "grado_clave": "2do",
    "estado": "Activo"
  }'
{
  "id": "DOC-003",
  "nombre": "Lucía Mamani Torres",
  "email": "[email protected]",
  "asignacion": "Comunicación 2° Sec",
  "grado_clave": "2do",
  "estado": "Activo"
}

Example — Update

curl -X POST http://localhost:8000/api/docentes \
  -H "Content-Type: application/json" \
  -d '{
    "id": "DOC-002",
    "nombre": "Carlos Ruíz",
    "email": "[email protected]",
    "asignacion": "Tutoría 3° Sec",
    "grado_clave": "3ro",
    "estado": "Con licencia"
  }'

DELETE /api/docentes/:id_docente

Permanently removes a teacher record from data/docentes.json. This action cannot be undone through the API.
id_docente
string
required
The ID of the teacher to delete, e.g. DOC-002.

Response

{
  "status": "success",
  "message": "Docente DOC-002 eliminado"
}

Errors

StatusDetail
404"Docente no encontrado" — the provided ID does not exist in the dataset.

Example

curl -X DELETE http://localhost:8000/api/docentes/DOC-002

DocenteResultado Response Object

Both GET /api/docentes and POST /api/docentes return DocenteResultado objects (array and single object, respectively).
id
string
required
Unique teacher identifier auto-generated in DOC-NNN format. Example: "DOC-002". Zero-padded to three digits.
nombre
string
required
Full name of the teacher. Example: "Carlos Ruíz".
email
string
required
Institutional email address. Example: "[email protected]".
asignacion
string
required
Subject or role the teacher is assigned to. Example: "Tutoría 3° Sec".
grado_clave
string
required
The abbreviated grade level this teacher covers. Example: "3ro". This key is used by the frontend to associate teachers with their student cohort on the dashboard.
estado
string
required
Current employment status of the teacher. Example: "Activo", "Inactivo", "Con licencia".

Build docs developers (and LLMs) love