Stats docs written handler/service-first (summary/this-week/book-stats
new; library-usage frontmatter'd — its body was already accurate).
Registry: 4 entries on services.UserSummaryStats/WeekSummaryStats/
LibraryUsageStats/BookStats. Family-lens note: library-usage 403s an
explicit library_id outside the visible set (431fec0 rule).
UNVERIFIED sweep (7 -> 0), each resolved against the handler:
- device-usage takes NO date params; popular-books takes only ?limit
(the 'standard analytics date-range params' claim was wrong)
- link_book media_item_id: no validate tag but service-always-written
- push_stats book-ref field set documented (uuid/sha256/title/authors)
- filter_count: confirmed ParseMediaSearchParams machinery + 400 on bad
filter + 403 visibility
- facets values element shape pinned: {value, display?, count}
- get_config: dynamic key set IS the contract (reworded, no marker)
make test 9/9.
30 lines
839 B
Markdown
30 lines
839 B
Markdown
---
|
|
method: GET
|
|
path: /api/system/config
|
|
auth: jwt+admin
|
|
area: system
|
|
---
|
|
<!-- source: internal/handlers/sidecar.go:374 SidecarHandler.GetSystemConfiguration -->
|
|
|
|
# Get System Configuration
|
|
|
|
Returns all system-wide configuration key/value pairs (backed by the
|
|
`system_config` table).
|
|
|
|
## Example response
|
|
|
|
```json example-response
|
|
{
|
|
"base_url": "https://books.example.com",
|
|
"opds_base_url": "https://books.example.com/opds",
|
|
"api_base_url": "https://books.example.com/api"
|
|
}
|
|
```
|
|
|
|
The key set is admin-defined and intentionally open — the endpoint emits\nwhatever config keys exist in `system_settings`. Treat the shape as a\ndynamic string-keyed map; do not code against a fixed key list.
|
|
|
|
## Errors
|
|
|
|
| Status | Body | When |
|
|
| ------ | ---- | ---- |
|
|
| 500 | `{"error": "failed to fetch system config"}` | unexpected server error | |