Update a feature flag
PUT
/api/v4/projects/{id}/feature_flags/{feature_flag_name}
Updates a specified feature flag.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body
Section titled “ Request Body ” Media type application/json
object
name
The new name of the feature flag. Supported in GitLab 13.3 and later
string
description
The description of the feature flag
string
active
The active state of the flag. Supported in GitLab 13.3 and later
boolean
strategies
Array of feature flag strategies
Array<object>
object
id
The feature flag strategy ID
integer
name
The strategy name
string
parameters
The strategy parameters as a JSON-formatted string e.g. {"userIds":"user1"}
object
user_list_id
The ID of the feature flag user list
integer
_destroy
Delete the strategy when true
boolean
scopes
Array of scopes for the strategy
Array<object>
object
id
The scope id
integer
environment_scope
The environment scope of the scope
string
_destroy
Delete the scope when true
boolean
Example generated
{ "name": "example", "description": "example", "active": true, "strategies": [ { "id": 1, "name": "example", "parameters": {}, "user_list_id": 1, "_destroy": true, "scopes": [ { "id": 1, "environment_scope": "example", "_destroy": true } ] } ]}Responses
Section titled “ Responses ”OK
Media type application/json
object
name
string
description
string
active
boolean
version
string
created_at
string format: date-time
updated_at
string format: date-time
scopes
array
strategies
object
id
integer format: int64
name
string
parameters
string
scopes
object
id
integer format: int64
environment_scope
string
user_list
object
id
integer format: int64
iid
integer
name
string
user_xids
string
Example
{ "name": "merge_train", "description": "merge train feature flag", "version": "new_version_flag", "created_at": "2019-11-04T08:13:51.423Z", "updated_at": "2019-11-04T08:13:51.423Z", "strategies": { "id": 1, "name": "userWithId", "parameters": "{\"userIds\": \"user1\"}", "scopes": { "id": 1, "environment_scope": "production" }, "user_list": { "id": 1, "iid": 1, "name": "user_list", "user_xids": "user1,user2" } }}Bad Request
Unauthorized
Forbidden
Not found
Unprocessable entity