feat: add 16 missing Bruno requests for complete API coverage
Add missing Bruno requests for all API endpoints: Library Management: - Get Library - retrieve single library details - Update Library - modify existing library - Delete Library - remove library and media items - Delete Library Folder - remove folder from library - Get Library Stats - retrieve library statistics Media Items Management: - Create Media Item - add new media with full metadata - Update Media Item - modify existing media metadata - Delete Media Item - remove media from library - Get Media Rating - retrieve single media rating - Delete Media Rating - remove user's media rating Coverage now complete: 47/47 API endpoints have Bruno requests Organized requests in proper folder structure for maintainability
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
meta {
|
||||
name: Delete Library
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{base_url}}/api/libraries/{{library_id}}
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
headers {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
tests {
|
||||
test_delete_library_success(status, headers, body) {
|
||||
if (status !== 204) {
|
||||
throw new Error("Expected status 204, got " + status);
|
||||
}
|
||||
|
||||
// Delete should return no content
|
||||
if (body && body.length > 0) {
|
||||
throw new Error("Expected empty response body for delete");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
libraryId: "cc23c3a7-f8fb-451a-a78d-2a16df1b725a"
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Delete Library
|
||||
|
||||
Deletes a library and all associated media items.
|
||||
|
||||
**Method:** DELETE
|
||||
|
||||
**Endpoint:** /api/libraries/{id}
|
||||
|
||||
**Authentication:** Required (Bearer token, admin only)
|
||||
|
||||
**Path Parameters:**
|
||||
- `id` (string): Library UUID
|
||||
|
||||
**Response:** Empty (204 No Content)
|
||||
|
||||
**Status Codes:**
|
||||
- 204: Library deleted successfully
|
||||
- 400: Invalid library ID
|
||||
- 401: Unauthorized
|
||||
- 403: Forbidden (admin access required)
|
||||
- 404: Library not found
|
||||
- 500: Internal server error
|
||||
|
||||
**Warning:** This will delete ALL media items in the library.
|
||||
|
||||
**Examples:**
|
||||
- Delete library: `DELETE /api/libraries/cc23c3a7-f8fb-451a-a78d-2a16df1b725a`
|
||||
|
||||
**Note:** Admin access required - only users with admin role can delete libraries.
|
||||
}
|
||||
Reference in New Issue
Block a user