API Interface (Swagger)
The server exposes complete OpenAPI documentation (Swagger) that allows you to view all endpoints, parameters, request bodies, and responses.
Accessing the Documentation
When the server runs in development (or Staging) environment, the documentation is available at:
http://localhost:5000/api/docs
API Structure
The API is divided by modules (Tags):
Core
- Auth: Login, registration, token refresh, 2FA (TOTP setup/verify), password reset.
- Users: User CRUD, profile, role assignment.
Synagogue Domain
- Tfila Times: Prayer times management.
- General Messages: System-wide messages.
- Hanzch / Shior / Olie Latora: Memorial, class, and Torah reading management.
- Screen Timers: Display timer configuration.
- Zmanim: Halachic times calculation.
- Aliya Notifications: Torah reading call alerts.
- Daily Content Preferences: Per-tenant content configuration.
- Holiday Times: Holiday-specific schedules.
Devices
- Devices: Device CRUD, status, registration.
- Device Configurations: Per-device display settings.
- Device Metrics / Monitoring: Telemetry and health data.
- Device Settings: Device preferences.
- Device Certificates: mTLS certificate management.
- Remote Control: Real-time device control via MQTT.
- Remote Installations: App deployment to devices.
- Screenshots: On-demand screen capture.
- Screen Streaming: WebRTC signaling for live view.
- Software Updates: OTA update deployment and tracking.
Communication
- Notifications: Push notification management.
- WhatsApp: WhatsApp messaging, auto-response rules, contact aliases.
- Email Config: SMTP configuration (Nodemailer).
- SMS Config: SMS provider settings (Twilio/AWS SNS).
- Webhooks: Webhook endpoint management and delivery logs.
Real-time
- MQTT Control: Device command dispatch.
- MQTT Topics: Topic management.
- WebSocket Management: Connection monitoring, room management.
- Events: Server-sent event subscriptions.
AI & Analytics
- AI: AI-powered insights and recommendations.
- ML Prediction: Trained model management.
- Pattern Detection / Anomaly Detection: Behavioral analysis.
- Predictive Analytics: Trend forecasting.
- Analytics / Advanced Analytics: Usage statistics and BI.
- Advanced Reports: Custom report generation.
System
- Admin: System administration.
- Audit: Audit log queries.
- Dashboard: Overview statistics.
- Health: System health checks.
- Maintenance / Cleanup: Scheduled maintenance tasks.
- License: License validation.
- Security: Security incidents and events.
- Performance / Telemetry: System metrics.
- System Configuration: Runtime config management.
- Software Updates (System): Update package management.
Automation
- Alert Rules: Threshold-based alert configuration.
- Batch Commands: Multi-device command execution.
- Commands: Single-device command history.
Storage
- Upload Assets: File upload and management.
- Network Topology: Device network visualization.
Authentication
Most endpoints require authentication using a Bearer Token.
- Perform Login in Swagger (
/auth/loginendpoint). - Copy the received
accessToken. - Click the Authorize button at the top of the Swagger page.
- Enter the token in format:
Bearer <Your-Token>. - You can now make requests from the interface.
Admin Impersonation in API
Administrators can make calls on behalf of another user by adding a Header:
x-customer-context:<Target-User-ID>
(This option is available in some endpoints through Swagger if configured).