-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
github-actions[bot] edited this page Apr 9, 2026
·
25 revisions
all API routes live under /api/* and are handled by PHP.
- returns
{ isAdmin: boolean } - refreshes frontend admin awareness for maintenance-mode bypass logic
GET
- requires logged-in user
- returns current settings from
data/accounts/accounts.json - currently exposes
glowIntensity,colors, andmobileFriendlyView
POST
- requires logged-in user
- updates user settings in
accounts.json - can set
mobileFriendlyViewand sync themobile_friendly_viewcookie - validates color fields as
#RRGGBB - admin users can also toggle maintenance mode through the settings flow
POST only.
- requires logged-in user for server persistence
- supports single toggle via
postId - supports full replacement via
bookmarks - writes normalized bookmark ids back to
accounts.json - anonymous bookmarking is handled client-side in localStorage instead
- returns parsed feed post JSON for a supplied
?id=
- admin-only image deletion from
data/images - validates filename/path and allowed image extensions
- writes newsletter HTML to
data/newsletter/{id}.html - this is the real publish endpoint, not an
/email/*route
- admin-only sitemap generator
- scans routes and content files
- writes
/sitemap.xml
- reads
data/etc/toast.json - returns bot and stream status payload for UI consumers
POST JSON payload with stream info.
- updates stream URL and name in
data/etc/toast.json - writes a stream update signal for downstream consumers
POST JSON payload with bot status.
- updates bot online/offline state in
data/etc/toast.json
- same-origin proxy for stream audio playback
- host-restricted based on configured stream host
- used by toast playback UI
POST JSON payload with { path }.
- normalizes route path
- rejects
/api/*paths - hashes client IP before storage
- updates
data/etc/page_views.json - returns updated page count
- returns CPU, memory, and disk usage data
- includes Linux and Windows code paths
- most endpoints return JSON and perform direct file IO
- write-heavy endpoints should be treated carefully because there is no database transaction safety blanket here
-
/api/page-viewalready uses file locking, which is the sane move