Skip to content

Api#55

Merged
TenathDilusha merged 2 commits into
mainfrom
api
May 11, 2026
Merged

Api#55
TenathDilusha merged 2 commits into
mainfrom
api

Conversation

@TenathDilusha
Copy link
Copy Markdown
Contributor

Implements all the API endpoints requested by the B3 (dashboard) team:

Section 3 — Alerts: POST /api/alerts/{id}/acknowledge, GET /api/alerts/history (severity / road_segment / type / camera_id / from/to filters), GET /api/alerts/export (streaming CSV).
Section 4 — Analytics: GET /api/analytics/metrics (avg score, peak-hour distribution, top 10 segments, incident pie), /compare, /report/pdf (ReportLab).
Section 5 — Dashboard + Map: GET /api/dashboard/{summary, events}, GET /api/map/{heatmap, incidents}.
Bonus — Camera registry: GET/POST/PUT/DELETE /api/admin/cameras (admin lat/lng + road_segment registry — needed before the map endpoints can return anything useful).
fix merge issues in #37

TenathDilusha and others added 2 commits May 11, 2026 18:52
Add alerts, analytics, dashboard/map, and admin camera CRUD updates with migration and endpoint tests to unblock PR #37 merge.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep api branch implementations for B3 endpoint files while integrating latest main changes to unblock merge.

Co-authored-by: Cursor <cursoragent@cursor.com>
@TenathDilusha TenathDilusha merged commit ab23f81 into main May 11, 2026
1 of 3 checks passed
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant