Files
bookhoard/bruno/scanner/Start Watch Mode.bru
T
john-okeefe ba31e1491e refactor: update Bruno API collection for media-items system
- Remove all ebook-specific API requests (15 files deleted)
- Rename Scan Ebooks.bru to Scan Media Items.bru
- Update API paths from /api/ebooks to /api/media-items
- Update base URL and environment configuration
- Maintain all existing media-items, library, auth, and progress tests

Aligns Bruno collection with unified media-items API architecture
2026-01-30 13:52:06 -05:00

62 lines
1.5 KiB
Plaintext

meta {
name: Start Watch Mode
type: http
seq: 5
}
post {
url: {{base_url}}/api/scanner/watch/start
body: json
auth: inherit
}
body:json {
{
"library_id": "{{library_id}}"
}
}
docs {
## Start Watch Mode
Starts real-time file system monitoring for a specific library. New media items will be detected and processed almost instantly.
**Method:** POST
**Endpoint:** /api/scanner/watch/start
**Authentication:** Required (Bearer token, Admin only)
**Request Body:**
- `library_id` (string, required): UUID of the library to watch
- Example: `"550e8400-e29b-41d4-a716-446655440000"`
**Response:** HTTP 200 (OK)
```json
{
"message": "watch mode started for library",
"library_id": "550e8400-e29b-41d4-a716-446655440000"
}
```
**How it works:**
- Monitors all folders configured for the library
- Automatically detects new ebook files (CREATE events)
- Detects modifications to existing files (WRITE events)
- Processes new files within milliseconds of detection
- Automatically watches new subdirectories as they're created
**Supported file types:**
- `.epub`, `.pdf`, `.mobi`, `.azw3`, `.fb2`, `.txt`
**Status Codes:**
- 200: Watch mode started successfully
- 400: Invalid request (missing library_id)
- 401: Unauthorized
- 403: Forbidden (admin access required)
- 409: Already watching this library
- 500: Failed to start watch mode (no folders configured, etc.)
**Note:** Watch mode is automatically started for all libraries when the server starts.
}