docs(media-items): Work Order 3 batch 3b — management endpoints (8)
New frontmatter'd docs:
- download (ServeFile — raw bytes, family-lens enforced; corrects the old
download doc's claim that no download route is registered: ServeFile IS
routed, DownloadBook is the dead code)
- set_audio_speed (speed range 0.25-4.0, NaN/Inf rejected)
- rescan (abridged example over the full 70+-column row; write-after-success
guarantee noted)
- purge-archived (destructive, admin), unarchive (204), merge (SHA-256
precondition, per-user collisions keep active copy)
- facets (two modes: facet+values, field autocomplete counts)
- filter_count (family lens)
Registry: RawMessage pins for map/abridged responses; Schema{} for non-JSON
body routes (download = raw bytes; unarchive = 204). Audit now:
missing docs down to ~55 (from 112), 0 orphans.
This commit is contained in:
1 parent
ed0ce5d077
commit
4a6fb033cb
9 files changed
+307
No files matched your search
@@ -0,0 +1,29 @@
|
||||
---
|
||||
method: POST
|
||||
path: /api/media-items/purge-archived
|
||||
auth: jwt+admin
|
||||
area: media-items
|
||||
---
|
||||
<!-- source: internal/handlers/media.go:1747 MediaHandler.PurgeArchivedMediaItems -->
|
||||
|
||||
# Purge Archived Media Items
|
||||
|
||||
**Admin only.** Permanently deletes ALL archived media items and their
|
||||
cover files. This is destructive — archived rows hold no reading data merge
|
||||
path (use [Merge Archived Media Item](merge_archived_media_item.md) per item
|
||||
first if reading history should survive).
|
||||
|
||||
## Example response
|
||||
|
||||
```json example-response
|
||||
{
|
||||
"purged": 3
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Body | When |
|
||||
| ------ | ---- | ---- |
|
||||
| 403 | `{"error": "admin access required"}` | not an admin |
|
||||
| 500 | `{"error": "..."}` | unexpected server error |
|
||||
Reference in new issue
Block a user