docs(analytics,jobs): Work Order 3 batch 4 — device usage, popular books, job create/status
DeviceUsageResponse / PopularBooksResponse / services.JobResult pinned by type; jobs create uses an inline anonymous request struct (RawMessage pin). Two UNVERIFIED markers recorded (analytics date-range params, facet value element shape).
This commit is contained in:
1 parent
4a6fb033cb
commit
7471ca99e8
5 files changed
+169
No files matched your search
@@ -0,0 +1,40 @@
|
||||
---
|
||||
method: GET
|
||||
path: /api/analytics/device-usage
|
||||
auth: jwt
|
||||
area: analytics
|
||||
---
|
||||
<!-- source: internal/handlers/analytics.go DeviceUsageResponse / GetDeviceUsage -->
|
||||
|
||||
# Get Device Usage
|
||||
|
||||
Per-device sync activity for the signed-in user.
|
||||
|
||||
## Example response
|
||||
|
||||
```json example-response
|
||||
{
|
||||
"devices": [
|
||||
{
|
||||
"device_id": "550e8400-e29b-41d4-a716-446655440000",
|
||||
"device_name": "Kobo Clara",
|
||||
"device_type": "kobo",
|
||||
"sync_count": 42,
|
||||
"last_sync": "2026-10-24T13:57:01Z",
|
||||
"total_time_seconds": 3600,
|
||||
"total_time_minutes": 60
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Query parameters
|
||||
|
||||
UNVERIFIED: accepts the standard analytics date-range params; confirm exact
|
||||
names before relying on them.
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Body | When |
|
||||
| ------ | ---- | ---- |
|
||||
| 500 | `{"error": "..."}` | unexpected server error |
|
||||
Reference in new issue
Block a user