Skip to main content
GET
/
lista_estudiantes
Get Student List
curl --request GET \
  --url https://api.example.com/lista_estudiantes
{
  "500": {},
  "email": "<string>",
  "nombre": "<string>",
  "apellidos": "<string>"
}

Overview

This endpoint returns a complete list of students registered in the Calculus Learning Platform. The list is sorted by last name and excludes the admin account.
The admin account ([email protected]) is automatically excluded from the results.

Request

cURL
curl -X GET "https://proyecto-ingenieria-software-6ccv.onrender.com/lista_estudiantes" \
  -H "Content-Type: application/json"

Response

Returns an array of student objects, ordered alphabetically by last name (apellidos ASC).
email
string
required
Student’s email address (unique identifier)
nombre
string
required
Student’s first name
apellidos
string
required
Student’s last name(s)

Response Example

[
  {
    "email": "[email protected]",
    "nombre": "Juan",
    "apellidos": "García López"
  },
  {
    "email": "[email protected]",
    "nombre": "María",
    "apellidos": "Martínez Silva"
  },
  {
    "email": "[email protected]",
    "nombre": "Carlos",
    "apellidos": "Rodríguez Pérez"
  }
]

Implementation Details

The endpoint executes the following SQL query (line 380-384):
SELECT email, nombre, apellidos 
FROM usuarios 
WHERE email != '[email protected]'
ORDER BY apellidos ASC

Usage in Frontend

This endpoint is utilized in the PanelProfesor.vue component to populate the student selection dropdown:
async function cargarEstudiantes() {
  const response = await fetch('/lista_estudiantes');
  const estudiantes = await response.json();
  // Populate student list in UI
}

Error Responses

500
error
Database connection error
{
  "detail": "Error BD"
}

Build docs developers (and LLMs) love