Add public API for Feature Flags
Description
We have the Feature Flag feature, but users can manipulate entries on GUI only. They, especially automation engineers, would want to control it via Public API. This will also allow for automation.
Proposal
Add public API for Feature Flags
GET /api/:version/projects/:id/feature_flags(.:format) - Get all feature flags of a project
POST /api/:version/projects/:id/feature_flags(.:format) - Create a new feature flag
GET /api/:version/projects/:id/feature_flags/:name(.:format) - Get a feature flag of a project
DELETE /api/:version/projects/:id/feature_flags/:name(.:format) - Delete a feature flag
GET /api/:version/projects/:id/feature_flag_scopes(.:format) - Get all effective feature flags under the environment scope
GET /api/:version/projects/:id/feature_flags/:name/scopes(.:format) - Get all scopes of a feature flag
POST /api/:version/projects/:id/feature_flags/:name/scopes(.:format) - Create a new scope for a feature flag
GET /api/:version/projects/:id/feature_flags/:name/scopes/environment_scope(.:format) - Get a scope of a feature flag
PUT /api/:version/projects/:id/feature_flags/:name/scopes/environment_scope(.:format) - Update a scope of a feature flag
DELETE /api/:version/projects/:id/feature_flags/:name/scopes/environment_scope(.:format) - Delete a scope from a feature flag
The following endpoints are private at this moment, and follow-up in #34664 (closed).
POST /api/:version/projects/:id/feature_flags/:name/enable(.:format) - Enable a strategy of a feature flag for an environment
POST /api/:version/projects/:id/feature_flags/:name/disable(.:format) - Disable a strategy of a feature flag for an environment
TODO
-
FF CRD APIs !18198 (merged) -
FF enable/disable APIs !18368 (merged) -
FF scope APIs !18200 (merged) -
feature_flag_api
adjustment and Documentation => !19547 (merged) -
PUT /api/:version/projects/:id/feature_flags/:name/scopes/environment_scope(.:format) - Update a scope of a feature flag
=> !19677 (merged)