Problem
FolderResource currently handles folder CRUD, uploads, upload status, recalculation, and recalculation status. As more endpoints are added (upload status tracking in #205, future view management), the resource class grows and mixes different concerns.
Proposal
Split into dedicated resource classes following REST noun-based organization:
FolderResource → /api/folder (CRUD, structure, dashboard)
UploadResource → /api/upload (upload action, status, changes)
RecalculationResource → /api/recalculation (trigger, status polling)
Current endpoints and proposed mapping
| Current path |
Current resource |
Proposed resource |
GET /api/folder |
FolderResource |
FolderResource |
POST /api/folder/{name} |
FolderResource |
FolderResource |
DELETE /api/folder/{name} |
FolderResource |
FolderResource |
GET /api/folder/dashboard |
FolderResource |
FolderResource |
GET /api/folder/{name}/structure |
FolderResource |
FolderResource |
GET /api/folder/{id}/labelValues |
FolderResource |
FolderResource |
POST /api/folder/{name}/upload |
FolderResource |
UploadResource (POST /api/upload/{folderName}) |
GET /api/folder/upload/{id}/status |
FolderResource |
UploadResource (GET /api/upload/{id}/status) |
POST /api/folder/{name}/recalculate |
FolderResource |
RecalculationResource (POST /api/recalculation/{folderName}) |
GET /api/folder/recalculation/{id} |
FolderResource |
RecalculationResource (GET /api/recalculation/{id}) |
Notes
- h5m is not in production, so path changes are acceptable
- The upload and recalculation actions could stay on FolderResource as aliases for backward compatibility during transition
- This is a pure refactoring — no behavior change
Problem
FolderResourcecurrently handles folder CRUD, uploads, upload status, recalculation, and recalculation status. As more endpoints are added (upload status tracking in #205, future view management), the resource class grows and mixes different concerns.Proposal
Split into dedicated resource classes following REST noun-based organization:
Current endpoints and proposed mapping
GET /api/folderPOST /api/folder/{name}DELETE /api/folder/{name}GET /api/folder/dashboardGET /api/folder/{name}/structureGET /api/folder/{id}/labelValuesPOST /api/folder/{name}/uploadPOST /api/upload/{folderName})GET /api/folder/upload/{id}/statusGET /api/upload/{id}/status)POST /api/folder/{name}/recalculatePOST /api/recalculation/{folderName})GET /api/folder/recalculation/{id}GET /api/recalculation/{id})Notes