TheDocumentation 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.
/materias resource manages academic subjects. Each subject has a unique auto-generated ID, a name, a unique code, and a credit value. All five CRUD operations are supported.
GET /materias
Returns all subjects in the database as a JSON array. The array is empty if no subjects have been created yet. Response:200 OK
Unique identifier assigned by the database. Auto-generated.
Subject name.
Subject code (e.g.,
MAT101).Number of academic credits the subject is worth.
POST /materias
Creates a new subject. Anyid value you include in the request body is ignored — the API forces the ID to null and lets the database assign one.
Request body
Subject name.
Subject code (e.g.,
MAT101). Must be unique across all subjects.Number of academic credits the subject is worth.
200 OK — the saved subject object including the assigned id.
Auto-generated identifier assigned by the database.
Subject name.
Subject code.
Number of academic credits.
GET /materias/
Returns a single subject by its numeric ID. Path parametersThe unique identifier of the subject to retrieve.
200 OK — the subject object.
Unique identifier.
Subject name.
Subject code.
Number of academic credits.
| Status | Condition |
|---|---|
404 Not Found | No subject exists with the given id. |
PUT /materias/
Updates an existing subject’s fields. All three editable fields —nombre, codigo, and creditos — are overwritten with the values from the request body.
Path parameters
The unique identifier of the subject to update.
Updated subject name.
Updated subject code.
Updated number of academic credits.
200 OK — the updated subject object.
Unchanged unique identifier.
Updated subject name.
Updated subject code.
Updated number of academic credits.
| Status | Condition |
|---|---|
404 Not Found | No subject exists with the given id. |
DELETE /materias/
Deletes a subject by ID. Path parametersThe unique identifier of the subject to delete.
204 No Content — the subject was deleted. The response body is empty.
Error cases
| Status | Condition |
|---|---|
404 Not Found | No subject exists with the given id. |
Unlike
DELETE /alumnos/{id}, deleting a subject does not check for associated grades first. However, any grades (notas) that reference the deleted subject will become orphaned — those notas are automatically excluded from the GET /notas list response. Delete grades before deleting their subject to keep your data consistent.204 No Content with an empty body.
Related pages
Alumnos reference
Endpoints for managing student records.
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.