Files
bookhoard/bruno/media-items/scenarios/List Media Items.yml
T
john-okeefe f859b2714d refactor(bruno): reorganize file structure from bruno-yaml to flat bruno directory
- Move all files from bruno-yaml/* to bruno/*
- Maintains existing directory structure within categories
- Updates bruno/user/auth files with OAuth2 refresh token flow
- Updates bruno/user/profile files for user profile management
- Adds bruno/dashboard/ directory with dashboard API tests
- Preserves all existing test scenarios and OpenCollection YAML format
- No functional changes - file reorganization only
2026-02-17 20:22:21 -05:00

50 lines
1.5 KiB
YAML

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'
auth: inherit
headers:
- key: Content-Type
value: application/json
runtime:
scripts:
- type: tests
code: "test_list_media_items_success(status, headers, body) {\n if (status\
\ !== 200) {\n throw new Error(\"Expected status 200, got \" + status);"
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