- 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)
63 lines
1.4 KiB
Plaintext
63 lines
1.4 KiB
Plaintext
meta {
|
|
name: Scan Media Items (Background)
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
post {
|
|
url: {{base_url}}/api/scanner/scan
|
|
body: json
|
|
auth: inherit
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"folder_paths": ["/path/to/media"]
|
|
}
|
|
}
|
|
|
|
docs {
|
|
## Scan Media Items (Background)
|
|
|
|
Triggers an asynchronous media items 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, Admin only)
|
|
|
|
**Request Body:**
|
|
- `folder_paths` (array of strings, required): List of folder paths to scan
|
|
- Example: `["/path/to/media", "/another/path"]`
|
|
|
|
**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:**
|
|
- 202: Scan job successfully enqueued
|
|
- 400: Invalid request (missing folder_paths)
|
|
- 401: Unauthorized
|
|
- 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.
|
|
}
|