The student endpoints are the core of the Vanguardia EPIS API. Every read operation runs the rule-based classifier and — on first load — calls the AI explanation service to produce a plain-language description of why a student is at risk and what the school should do. All write operations (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.
POST, DELETE) immediately update the JSON dataset on disk and synchronize the in-memory session cache.
GET /api/estudiantes
Lists every student in the dataset, enriched with their risk classification and AI-generated explanation. On the first call the server processes all students in parallel: it runsclasificar_estudiante() on each record and calls the AI provider via generar_explicacion(). This may take several seconds depending on the number of students and AI response time. All subsequent calls return the results from the in-memory session cache instantly, unless force_refresh=true is passed.
When
true, bypasses the in-memory session cache and reprocesses every student from scratch, calling the classifier and AI service again. Use this after bulk edits or when you need up-to-date AI explanations.Response
Returns an array ofEstudianteResultado objects. See the EstudianteResultado schema below for all fields.
Example
GET /api/estudiantes/:id_estudiante
Returns the risk profile for a single student. If the student is already in the session cache, it is returned immediately. Otherwise the server loads the dataset, finds the matching record, runs the classifier and AI service, stores the result in cache, and returns it.The student’s unique identifier, e.g.
EST-001. Case-sensitive.When
true, reprocesses the student even if a cached result exists. Useful after editing a student’s data via POST /api/estudiantes.Errors
| Status | Detail |
|---|---|
404 | "Estudiante 'EST-999' no encontrado en el dataset." — the provided ID does not match any record. |
Example
POST /api/estudiantes
Creates a new student record or updates an existing one, then immediately classifies the student and generates an AI explanation. The result is persisted todata/estudiantes.json and stored in the session cache.
Create mode — omit the id field. The server scans existing IDs, finds the highest EST-NNN number, and assigns the next one (e.g., if the highest is EST-020, the new student receives EST-021).
Update mode — include the id field with an existing student ID. All fields are overwritten with the provided values. Returns 404 if the ID does not exist.
Request Body
Optional. If provided, the endpoint operates in update mode and overwrites the matching student record. Must match an existing
EST-NNN ID. If omitted, a new ID is auto-generated.Full name of the student. Example:
"Rosa Sulca Martínez".School grade. Example:
"1ro de secundaria", "3ro de secundaria".Attendance percentage on a 0–100 scale. Example:
78.5. May be null if data is unavailable — the classifier will flag this as a missing variable.Grade point average on the Peruvian vigesimal (0–20) scale. Example:
14.0. May be null if no grades have been recorded this term.Classroom participation level. Accepted values:
"alta", "media", "baja". May be null.Student’s native language. Common values in the dataset:
"castellano", "quechua". Defaults to "castellano" when omitted.Free-text notes from the tutor or teacher. Example:
"Ausentismo reportado frecuentemente los lunes.". May be null.Response
Returns the fullEstudianteResultado object for the created or updated student, including the freshly computed nivel_riesgo, motivos, and AI-generated explicacion.
Errors
| Status | Detail |
|---|---|
404 | "Estudiante no encontrado" — an id was provided in update mode but no matching record exists. |
422 | Pydantic validation error — nombre or grado was missing from the request body. |
Example — Create
Example — Update
DELETE /api/estudiantes/:id_estudiante
Permanently removes a student record fromdata/estudiantes.json and evicts the student from the in-memory session cache. This action cannot be undone through the API.
The ID of the student to delete, e.g.
EST-014.Response
Errors
| Status | Detail |
|---|---|
404 | "Estudiante no encontrado" — the provided ID does not exist in the dataset. |
Example
EstudianteResultado Response Object
All student read endpoints andPOST /api/estudiantes return a single EstudianteResultado object (or an array of them for GET /api/estudiantes).
Unique student identifier in
EST-NNN format. Example: "EST-007".Full name of the student. Example:
"Lucía Benites Ríos".School grade. Example:
"5to de secundaria".Risk classification emoji. One of four values:
| Value | Meaning |
|---|---|
🟢 | Low risk — all indicators are within acceptable thresholds. |
🟡 | Medium risk — one or more indicators are borderline. |
🔴 | High risk — critical indicators detected; intervention recommended. |
⚪ | Insufficient data — too many variables are missing to classify. |
Ordered list of rule-based reasons that contributed to the risk classification. Each entry is a human-readable string. Example:
["Asistencia crítica (60%)", "Promedio reprobatorio (9.5)", "Participación baja"]. Empty array [] when risk is low or data is insufficient.List of data fields that were
null or missing at classification time. Example: ["asistencia_pct", "participacion"]. Used to prompt data-entry staff to complete student records.Plain-language AI-generated explanation of the student’s risk situation, tailored to their specific indicators and context.
null when origen_ia is "error_sin_cache" or "no_aplica".AI-generated actionable recommendation for the school or tutor.
null under the same conditions as explicacion.Source of the AI explanation. See the origen_ia reference in the overview for the full value table. One of:
"vivo", "fallback", "error_sin_cache", "no_aplica".Attendance percentage (0–100) as stored in the dataset. Passed through from the raw record — not re-computed by the API.
Grade point average on the 0–20 vigesimal scale.
null if no grades were recorded.Classroom participation level:
"alta", "media", or "baja". null if not recorded.Student’s native language. Typically
"castellano" or "quechua".Free-text observations from the tutor.
null when no notes have been entered.