Skip to main content

Troubleshoot API

The Alert.CA.Infrastructure.TroubleshootAPI project is a standalone ASP.NET Core Web API that exposes all Infrastructure repositories and services through REST endpoints. It is used for development testing, troubleshooting, and operational diagnostics — it is not exposed to end users.

Architecture

Base Controller: ApiControllerBase

All controllers inherit from ApiControllerBase, which provides automatic audit logging via IAuditService. Each API call is recorded with the user identity, action, and request details.

Controllers

ControllerPurposeInfrastructure Dependencies
AcquisitionDeviceControllerManage acquisition device orchestration modesIAcquisitionDeviceRepository (Cosmos)
ActivityLogControllerQuery camera activity logsIActivityLogRepository (SQL)
AdminControllerAdministrative operationsMultiple repositories
AlertsControllerAlert management and testingIAlertService, IAlertMessageRepository
AuthorizationControllerOAuth2/CIAM authorization flowsIJWTService
BlobControllerBlob storage operationsISingleImageStorageRepository, IVideoStorageRepository, etc.
CameraMovementControllerCamera PTZ movement historyICameraMovementRepository (SQL)
CamerasControllerCamera CRUD (Cosmos static/operational)ICameraStaticRepository, ICameraOperationalRepository
CameraSqlControllerCamera RBAC assignments (SQL)ICameraSqlRepository (SQL)
CommunicationControllerEmail and SMS testingIEmailService, ISmsService
DurableEntityControllerDurable entity state managementIDurableEntityDataRepository (Table)
FeatureFlagControllerFeature flag CRUDIFeatureFlagRepository (SQL)
GraphControllerEntra ID user lookupsIGraphService
ImageMetadataControllerImage/video metadata queriesISingleImageMetadataRepository, IPanoImageMetadataRepository, etc. (Table)
LocationsControllerLocation management and geometry operationsILocationRepository, IGeometryService, ILocationService (SQL)
NotificationControllerNotification managementINotificationService, INotificationRepository
UserAgencySqlControllerUser and agency RBAC managementIUserAgencySqlRepository (SQL)
UserEntityControllerCosmos user entity managementIUserRepository (Cosmos)
CondorCameraEventControllerCondor AI camera event CRUD and queriesICondorCameraEventRepository (SQL)
CondorEventControllerCondor AI event entity CRUD (Cosmos)ICondorEventRepository (Cosmos)
COCODetectionControllerCOCO detection and annotation bulk insert testingICOCODetectionRepository, ICOCOAnnotationRepository (SQL)

Running Locally

The TroubleshootAPI connects to the same Azure services as the production applications via Azure App Configuration. Set the App Configuration endpoint in appsettings.Development.json:

{
"Endpoints": {
"AppConfig": "https://appcs-wfca-ca-config-alertca-dev-001.azconfig.io"
}
}

Launch with the Alert.CA.Infrastructure.TroubleshootAPI profile. Swagger UI is available at /swagger for interactive endpoint testing.