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:
2026-01-29 09:50:46 -05:00
parent 799b640ddd
commit fc61b6de6e
5 changed files with 263 additions and 22 deletions
+33 -22
View File
@@ -1,5 +1,5 @@
meta {
name: Scan Ebooks
name: Scan Ebooks (Background)
type: http
seq: 1
}
@@ -15,37 +15,48 @@ settings {
timeout: 0
}
body:json {
{
"folder_paths": ["/path/to/ebooks"]
}
}
docs {
## Scan Ebooks
## Scan Ebooks (Background)
Triggers a scanning operation to discover and index ebook files in the library.
Triggers an asynchronous ebook scanning operation. The scan runs in the background and can be monitored using the job ID.
**Method:** POST
**Endpoint:** /api/scanner/scan
**Authentication:** Required (Bearer token)
**Authentication:** Required (Bearer token, Admin only)
**Request Body:** (optional)
- `library_id` (string, optional): Specific library ID to scan
- `scan_depth` (number, optional): Maximum directory depth to scan
- `file_types` (array, optional): File extensions to include
**Request Body:**
- `folder_paths` (array of strings, required): List of folder paths to scan
- Example: `["/path/to/ebooks", "/another/path"]`
**Response:**
- JSON object containing scan operation details
- `scan_id` (string): Unique scan operation identifier
- `status` (string): Scan status ("initiated", "running", "completed")
- `library_id` (string): Library being scanned
- `files_found` (number): Number of files discovered
- `files_processed` (number): Number of files processed
- `started_at` (string): Scan start timestamp
- `estimated_completion` (string): Estimated completion time
**Response:** HTTP 202 (Accepted)
```json
{
"message": "scan job enqueued",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending"
}
```
**Properties:**
- `message` (string): Confirmation message
- `job_id` (string): Unique job identifier for tracking progress
- `status` (string): Initial job status ("pending")
**Status Codes:**
- 200: Scan initiated successfully
- 400: Invalid request parameters
- 202: Scan job successfully enqueued
- 400: Invalid request (missing folder_paths)
- 401: Unauthorized
- 403: Forbidden (insufficient permissions)
- 409: Scan already in progress
- 500: Internal server error
- 403: Forbidden (admin access required)
- 500: Failed to enqueue scan job
**Next Steps:**
Use the returned `job_id` with `GET /api/scanner/status/:jobId` to check scan progress.
}