Performs a full update on an existingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/marchena96/Paradigma-lab1/llms.txt
Use this file to discover all available pages before exploring further.
Library record. The controller first verifies the library exists using libraryId; if it does not, it returns 404. When the library is found, LibrariesService.Update replaces the Name and Location fields on the tracked entity and persists the changes to the database. The id in the request body is used by EF Core to locate the database row to update.
Endpoint
Authentication
No authentication is required. TheUpdate action does not carry an [Authorize] attribute.
Path Parameters
The unique integer ID of the library to update. The controller performs an existence check against this value before applying any changes.
Request Body
Send a JSON object with the following fields. TheContent-Type header must be application/json.
The ID of the library. This should match the
libraryId path parameter. Used by LibrariesService.Update to locate the record in the database.The new name for the library. Replaces the existing
Name field.The new location for the library. Replaces the existing
Location field.Response
204 No Content
Returned when the update is applied successfully. The response body is empty.404 Not Found
Returned when no library with the givenlibraryId exists. No update is performed. The response body is empty.
Status Codes
| Status | Meaning |
|---|---|
204 | No Content — the library was updated successfully. |
404 | Not Found — no library with the given libraryId was found. |
What Gets Updated
LibrariesService.Update fetches the tracked entity and explicitly sets only two fields:
Name and Location are overwritten. The Id (primary key) is never changed.
Example Request
Example Response
A204 No Content response has no body. A successful update looks like this at the HTTP level: