1.6 KiB
1.6 KiB
API Contracts: File Storage Management & UI
Endpoints
GET /api/storage/files
List all files in the storage system.
Query Parameters:
category(optional): Filter by category (backuporrepository).
Response:
200 OK: List ofStoredFileobjects.
[
{
"name": "dashboard_backup_20260124.zip",
"path": "backups/dashboard_backup_20260124.zip",
"size": 102400,
"created_at": "2026-01-24T12:00:00Z",
"category": "backup",
"mime_type": "application/zip"
}
]
POST /api/storage/upload
Upload a file to the storage system.
Form Data:
file: The file content.category: Target category (backuporrepository).
Response:
201 Created: The uploadedStoredFileobject.400 Bad Request: Invalid category or file.
DELETE /api/storage/files/{category}/{filename}
Delete a file from storage.
Path Parameters:
category:backuporrepository.filename: Name of the file to delete.
Response:
204 No Content: File deleted successfully.404 Not Found: File does not exist.
GET /api/storage/download/{category}/{filename}
Download a file.
Path Parameters:
category:backuporrepository.filename: Name of the file to download.
Response:
200 OK: File stream.404 Not Found: File does not exist.
GET /api/settings/storage
Get current storage configuration.
Response:
200 OK:StorageConfigobject.
PUT /api/settings/storage
Update storage configuration.
Body:
StorageConfigobject.
Response:
200 OK: UpdatedStorageConfig.400 Bad Request: Invalid path or not writable.