Files
bookhoard/bruno/scanner/Start Watch Mode.bru
T
john-okeefe 2d39b44f1f docs(bruno): update API test files for media terminology
- Rename ebook_id environment variable to media_item_id
- Update scanner endpoint example paths and documentation
- Update library endpoint documentation
- Keep library type 'ebooks' where appropriate (valid type value)
2026-02-08 14:33:28 -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 media 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.
}