diff options
Diffstat (limited to 'doc/api/feature_flags.md')
-rw-r--r-- | doc/api/feature_flags.md | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/doc/api/feature_flags.md b/doc/api/feature_flags.md index d7bf4fe826e..824c892c17b 100644 --- a/doc/api/feature_flags.md +++ b/doc/api/feature_flags.md @@ -59,7 +59,8 @@ Example response: "id": 1, "environment_scope": "production" } - ] + ], + "user_list": null } ] }, @@ -81,7 +82,36 @@ Example response: "id": 2, "environment_scope": "staging" } - ] + ], + "user_list": null + } + ] + }, + { + "name":"user_list", + "description":"This feature is about user list", + "active": true, + "version": "new_version_flag", + "created_at":"2019-11-04T08:13:10.507Z", + "updated_at":"2019-11-04T08:13:10.507Z", + "scopes":[], + "strategies": [ + { + "id": 2, + "name": "gitlabUserList", + "parameters": {}, + "scopes": [ + { + "id": 2, + "environment_scope": "staging" + } + ], + "user_list": { + "id": 1, + "iid": 1, + "name": "My user list", + "user_xids": "user1,user2,user3" + } } ] } @@ -126,7 +156,8 @@ Example response: "id": 37, "environment_scope": "production" } - ] + ], + "user_list": null } ] } @@ -147,11 +178,12 @@ POST /projects/:id/feature_flags | `version` | string | yes | The version of the feature flag. Must be `new_version_flag`. Omit to create a Legacy feature flag. | | `description` | string | no | The description of the feature flag. | | `active` | boolean | no | The active state of the flag. Defaults to true. [Supported](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38350) in GitLab 13.3 and later. | -| `strategies` | JSON | no | The feature flag [strategies](../operations/feature_flags.md#feature-flag-strategies). | +| `strategies` | array of strategy JSON objects | no | The feature flag [strategies](../operations/feature_flags.md#feature-flag-strategies). | | `strategies:name` | JSON | no | The strategy name. Can be `default`, `gradualRolloutUserId`, `userWithId`, or `gitlabUserList`. In [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/36380) and later, can be [`flexibleRollout`](https://docs.getunleash.io/user_guide/activation_strategy/#gradual-rollout). | | `strategies:parameters` | JSON | no | The strategy parameters. | | `strategies:scopes` | JSON | no | The scopes for the strategy. | | `strategies:scopes:environment_scope` | string | no | The environment scope of the scope. | +| `strategies:user_list_id` | integer/string | no | The ID of the feature flag user list. If strategy is `gitlabUserList`. | ```shell curl "https://gitlab.example.com/api/v4/projects/1/feature_flags" \ @@ -208,7 +240,7 @@ PUT /projects/:id/feature_flags/:feature_flag_name | `description` | string | no | The description of the feature flag. | | `active` | boolean | no | The active state of the flag. [Supported](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38350) in GitLab 13.3 and later. | | `name` | string | no | The new name of the feature flag. [Supported](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38350) in GitLab 13.3 and later. | -| `strategies` | JSON | no | The feature flag [strategies](../operations/feature_flags.md#feature-flag-strategies). | +| `strategies` | array of strategy JSON objects | no | The feature flag [strategies](../operations/feature_flags.md#feature-flag-strategies). | | `strategies:id` | JSON | no | The feature flag strategy ID. | | `strategies:name` | JSON | no | The strategy name. | | `strategies:_destroy` | boolean | no | Delete the strategy when true. | @@ -217,6 +249,7 @@ PUT /projects/:id/feature_flags/:feature_flag_name | `strategies:scopes:id` | JSON | no | The environment scope ID. | | `strategies:scopes:environment_scope` | string | no | The environment scope of the scope. | | `strategies:scopes:_destroy` | boolean | no | Delete the scope when true. | +| `strategies:user_list_id` | integer/string | no | The ID of the feature flag user list. If strategy is `gitlabUserList`. | ```shell curl "https://gitlab.example.com/api/v4/projects/1/feature_flags/awesome_feature" \ |