FS Garage Utilisation (BE) API Reference
Authentication
PocketBase users + collection rules. Custom routes follow existing Garage auth patterns.
Base URL
http://127.0.0.1:8091
Target custom endpoints
| Method | Path | Hook | Purpose |
|---|---|---|---|
| POST | /api/allocations/copy-forward | allocations.pb.js | Draft next week from last published |
| POST | /api/allocations/publish | allocations.pb.js | Mark week rows published |
| POST | /api/utilisation/run | utilisation.pb.js | Pull TS + compute + upsert snapshot |
| GET | /api/utilisation/scorecard | utilisation.pb.js | Return snapshot + sparklines |
Also relevant existing pattern: GET /api/ceo-report in weekly_hook.pb.js.
Bridge IDs
| Garage field | Maps to |
|---|---|
users.timesheet_user_id | Timesheet user _id |
projects.timesheet_project_id | Timesheet project _id |
Error Responses
Return { error, code, details } per docs/UX.md.
Next Steps
- Full contracts: repo
docs/DESIGN.md,docs/DESIGN-calc.md - Architecture
- Getting Started