Files
bookhoard/bruno/koreader/Sync Progress (SHA-256 Only).bru
T
john-okeefe 3117ce54ec refactor(bruno): migrate API tests to Bruno DSL format
- Convert all existing .bru files from JSON to Bruno DSL format
- Remove obsolete files (conflicts/api.bru, kobo/Kobo Initialization.bru)
- Update auth configuration to use 'inherit' instead of explicit bearer tokens
- Add comprehensive documentation to all test files
- Improve test scripts with proper assertions and error handling
2026-02-08 20:49:06 -05:00

77 lines
1.7 KiB
Plaintext

meta {
name: KOReader Sync Progress - SHA-256 Only
type: http
seq: 2
}
post {
url: {{base_url}}/api/v1/koreader/sync/progress
body: json
auth: inherit
}
headers {
Authorization: Bearer {{koreader_device_token}}
Content-Type: application/json
}
body:json {
{
"sync_mode": "immediate",
"books": [
{
"sha256": "{{book_sha256}}",
"file_path": "/mnt/onboard/Unknown%20Book.epub",
"percentage": 0.45,
"page": 89,
"total_pages": 200
}
]
}
}
script:post-response {
function onResponse(res) {
tests('Status is 200 or 202', res.getStatus() === 200 || res.getStatus() === 202);
}
onResponse(res);
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## KOReader Sync Progress - SHA-256 Only
Synchronizes reading progress using only SHA-256 hash for book identification (when UUID is not available).
**Method:** POST
**Endpoint:** /api/v1/koreader/sync/progress
**Authentication:** Bearer token (KOReader device token)
**Request Body:**
- `sync_mode` (string): Sync mode (immediate, deferred)
- `books` (array): Array of book progress objects
- `sha256` (string): SHA-256 hash of book file
- `file_path` (string): Path to book file
- `percentage` (number): Progress percentage
- `page` (number): Current page
- `total_pages` (number): Total pages
**Response:**
- `sync_status` (string): Sync status
- `books_synced` (number): Number of books synced
**Status Codes:**
- 200: Success
- 202: Accepted
- 401: Unauthorized
- 500: Internal server error
**Note:** Use this when book UUID is not available, falling back to SHA-256 hash for identification.
}