Skip to content

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

Edited by Shinya Maeda