Phase 2 part 3: Split library and media item endpoints - Libraries: get_visible_libraries, get_library, create_library, add_library_folder, set_library_visibility - Media Items: list_media_items, get_media_item, search_media_items, filter_sort_media_items, update_media_item, delete_media_item - Complete request/response examples for all endpoints
1.1 KiB
1.1 KiB
Search Media Items
Search for media items by title, author, or description.
Endpoint: GET /api/media-items/search
Auth: Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Search query (minimum 2 characters) |
| limit | integer | No | Number of results (default 20) |
| offset | integer | No | Number to skip |
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
Example Request
GET /api/media-items/search?q=Harry+Potter&limit=20&offset=0
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Response (200 OK)
{
"results": [
{
"id": "uuid",
"title": "Book Title",
"author": "Author Name",
"match_score": 0.95
}
],
"total": 15
}
Error Responses
| Code | Description |
|---|---|
| 400 | Invalid search query (too short) |
| 401 | Invalid or expired token |