REST API Architecture
Overview
The REST API is the primary interface of Memesplora, providing complete file management, space management, and system administration functionality.
Base URL
http://localhost:5212/api/v3
Authentication
JWT Bearer Token (obtained after login).
Response Format
json
{"code": 0, "message": "success", "data": {}}API Endpoints
Auth
POST /api/v3/admin/login- Admin loginGET /api/v3/user/session- Get current session
Devices
GET /api/v3/device- List devicesGET /api/v3/device/:id- Get device detailsGET /api/v3/device/:id/health- Device health check
Spaces
GET /api/v3/space- List spacesPOST /api/v3/space- Create spaceGET /api/v3/space/:id- Get space detailsDELETE /api/v3/space/:id- Delete spacePOST /api/v3/space/:id/resize- Resize space
Files
GET /api/v3/space/:id/files- List filesPOST /api/v3/space/:id/files- Upload fileGET /api/v3/space/:id/files/:fileId- Download fileDELETE /api/v3/space/:id/files/:fileId- Delete filePOST /api/v3/space/:id/files/:fileId/rename- Rename filePOST /api/v3/space/:id/files/:fileId/move- Move filePOST /api/v3/space/:id/files/:fileId/copy- Copy filePOST /api/v3/space/:id/dirs- Create directory
Shares
POST /api/v3/share- Create share linkGET /api/v3/share/list- List sharesDELETE /api/v3/share/:id- Delete shareGET /api/v3/share/:key/download- Download via share key
Error Codes
| Code | Description |
|---|---|
| 0 | Success |
| 40001 | Invalid parameters |
| 40002 | Authentication failed |
| 40003 | Insufficient permissions |
| 40004 | Resource not found |
| 50001 | Internal server error |