Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JuanSebax85/backend-prueba-fullstack/llms.txt

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

The /alumnos resource manages student records. Each student has a unique auto-generated ID, a name, a surname, an email address, and a date of birth. All five CRUD operations are supported.

GET /alumnos

Returns all students in the database as a JSON array. The array is empty if no students have been created yet. Response: 200 OK
id
integer
Unique identifier assigned by the database. Auto-generated.
nombre
string
Student’s first name.
apellido
string
Student’s surname.
email
string
Student’s email address.
fechaNacimiento
string
Date of birth in YYYY-MM-DD format.
curl example
curl http://localhost:8080/alumnos
Example response
[
  {
    "id": 1,
    "nombre": "Juan",
    "apellido": "García",
    "email": "juan@example.com",
    "fechaNacimiento": "2000-05-15"
  },
  {
    "id": 2,
    "nombre": "María",
    "apellido": "López",
    "email": "maria@example.com",
    "fechaNacimiento": "1998-11-03"
  }
]

POST /alumnos

Creates a new student. Any id value you include in the request body is ignored — the API forces the ID to null and lets the database assign one. Request body
nombre
string
required
Student’s first name.
apellido
string
required
Student’s surname.
email
string
required
Student’s email address.
fechaNacimiento
string
required
Date of birth in YYYY-MM-DD format.
Response: 200 OK — the saved student object including the assigned id.
id
integer
Auto-generated identifier assigned by the database.
nombre
string
Student’s first name.
apellido
string
Student’s surname.
email
string
Student’s email address.
fechaNacimiento
string
Date of birth in YYYY-MM-DD format.
Do not include an id field in the request body. The API ignores it and always assigns a new ID automatically.
curl example
curl -X POST http://localhost:8080/alumnos \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Juan",
    "apellido": "García",
    "email": "juan@example.com",
    "fechaNacimiento": "2000-05-15"
  }'
Example request body
{
  "nombre": "Juan",
  "apellido": "García",
  "email": "juan@example.com",
  "fechaNacimiento": "2000-05-15"
}
Example response
{
  "id": 1,
  "nombre": "Juan",
  "apellido": "García",
  "email": "juan@example.com",
  "fechaNacimiento": "2000-05-15"
}

GET /alumnos/

Returns a single student by their numeric ID. Path parameters
id
integer
required
The unique identifier of the student to retrieve.
Response: 200 OK — the student object.
id
integer
Unique identifier.
nombre
string
Student’s first name.
apellido
string
Student’s surname.
email
string
Student’s email address.
fechaNacimiento
string
Date of birth in YYYY-MM-DD format.
Error cases
StatusCondition
404 Not FoundNo student exists with the given id.
curl example
curl http://localhost:8080/alumnos/1
Example response
{
  "id": 1,
  "nombre": "Juan",
  "apellido": "García",
  "email": "juan@example.com",
  "fechaNacimiento": "2000-05-15"
}

PUT /alumnos/

Updates an existing student’s fields. All four editable fields — nombre, apellido, email, and fechaNacimiento — are overwritten with the values from the request body. Path parameters
id
integer
required
The unique identifier of the student to update.
Request body
nombre
string
required
Updated first name.
apellido
string
required
Updated surname.
email
string
required
Updated email address.
fechaNacimiento
string
required
Updated date of birth in YYYY-MM-DD format.
Response: 200 OK — the updated student object.
id
integer
Unchanged unique identifier.
nombre
string
Updated first name.
apellido
string
Updated surname.
email
string
Updated email address.
fechaNacimiento
string
Updated date of birth in YYYY-MM-DD format.
Error cases
StatusCondition
404 Not FoundNo student exists with the given id.
curl example
curl -X PUT http://localhost:8080/alumnos/1 \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Juan Carlos",
    "apellido": "García",
    "email": "juancarlos@example.com",
    "fechaNacimiento": "2000-05-15"
  }'
Example request body
{
  "nombre": "Juan Carlos",
  "apellido": "García",
  "email": "juancarlos@example.com",
  "fechaNacimiento": "2000-05-15"
}
Example response
{
  "id": 1,
  "nombre": "Juan Carlos",
  "apellido": "García",
  "email": "juancarlos@example.com",
  "fechaNacimiento": "2000-05-15"
}

DELETE /alumnos/

Deletes a student by ID. Before deleting, the API checks whether any grades (notas) reference the student. If any grades exist, the request is rejected with 400 Bad Request. Path parameters
id
integer
required
The unique identifier of the student to delete.
Response: 204 No Content — the student was deleted. The response body is empty. Error cases
StatusCondition
404 Not FoundNo student exists with the given id.
400 Bad RequestThe student has one or more grades (notas) associated with them.
You cannot delete a student who has associated grades. You must delete all of that student’s notas first, then retry the delete.Steps to resolve a 400:
  1. Fetch all grades: GET /notas and filter the response by alumnoId.
  2. Delete each grade: DELETE /notas/{id} for every matching nota.
  3. Retry the student delete: DELETE /alumnos/{id}.
400 response body
El alumno {nombre} {apellido} tiene notas registradas en el sistema
The student’s actual first and last name are included in the message (e.g., El alumno Juan García tiene notas registradas en el sistema). curl example
curl -X DELETE http://localhost:8080/alumnos/1
Successful response: 204 No Content with an empty body.

Materias reference

Endpoints for managing academic subjects.

Notas reference

Endpoints for creating, reading, and deleting grades.

Error reference

Full list of status codes and how to handle them.

API overview

Base URL, authentication, CORS, and content type.

Build docs developers (and LLMs) love