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 /notas resource manages grade records. Each nota links one student (alumno) to one subject (materia) and records a numeric grade value. All five CRUD operations are supported.
Request body and response shape differ. When you create or update a nota, the request body uses a nested structure — the alumno and materia fields are objects containing only an id. When you read a nota (single or list), the response uses a flat NotaDTO that includes the student’s name, surname, and the subject name directly in the response — no separate lookups needed.

GET /notas

Returns all valid grade records as a JSON array of NotaDTO objects. Records where the linked student or subject has been deleted (orphaned notas) are automatically filtered out and will not appear in this response. Response: 200 OK
id
integer
Unique identifier of the grade record.
valor
number
The numeric grade value.
alumnoId
integer
ID of the student who received the grade.
alumnoNombre
string
First name of the student.
alumnoApellido
string
Surname of the student.
materiaId
integer
ID of the subject the grade belongs to.
materiaNombre
string
Name of the subject.
curl example
curl http://localhost:8080/notas
Example response
[
  {
    "id": 1,
    "valor": 8.5,
    "alumnoId": 1,
    "alumnoNombre": "Juan",
    "alumnoApellido": "García",
    "materiaId": 1,
    "materiaNombre": "Matemáticas"
  },
  {
    "id": 2,
    "valor": 7.0,
    "alumnoId": 2,
    "alumnoNombre": "María",
    "alumnoApellido": "López",
    "materiaId": 2,
    "materiaNombre": "Historia"
  }
]

POST /notas

Creates a new grade record. The request body must reference an existing student and an existing subject by their IDs. Any id value in the request body is auto-assigned by the database. Request body
valor
number
required
The numeric grade value (e.g., 8.5).
fechaRegistro
string
required
Date the grade was recorded, in YYYY-MM-DD format.
alumno
object
required
Reference to the student receiving the grade. Must contain an existing student id.
materia
object
required
Reference to the subject the grade belongs to. Must contain an existing subject id.
Response: 200 OK — the saved Nota entity (not a NotaDTO). The nested alumno and materia objects are returned as-is from the database.
id
integer
Auto-generated identifier assigned by the database.
valor
number
The numeric grade value.
fechaRegistro
string
Date the grade was recorded, in YYYY-MM-DD format.
alumno
object
The full alumno entity linked to this grade.
materia
object
The full materia entity linked to this grade.
curl example
curl -X POST http://localhost:8080/notas \
  -H "Content-Type: application/json" \
  -d '{
    "valor": 8.5,
    "fechaRegistro": "2024-06-10",
    "alumno": { "id": 1 },
    "materia": { "id": 1 }
  }'
Example request body
{
  "valor": 8.5,
  "fechaRegistro": "2024-06-10",
  "alumno": { "id": 1 },
  "materia": { "id": 1 }
}
Example response
{
  "id": 1,
  "valor": 8.5,
  "fechaRegistro": "2024-06-10",
  "alumno": {
    "id": 1,
    "nombre": "Juan",
    "apellido": "García",
    "email": "juan@example.com",
    "fechaNacimiento": "2000-05-15"
  },
  "materia": {
    "id": 1,
    "nombre": "Matemáticas",
    "codigo": "MAT101",
    "creditos": 4
  }
}

GET /notas/

Returns a single grade record by its numeric ID. The response is a flat NotaDTO, not the nested Nota entity. Path parameters
id
integer
required
The unique identifier of the grade record to retrieve.
Response: 200 OK — a flat NotaDTO.
id
integer
Unique identifier of the grade record.
valor
number
The numeric grade value.
alumnoId
integer
ID of the student who received the grade.
alumnoNombre
string
First name of the student.
alumnoApellido
string
Surname of the student.
materiaId
integer
ID of the subject the grade belongs to.
materiaNombre
string
Name of the subject.
Error cases
StatusCondition
500 Internal Server ErrorNo nota exists with the given id. The controller throws an unhandled RuntimeException("Nota no encontrada").
A missing nota returns 500 Internal Server Error, not 404. Before requesting a specific nota by ID, confirm it exists by fetching GET /notas and verifying the id is present in the response array.
curl example
curl http://localhost:8080/notas/1
Example response
{
  "id": 1,
  "valor": 8.5,
  "alumnoId": 1,
  "alumnoNombre": "Juan",
  "alumnoApellido": "García",
  "materiaId": 1,
  "materiaNombre": "Matemáticas"
}

PUT /notas/

Updates an existing grade record. The request body uses the same nested structure as POST /notasalumno and materia are objects with an id. The fields valor, alumno, and materia are overwritten. Path parameters
id
integer
required
The unique identifier of the grade record to update.
Request body
valor
number
required
Updated numeric grade value.
alumno
object
required
Updated reference to the student. Must contain an existing student id.
materia
object
required
Updated reference to the subject. Must contain an existing subject id.
Error cases
StatusCondition
500 Internal Server ErrorNo nota exists with the given id. The controller throws an unhandled RuntimeException("Nota no encontrada").
Response: 200 OK — the updated Nota entity with nested alumno and materia objects.
id
integer
Unchanged unique identifier.
valor
number
Updated numeric grade value.
fechaRegistro
string
Date the grade was recorded, in YYYY-MM-DD format.
alumno
object
The updated alumno entity linked to this grade.
materia
object
The updated materia entity linked to this grade.
curl example
curl -X PUT http://localhost:8080/notas/1 \
  -H "Content-Type: application/json" \
  -d '{
    "valor": 9.0,
    "alumno": { "id": 1 },
    "materia": { "id": 2 }
  }'
Example request body
{
  "valor": 9.0,
  "alumno": { "id": 1 },
  "materia": { "id": 2 }
}
Example response
{
  "id": 1,
  "valor": 9.0,
  "fechaRegistro": "2024-06-10",
  "alumno": {
    "id": 1,
    "nombre": "Juan",
    "apellido": "García",
    "email": "juan@example.com",
    "fechaNacimiento": "2000-05-15"
  },
  "materia": {
    "id": 2,
    "nombre": "Historia",
    "codigo": "HIS201",
    "creditos": 3
  }
}

DELETE /notas/

Deletes a grade record by ID. Path parameters
id
integer
required
The unique identifier of the grade record to delete.
Response: 200 OK — the grade was deleted. The response body is empty. Error cases
StatusCondition
500 Internal Server ErrorNo nota exists with the given id. The controller throws an unhandled RuntimeException("Nota no encontrada").
A missing nota returns 500 Internal Server Error, not 404. Before deleting a nota by ID, confirm it exists by fetching GET /notas and verifying the id is present in the response array.
curl example
curl -X DELETE http://localhost:8080/notas/1
Successful response: 200 OK with an empty body.

Alumnos reference

Endpoints for managing student records.

Materias reference

Endpoints for managing academic subjects.

Error reference

Full list of status codes, including the 500 behaviour on notas.

API overview

Base URL, authentication, CORS, and content type.

Build docs developers (and LLMs) love