API Overview
Base URL
Section titled “Base URL”All endpoints are prefixed with /api/.
http://localhost:8080/api/Authentication
Section titled “Authentication”Most endpoints require authentication. Two methods are accepted:
# Bearer token in Authorization headerAuthorization: Bearer <token>
# HttpOnly cookie (set by login endpoint)Cookie: rustyfile_token=<token>Public endpoints (no auth required): health check, setup status, login, logout.
Request format
Section titled “Request format”- Content-Type:
application/jsonfor JSON bodies - Content-Type:
application/offset+octet-streamfor TUS chunk uploads - Path parameters use URL-encoded segments
Response format
Section titled “Response format”All responses return JSON with consistent structure:
// Success{ "entries": [...], "total": 42, "truncated": false }
// Error{ "error": "Human-readable error message" }Endpoint groups
Section titled “Endpoint groups”| Group | Prefix | Auth Required | Description |
|---|---|---|---|
| Auth | /api/auth/ | Varies | Login, logout, token refresh |
| Setup | /api/setup/ | No | First-run admin creation |
| Filesystem | /api/fs/ | Yes | Browse, create, edit, delete, download, search |
| Uploads | /api/tus/ | Yes | TUS resumable upload protocol |
| Media | /api/thumbs/, /api/hls/ | Yes | Thumbnails, HLS streaming |
| Health | /api/health/ | No | Service health check |