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
71 lines
1.4 KiB
Plaintext
71 lines
1.4 KiB
Plaintext
meta {
|
|
name: Delete Media Item
|
|
type: http
|
|
seq: 3
|
|
}
|
|
|
|
delete {
|
|
url: {{base_url}}/api/media-items/{{media_item_id}}
|
|
body: none
|
|
auth: inherit
|
|
}
|
|
|
|
headers {
|
|
Content-Type: application/json
|
|
}
|
|
|
|
tests {
|
|
test_delete_media_item_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 {
|
|
mediaItemId: "550e8400-e29b-41d4-a716-446655440000"
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|
|
|
|
docs {
|
|
## Delete Media Item
|
|
|
|
Deletes a media item from the library.
|
|
|
|
**Method:** DELETE
|
|
|
|
**Endpoint:** /api/media-items/{id}
|
|
|
|
**Authentication:** Required (Bearer token, admin only)
|
|
|
|
**Path Parameters:**
|
|
- `id` (string): Media item UUID
|
|
|
|
**Response:** Empty (204 No Content)
|
|
|
|
**Status Codes:**
|
|
- 204: Media item deleted successfully
|
|
- 400: Invalid media item ID
|
|
- 401: Unauthorized
|
|
- 403: Forbidden (admin access required)
|
|
- 404: Media item not found
|
|
- 500: Internal server error
|
|
|
|
**Examples:**
|
|
- Delete media item: `DELETE /api/media-items/550e8400-e29b-41d4-a716-446655440000`
|
|
|
|
**Warning:** This permanently removes the media item and all associated data (ratings, notes, highlights).
|
|
|
|
**Note:** Admin access required - only users with admin role can delete media items.
|
|
} |