🚍 Go North East - Breakdown Guide API

Real-time breakdown management and fleet monitoring system

✅ API Online

📊 System Health

GET /health
API health check with MySQL connection status
GET /api/health
Alternative health check endpoint

🔓 Public Endpoints

These endpoints do not require authentication - designed for Control Room displays

GET /api/public/breakdowns/live
Get active breakdowns for public displays (Control Room)
GET /api/public/breakdowns/stats
Get breakdown statistics (query: ?period=today|week|month)
GET /api/public/activity/feed
Get activity feed (query: ?limit=25&offset=0)
GET /api/public/fleet
Get fleet database (all vehicles)

🔐 Authenticated Endpoints

These endpoints require JWT authentication token in Authorization header

🚨 Breakdowns

POST /api/breakdowns AUTH
Create new breakdown report
GET /api/breakdowns/live AUTH
Get live breakdowns for SDC Dashboard
GET /api/breakdowns/in-progress AUTH
Get breakdowns currently being assessed
GET /api/breakdowns/:id AUTH
Get specific breakdown by ID
PUT /api/breakdowns/:id AUTH
Update breakdown details
GET /api/breakdowns/stats AUTH
Get breakdown statistics

🚍 Fleet Management

GET /api/fleet/vehicles AUTH
Search fleet vehicles
GET /api/fleet/vehicle/:fleetNumber AUTH
Get specific vehicle details

👤 Authentication

POST /api/auth/login
Supervisor login (badge-based)
POST /api/auth/verify AUTH
Verify current session

🔧 Engineering

GET /api/engineering/depot-stats AUTH
Get depot statistics
GET /api/engineering/engineers AUTH
Get all engineers
POST /api/engineering/assign AUTH
Assign engineer to breakdown

📈 Analytics

GET /api/analytics/kpis AUTH
Key performance indicators
GET /api/analytics/trends AUTH
Performance trends over time
GET /api/analytics/depot-comparison AUTH
Compare depot performance

🔍 Fleet Intelligence / Defects

POST /api/defects/repeat AUTH
Identify vehicles with repeat defects
POST /api/defects/trends AUTH
Analyze trending defect types
GET /api/defects/depot-stats AUTH
Defect statistics by depot
GET /api/defects/predictive AUTH
Data-driven predictive maintenance alerts based on historical patterns
POST /api/defects/escalate AUTH
Escalate critical defects to management
POST /api/defects/report AUTH
Generate comprehensive defect analysis report
GET /api/defects/vehicle/:fleetNumber AUTH
Complete defect history for specific vehicle
POST /api/defects/notifications/maintenance AUTH
Send notification to maintenance team

🖥️ Display Control

GET /api/displays/active AUTH
Get list of active engineering displays
GET /api/displays/depot/:depot AUTH
Get displays for specific depot
POST /api/displays/control AUTH
Send control command to display(s)
POST /api/displays/:displayId/highlight AUTH
Highlight specific breakdown on display
POST /api/displays/:displayId/refresh AUTH
Force display to refresh data
PUT /api/displays/:displayId/filters AUTH
Update display filters remotely
PUT /api/displays/:displayId/depot AUTH
Change which depot display shows

📡 WebSocket Endpoints

WS ws://127.0.0.1:3001/ws/sdc-dashboard AUTH
Real-time SDC Dashboard updates (requires token in URL: ?token=...)
WS ws://127.0.0.1:3001/ws/control-room
Real-time Control Room display updates (public)
WS ws://127.0.0.1:3001/ws/engineering-display?displayId=yard1&depot=Washington
Engineering display connection with remote control support (public)