Skip to main content

Admin API

The Admin API (Alert.CA.Admin.API + Alert.CA.Admin.API.Application) is an ASP.NET Core 10 Web API that serves as the administrative control plane for the entire camera ecosystem. It provides RESTful endpoints for managing cameras, users, orchestrations, and system configuration.

Architecture​

Tech Stack​

ComponentTechnology
FrameworkASP.NET Core 10
AuthMicrosoft Identity Web (JWT Bearer)
CQRSMediatR
SerializationNewtonsoft.Json (camelCase)
API DocsSwashbuckle (Swagger/OpenAPI)
Health ChecksSQL Server, Cosmos DB, Blob Storage, Queue Storage
MonitoringApplication Insights
ConfigAzure App Configuration + Key Vault

Controllers​

ControllerResponsibility
DeviceConfigControllerCamera device configuration and credentials
ImageAcquisitionControllerOrchestration control β€” start, stop, redeploy
UserAgencyCameraControllerUser ↔ agency ↔ camera relationships
UserControllerUser CRUD and Cosmos DB sync
AxisCameraControllerDirect Axis camera operations (overlays, status)
FrontEndCamerasControllerPublic-facing camera config for the frontend
FeatureFlagsControllerFeature flag management
LocationsControllerLocation file uploads (up to 300 MB)
CameraEnvironmentControllerCamera environment configuration
DurableEntityControllerQuery and manage Durable Function entity state
FrontEndApiControllerProxy/integration with the Frontend API
AuthorizationControllerToken management and login redirect
ActivityLogControllerAudit trail viewing
HealthChecksControllerHealth check dashboard

Key Features​

  • CQRS with MediatR β€” All controller actions dispatch commands or queries through MediatR, keeping controllers thin
  • Automatic Audit Trail β€” AuditBehavior pipeline intercepts every IAuditCommand, captures HTTP context + user claims, and logs to the audit service
  • Role-Based Access β€” Admin.Global and Admin.ReadWrite roles via Microsoft Entra ID
  • Health Checks UI β€” /health endpoint reports status of all dependent services with a web dashboard
  • React SPA Hosting β€” The built React admin app is served as static files from the API
  • CORS β€” Configured for React dev server on localhost:3000

Documentation Sections​