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 Backend Prueba Fullstack API returns standard HTTP status codes. Most errors follow expected REST conventions, but the /notas resource has two cases where an unhandled RuntimeException causes a 500 Internal Server Error instead of a structured 4xx response.

Status codes

200 OK

Returned by successful GET and PUT requests. The response body contains the requested or updated resource.

201 Created

Returned by successful POST requests. The response body contains the newly created resource with its assigned id.

204 No Content

Returned by successful DELETE requests on /alumnos/{id} and /materias/{id}. The response body is empty.

400 Bad Request

Returned when you attempt to delete a student that has associated grades. When it occurs: DELETE /alumnos/{id} — the student has one or more Notas linked to them. Response body:
El alumno {nombre} {apellido} tiene notas registradas en el sistema
The message includes the student’s first and last name dynamically (e.g., El alumno Juan García tiene notas registradas en el sistema).
You must delete all Notas belonging to a student before you can delete that student. Delete the grades first, then retry the delete on the student.
Example — triggering a 400:
curl -X DELETE http://localhost:8080/alumnos/1
If the student has associated grades, the response is:
HTTP/1.1 400 Bad Request

El alumno Juan García tiene notas registradas en el sistema
How to handle it:
  1. List the student’s grades: GET /notas and filter by alumnoId.
  2. Delete each Nota: DELETE /notas/{id} for each grade.
  3. Retry the student delete: DELETE /alumnos/{id}.

404 Not Found

Returned when an operation targets a resource ID that does not exist. When it occurs:
EndpointOperation
GET /alumnos/{id}Student ID not found
PUT /alumnos/{id}Student ID not found
DELETE /alumnos/{id}Student ID not found
GET /materias/{id}Subject ID not found
PUT /materias/{id}Subject ID not found
DELETE /materias/{id}Subject ID not found
The response body is empty (Spring Boot default 404 with no body). Example — triggering a 404:
curl -v http://localhost:8080/alumnos/999
Response:
HTTP/1.1 404 Not Found

500 Internal Server Error

This is a known limitation of the current implementation. The /notas resource does not handle missing IDs with a proper 404. Instead, an unhandled RuntimeException is thrown, which Spring Boot maps to 500 by default.
When it occurs:
EndpointCondition
GET /notas/{id}Nota ID not found — throws RuntimeException("Nota no encontrada")
PUT /notas/{id}Nota ID not found — throws RuntimeException("Nota no encontrada")
DELETE /notas/{id}Nota ID not found — throws RuntimeException("Nota no encontrada")
How to avoid it: Before performing a GET or DELETE on a specific nota, confirm it exists. Fetch all notas with GET /notas and check that the target id is present in the response array before making the targeted request.
# Fetch all notas and verify the ID exists before deleting
curl http://localhost:8080/notas
If the ID is present in the list, proceed with the targeted request:
curl -X DELETE http://localhost:8080/notas/1

Summary table

CodeMeaningEndpoints
200 OKSuccessGET, PUT on all resources
201 CreatedResource createdPOST /alumnos, POST /materias, POST /notas
204 No ContentDeleted successfullyDELETE /alumnos/{id}, DELETE /materias/{id}
400 Bad RequestCannot delete — linked grades existDELETE /alumnos/{id}
404 Not FoundResource not foundGET, PUT, DELETE on /alumnos/{id} and /materias/{id}
500 Internal Server ErrorUnhandled RuntimeExceptionGET /notas/{id}, PUT /notas/{id}, DELETE /notas/{id}

API overview

Base URL, authentication, CORS, and how to make requests.

Notas reference

Endpoints for creating, reading, and deleting grades.

Alumnos reference

Endpoints for managing student records.

Materias reference

Endpoints for managing academic subjects.

Build docs developers (and LLMs) love