refactor: reorganize Bruno API collection for better structure
- Remove obsolete scenarios/ folder and move requests to root media-items/ - Create new filters/ folder for field value autocomplete searches - Move Field Values Search requests from search/ to filters/ for clarity - Move Search Media Items from scenarios/ to search/ for consistency - Update sequence numbers across all media-items requests (2-13) - Remove redundant folder configuration files - Improve API collection organization for better discoverability
This commit is contained in:
1 parent
c9e085c164
commit
af3c3019cf
18 files changed
+387
-19
No files matched your search
@@ -1,63 +0,0 @@
|
||||
info:
|
||||
name: List Media Items with Sorting
|
||||
type: http
|
||||
seq: 1
|
||||
http:
|
||||
method: GET
|
||||
url: '{{base_url}}/api/media-items?library_id={{library_id}}&sort=title+ASC&limit=10&offset=0'
|
||||
auth: inherit
|
||||
body:
|
||||
type: none
|
||||
headers:
|
||||
- key: Content-Type
|
||||
value: application/json
|
||||
|
||||
docs: |-
|
||||
## List Media Items with Sorting
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Endpoint:** /api/media-items
|
||||
|
||||
**Authentication:** Required (Bearer token)
|
||||
|
||||
**Query Parameters:**
|
||||
- `library_id` (string, required): UUID of the library
|
||||
- `sort` (string, optional): Sort field and direction
|
||||
- Available options:
|
||||
- `created_at ASC` - Oldest added first
|
||||
- `created_at DESC` - Newest added first (default)
|
||||
- `title ASC` - Title A-Z
|
||||
- `title DESC` - Title Z-A
|
||||
- `author ASC` - Author A-Z
|
||||
- `author DESC` - Author Z-A
|
||||
- `series ASC` - Series order
|
||||
- `series DESC` - Series reverse order
|
||||
- `date_published ASC` - Oldest published first
|
||||
- `date_published DESC` - Newest published first
|
||||
- `copyright_year ASC` - Oldest copyright first
|
||||
- `copyright_year DESC` - Newest copyright first
|
||||
- `page_count ASC` - Shortest first
|
||||
- `page_count DESC` - Longest first
|
||||
- `tags ASC` - Genre A-Z
|
||||
- `tags DESC` - Genre Z-A
|
||||
- `limit` (integer, optional): Number of items to return (default: 50, max: 1000)
|
||||
- `offset` (integer, optional): Number of items to skip (default: 0)
|
||||
|
||||
**Response:** Object containing array of media items
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
- 400: Bad request (invalid parameters)
|
||||
- 401: Unauthorized
|
||||
- 500: Internal server error
|
||||
|
||||
**Examples:**
|
||||
- Sort by title: `/api/media-items?library_id=xxx&sort=title+ASC`
|
||||
- Sort by author descending: `/api/media-items?library_id=xxx&sort=author+DESC`
|
||||
- Sort by page count: `/api/media-items?library_id=xxx&sort=page_count+ASC`
|
||||
|
||||
**Sorting Behavior:**
|
||||
- All sorts are secondary-sorted by series_number then title for consistency
|
||||
- NULL values are sorted last for ascending, first for descending
|
||||
- Sorting is case-insensitive for text fields
|
||||
@@ -1,51 +0,0 @@
|
||||
info:
|
||||
name: List Media Items
|
||||
type: http
|
||||
seq: 1
|
||||
|
||||
http:
|
||||
method: GET
|
||||
url: "{{base_url}}/api/media-items?library_id={{library_id}}&limit=20&offset=0"
|
||||
headers:
|
||||
- name: ""
|
||||
value: application/json
|
||||
auth: inherit
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
## List Media Items
|
||||
|
||||
Retrieves a paginated list of media items from a specific library.
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Endpoint:** /api/media-items
|
||||
|
||||
**Authentication:** Required (Bearer token)
|
||||
|
||||
**Query Parameters:**
|
||||
- `library_id` (string, required): Library UUID to filter items
|
||||
- `limit` (number, optional): Number of results per page (default: 20, max: 100)
|
||||
- `offset` (number, optional): Pagination offset (default: 0)
|
||||
|
||||
**Response:** Array of media item objects
|
||||
- `id` (string): Media item UUID
|
||||
- `title` (string): Media item title
|
||||
- `library_id` (string): Library UUID
|
||||
- `media_type` (string): Type of media (e.g., "ebook", "audiobook")
|
||||
- `file_path` (string): Path to media file
|
||||
- `created_at` (string): Creation timestamp
|
||||
- `updated_at` (string): Last update timestamp
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
- 400: Invalid query parameters
|
||||
- 401: Unauthorized
|
||||
- 403: Forbidden (library access denied)
|
||||
- 404: Library not found
|
||||
- 500: Internal server error
|
||||
@@ -1,63 +0,0 @@
|
||||
info:
|
||||
name: Search Media Items
|
||||
type: http
|
||||
seq: 1
|
||||
|
||||
http:
|
||||
method: GET
|
||||
url: "{{base_url}}/api/media-items/search?q=harry"
|
||||
headers:
|
||||
- name: ""
|
||||
value: application/json
|
||||
auth: inherit
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
## Search Media Items
|
||||
|
||||
Performs a search across all visible media items using partial matching with fuzzy fallback.
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Endpoint:** /api/media-items/search
|
||||
|
||||
**Authentication:** Required (Bearer token)
|
||||
|
||||
**Query Parameters:**
|
||||
- `q` (string, required): Search query (minimum 2 characters)
|
||||
|
||||
**Search Behavior:**
|
||||
1. First performs case-insensitive partial matching across:
|
||||
- Title
|
||||
- Author
|
||||
- Series
|
||||
- Tags
|
||||
- Contributors
|
||||
2. If no results found, falls back to fuzzy search using word_similarity with 0.3 threshold
|
||||
|
||||
**Response:** Array of media item objects (same structure as List Media Items)
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success (results found)
|
||||
- 404: No results found
|
||||
- 400: Missing or invalid query parameter
|
||||
- 401: Unauthorized
|
||||
- 500: Internal server error
|
||||
|
||||
**Examples:**
|
||||
- Search by title: `q=harry potter`
|
||||
- Search by author: `q=king`
|
||||
- Fuzzy search: `q=hary poter` (will find "harry potter")
|
||||
|
||||
**Ranking:**
|
||||
Results are ranked by relevance:
|
||||
- Title matches: Highest priority
|
||||
- Author matches: High priority
|
||||
- Series matches: Medium priority
|
||||
- Tag matches: Lower priority
|
||||
- Fuzzy matches: Sorted by similarity score
|
||||
@@ -1,6 +0,0 @@
|
||||
info:
|
||||
name: scenarios
|
||||
type: folder
|
||||
seq: 20
|
||||
|
||||
request: {}
|
||||
Reference in new issue
Block a user