Overview
The Evaluations API allows you to create and manage different types of assessments for students. Evaluations can be assigned to sections and optionally linked to topics. Each evaluation has configurable start/end dates, duration, scoring, and attempt limits.
Evaluation Types
tarea - Homework assignment
practica - Practice exercise
diagnostico - Diagnostic assessment
formativa - Formative assessment
sumativa - Summative assessment
List All Evaluations
GET /api/evaluations Retrieve a list of all evaluations.
Response
Indicates if the request was successful
Response message: “Evaluaciones listadas con éxito”
Array of evaluation objects Unique identifier for the evaluation
ID of the teacher who created the evaluation (references users table)
ID of the section this evaluation is assigned to
ID of the associated topic (optional)
Evaluation title (max 200 characters)
Detailed description of the evaluation
Type of evaluation: tarea, practica, diagnostico, formativa, or sumativa
Start date and time when the evaluation becomes available
End date and time when the evaluation closes
Time limit in minutes for completing the evaluation
Maximum score possible (default: 20.00)
Minimum passing score (default: 11.00)
Maximum number of attempts allowed (default: 1)
Whether questions should be randomized (0 = false, 1 = true)
Timestamp when the evaluation was created
Timestamp when the evaluation was last updated
Example Request
curl -X GET https://api.example.com/api/evaluations \
-H "Accept: application/json"
Example Response
{
"success" : true ,
"message" : "Evaluaciones listadas con éxito" ,
"data" : [
{
"id" : 1 ,
"docente_id" : 5 ,
"section_id" : 12 ,
"topic_id" : 3 ,
"titulo" : "Examen Final de Álgebra" ,
"descripcion" : "Evaluación sumativa que cubre todos los temas del semestre" ,
"tipo" : "sumativa" ,
"fecha_inicio" : "2026-03-15 08:00:00" ,
"fecha_fin" : "2026-03-15 10:00:00" ,
"duracion_min" : 120 ,
"puntaje_max" : 20.00 ,
"puntaje_aprobacion" : 11.00 ,
"intentos_max" : 1 ,
"orden_aleatorio" : 1 ,
"created_at" : "2026-03-05T10:30:00.000000Z" ,
"updated_at" : "2026-03-05T10:30:00.000000Z"
}
]
}
Create Evaluation
POST /api/evaluations Create a new evaluation.
Request Body
Response
Indicates if the request was successful
Response message: “Evaluación creada con éxito”
The newly created evaluation object
Example Request
curl -X POST https://api.example.com/api/evaluations \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"docente_id": 5,
"section_id": 12,
"topic_id": 3,
"titulo": "Práctica de Ecuaciones Lineales",
"descripcion": "Ejercicios prácticos sobre sistemas de ecuaciones",
"tipo": "practica",
"fecha_inicio": "2026-03-20 14:00:00",
"fecha_fin": "2026-03-22 23:59:59",
"duracion_min": 60,
"puntaje_max": 20.00,
"puntaje_aprobacion": 11.00,
"intentos_max": 2,
"orden_aleatorio": 0
}'
Example Response
{
"success" : true ,
"message" : "Evaluación creada con éxito" ,
"data" : {
"id" : 2 ,
"docente_id" : 5 ,
"section_id" : 12 ,
"topic_id" : 3 ,
"titulo" : "Práctica de Ecuaciones Lineales" ,
"descripcion" : "Ejercicios prácticos sobre sistemas de ecuaciones" ,
"tipo" : "practica" ,
"fecha_inicio" : "2026-03-20 14:00:00" ,
"fecha_fin" : "2026-03-22 23:59:59" ,
"duracion_min" : 60 ,
"puntaje_max" : 20.00 ,
"puntaje_aprobacion" : 11.00 ,
"intentos_max" : 2 ,
"orden_aleatorio" : 0 ,
"created_at" : "2026-03-05T14:25:00.000000Z" ,
"updated_at" : "2026-03-05T14:25:00.000000Z"
}
}
Get Evaluation
GET /api/evaluations/:id Retrieve a specific evaluation by ID.
Path Parameters
Response
Indicates if the request was successful
Response message: “Evaluación obtenida con éxito”
The evaluation object (see structure in List All Evaluations)
Example Request
curl -X GET https://api.example.com/api/evaluations/1 \
-H "Accept: application/json"
Example Response
{
"success" : true ,
"message" : "Evaluación obtenida con éxito" ,
"data" : {
"id" : 1 ,
"docente_id" : 5 ,
"section_id" : 12 ,
"topic_id" : 3 ,
"titulo" : "Examen Final de Álgebra" ,
"descripcion" : "Evaluación sumativa que cubre todos los temas del semestre" ,
"tipo" : "sumativa" ,
"fecha_inicio" : "2026-03-15 08:00:00" ,
"fecha_fin" : "2026-03-15 10:00:00" ,
"duracion_min" : 120 ,
"puntaje_max" : 20.00 ,
"puntaje_aprobacion" : 11.00 ,
"intentos_max" : 1 ,
"orden_aleatorio" : 1 ,
"created_at" : "2026-03-05T10:30:00.000000Z" ,
"updated_at" : "2026-03-05T10:30:00.000000Z"
}
}
Update Evaluation
PUT /api/evaluations/:id Update an existing evaluation.
Path Parameters
Request Body
All fields from the Create Evaluation endpoint can be updated. Include only the fields you want to change.
Response
Indicates if the request was successful
Response message: “Evaluación actualizada con éxito”
The updated evaluation object
Example Request
curl -X PUT https://api.example.com/api/evaluations/2 \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"intentos_max": 3,
"fecha_fin": "2026-03-25 23:59:59"
}'
Example Response
{
"success" : true ,
"message" : "Evaluación actualizada con éxito" ,
"data" : {
"id" : 2 ,
"docente_id" : 5 ,
"section_id" : 12 ,
"topic_id" : 3 ,
"titulo" : "Práctica de Ecuaciones Lineales" ,
"descripcion" : "Ejercicios prácticos sobre sistemas de ecuaciones" ,
"tipo" : "practica" ,
"fecha_inicio" : "2026-03-20 14:00:00" ,
"fecha_fin" : "2026-03-25 23:59:59" ,
"duracion_min" : 60 ,
"puntaje_max" : 20.00 ,
"puntaje_aprobacion" : 11.00 ,
"intentos_max" : 3 ,
"orden_aleatorio" : 0 ,
"created_at" : "2026-03-05T14:25:00.000000Z" ,
"updated_at" : "2026-03-05T15:10:00.000000Z"
}
}
Delete Evaluation
DELETE /api/evaluations/:id Delete an evaluation. This will also cascade delete all associated evaluation questions.
Path Parameters
Response
Indicates if the request was successful
Response message: “Evaluación eliminada con éxito”
Returns null on successful deletion
Example Request
curl -X DELETE https://api.example.com/api/evaluations/2 \
-H "Accept: application/json"
Example Response
{
"success" : true ,
"message" : "Evaluación eliminada con éxito" ,
"data" : null
}
Database Relationships
Foreign Keys
docente_id : References users.id (cascade delete)
section_id : References sections.id (cascade delete)
topic_id : References topics.id (set null on delete)
See Evaluation Questions to assign questions to evaluations
Questions are linked through the eval_preguntas pivot table