meta { name: Update Library type: http seq: 2 } put { url: {{base_url}}/api/libraries/{{library_id}} body: json auth: inherit } headers { Content-Type: application/json } body:json { "name": "Updated Library Name", "description": "Updated library description" } tests { test_update_library_success(status, headers, body) { if (status !== 200) { throw new Error("Expected status 200, got " + status); } let data; try { data = JSON.parse(body); } catch (e) { throw new Error("Response body is not valid JSON"); } if (!data || typeof data !== "object") { throw new Error("Expected updated library object in response"); } if (!data.id || !data.updated_at) { throw new Error("Library response missing update confirmation"); } return true; } } vars:pre-request { libraryId: "cc23c3a7-f8fb-451a-a78d-2a16df1b725a" } settings { encodeUrl: true timeout: 0 } docs { ## Update Library Updates an existing library's information. **Method:** PUT **Endpoint:** /api/libraries/{id} **Authentication:** Required (Bearer token, admin only) **Path Parameters:** - `id` (string): Library UUID **Request Body:** - `name` (string, optional): Library name - `description` (string, optional): Library description **Response:** Updated library object - `id` (string): Library UUID - `name` (string): Updated library name - `description` (string): Updated library description - `library_type_id` (string): Library type UUID - `updated_at` (string): Update timestamp **Status Codes:** - 200: Success - 400: Invalid request data - 401: Unauthorized - 403: Forbidden (admin access required) - 404: Library not found - 500: Internal server error **Examples:** - Update library: `PUT /api/libraries/cc23c3a7-f8fb-451a-a78d-2a16df1b725a` **Note:** Admin access required - only users with admin role can update libraries. }