Create or update a feature flag
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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The name of the feature flag
Request Body required
Section titled “ Request Body required ”object
percentage_of_actors or percentage_of_time (default)
A Feature group name
A GitLab username or comma-separated multiple usernames
A GitLab group’s path, for example gitlab-org, or comma-separated multiple group paths
A GitLab group or user namespace’s path, for example john-doe, or comma-separated multiple namespace paths. Introduced in GitLab 15.0.
A projects path, for example gitlab-org/gitlab-foss, or comma-separated multiple project paths
An organization ID or path, for example 1 or default, or comma-separated multiple organization IDs or paths
A repository path, for example gitlab-org/gitlab-test.git, gitlab-org/gitlab-test.wiki.git, snippets/21.git, to name a few. Use comma to separate multiple repository paths
A runner ID, or comma-separated list of runner IDs
A caller_id identifying a code path, for example GET /api/v4/projects/:id or ProjectsController#show. Use comma to separate multiple endpoint paths
Skip feature flag validation checks, such as a YAML definition
Example generated
{ "value": "example", "key": "example", "feature_group": "example", "user": "example", "group": "example", "namespace": "example", "project": "example", "organization": "example", "repository": "example", "runner": "example", "endpoint": "example", "force": true}Responses
Section titled “ Responses ”Created
object
object
object
Example
{ "name": "experimental_feature", "state": "off", "gates": { "key": "percentage_of_actors", "value": 34 }}Bad request
Unauthorized
Forbidden
Not Found