Use this API to manage the Flipper-based feature flags used in the development of GitLab itself.
These endpoints support only boolean and percentage-of-time gate values, and require administrator authorization.
List all feature flags
GET /api/v4/features
Lists all feature flags for the instance.
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
401 | Unauthorized | — |
403 | Forbidden | — |
List all feature flag definitions
GET /api/v4/features/definitions
Lists all feature flag definitions.
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
401 | Unauthorized | — |
403 | Forbidden | — |
Create or update a feature flag
POST /api/v4/features/{name}
Creates or updates a feature flag value. If a feature with the given name doesn’t exist yet, the operation creates one. The value can be a boolean or an integer to indicate percentage of time.
Parameters
| Name | Type | Description |
|---|---|---|
namePath, | String | The name of the feature flag |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
endpoint | String | A caller_GET / or Projects.key |
feature_ | String | A Feature group name.key |
force | Boolean | Skip feature flag validation checks, |
group | String | A Gitgitlab-,key |
key | String | percentage_ or percentage_ (default).feature_,user,group,namespace,project,organization,repository,runner,endpoint |
namespace | String | A Gitjohn-,key |
organization | String | An organization ID or path,1 or default,key |
project | String | A projects path,gitlab-,key |
repository | String | A repository path,gitlab-,gitlab-,snippets/,key |
runner | String | A runner ID,key |
user | String | A Gitkey |
valueRequired | String or integer | true or false to enable/ |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
Delete a feature
DELETE /api/v4/features/{name}
Deletes a feature gate. Returns the same response if the feature gate does not exist.
Parameters
| Name | Type | Description |
|---|---|---|
namePath, | String | The name of the feature flag |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Resource deleted | — |
400 | Bad Request | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesFeature
| Property | Type | Description |
|---|---|---|
definition | APIEntities | — |
gates | APIEntities | — |
name | String | Example:experimental_ |
state | String | Example:off |
APIEntitiesFeatureDefinition
| Property | Type | Description |
|---|---|---|
default_ | Boolean | — |
feature_ | String | — |
group | String | — |
intended_ | String | — |
introduced_ | String | — |
log_ | Boolean | — |
milestone | String | — |
name | String | — |
rollout_ | String | — |
type | String | — |
APIEntitiesFeatureGate
| Property | Type | Description |
|---|---|---|
key | String | Example:percentage_ |
value | Integer | Example:34 |