Files
RenewCMS/docs/design/routes.md
T

2.7 KiB

Routes

Route Screen Query API
/settings Settings (Version, Media card, Media cleanup, Retention) none GET/PATCH /v1/media/purge-settings, GET/PATCH /v1/settings
/settings/media/variants Image variants (admin) none GET/PATCH/DELETE /v1/image-variants, POST /v1/image-variants/{name}/purge
/settings/media/cache Cache (admin) none GET /v1/image-variants/cache, POST /v1/image-variants/cache/purge {scope: all
/media Media library filter, sort GET /v1/media?variants=with
/media (detail) Variants tab none GET /v1/media/{id}/variants, POST and DELETE /v1/media/{id}/variants/{name}
/articles Articles list page, size, tab, q GET /v1/article/?page=&size=&q=&status= (proposed: needs backend page, size and total in the response)
/activity Activity q, actor, category, outcome, security, range, from, to, page, size GET /v1/activity (page, size), GET /v1/activity/export (shipped, CSV)
/integration Integration none none
/integration/api-keys API keys none GET/POST /v1/api-key, DELETE /v1/api-key/{id}

Pagination in the URL (Articles)

/articles?page=2&size=50. Parameter names follow the repo (activity already uses page and size). Allowed sizes 5, 25, 50, 100. Defaults page=1, size=25, omitted from the URL when default. Changing search, tab, filter or size resets page to 1. page above the last page redirects (replace) to the last page and shows "That page doesn't exist. Showing the last page." An invalid size falls back to 25. Proposed, needs backend: GET /v1/article/ currently returns every article. It must accept page and size and return total (and the page) in the response.

Activity pagination

page and size, allowed sizes 5, 25, 50, 100, default 25 (as implemented).

Activity export

GET /v1/activity/export: implemented. CSV only, synchronous (one streamed download, no job, no progress, no later notification). Accepts the list filters q, actor, category, outcome, security, range, from, to. Owner and admin only; others get 403. "Export current view" calls it with the active filters. "Export all activity" calls it with no filters and an optional from/to range. JSON (format=json) is proposed: new backend feature.

Public image request

/media/photo.png?v=<variant-name>. Unknown or disabled variant: 400 { "status": 400, "error": "unknown_variant", "message": "Unknown variant", "detail": "<name>" }. Any other query parameter: 400 { "status": 400, "error": "unsupported_parameter", "message": "Unsupported parameter", "detail": "<parameter>" }. Missing source image: 404.