Skip to main content

Feature Flags

The FeatureFlagsController provides endpoints for managing feature flags that gate behavior across the platform β€” both in the Admin API and the frontend.

Endpoints​

EndpointMethodPurpose
/featureflagsGETList all feature flags
/featureflags/{id}GETGet a specific flag's current state
/featureflagsPOSTCreate a new feature flag
/featureflags/{id}PUTUpdate a flag (enable/disable, change config)
/featureflags/{id}DELETERemove a feature flag

How Flags Are Used​

Feature flags are stored in Cosmos DB and consumed by:

  1. Admin API β€” Backend logic checks flags before executing gated operations
  2. Frontend β€” The React SPA fetches flags at startup and gates UI features
  3. Image Acquisition Engine β€” Orchestration behavior can be modified by flags (e.g., enabling panoramic mode for specific cameras)

CQRS Handlers​

  • GetAllFeatureFlagsQuery β€” Returns all flags with their current states
  • GetFeatureFlagByIdQuery β€” Single flag lookup
  • CreateFeatureFlagCommand β€” Creates a new flag
  • UpdateFeatureFlagCommand β€” Toggles or updates flag configuration
  • DeleteFeatureFlagCommand β€” Removes a flag