docs(scanner): update Bruno requests for new scanner endpoints
- Update Scan Ebooks.bru to reflect async background scanning - Add Get Scan Status.bru for checking job progress - Add Start Watch Mode.bru for instant file monitoring - Add Stop Watch Mode.bru for stopping library monitoring - Add Get Watch Mode Status.bru for checking watched libraries - Document all new endpoints with examples and status codes
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
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 ebooks 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.
|
||||
}
|
||||
Reference in New Issue
Block a user