summaryrefslogtreecommitdiff
path: root/doc/api/features.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 14:34:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 14:34:42 +0000
commit9f46488805e86b1bc341ea1620b866016c2ce5ed (patch)
treef9748c7e287041e37d6da49e0a29c9511dc34768 /doc/api/features.md
parentdfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff)
downloadgitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'doc/api/features.md')
-rw-r--r--doc/api/features.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/api/features.md b/doc/api/features.md
index a43f2daa93f..03f1663b987 100644
--- a/doc/api/features.md
+++ b/doc/api/features.md
@@ -1,5 +1,7 @@
# Features flags API
+This API is for managing Flipper-based [feature flags used in development of GitLab](../development/feature_flags/index.md).
+
All methods require administrator authorization.
Notice that currently the API only supports boolean and percentage-of-time gate
@@ -32,6 +34,16 @@ Example response:
]
},
{
+ "name": "my_user_feature",
+ "state": "on",
+ "gates": [
+ {
+ "key": "percentage_of_actors",
+ "value": 34
+ }
+ ]
+ },
+ {
"name": "new_library",
"state": "on",
"gates": [
@@ -58,6 +70,7 @@ POST /features/:name
| --------- | ---- | -------- | ----------- |
| `name` | string | yes | Name of the feature to create or update |
| `value` | integer/string | yes | `true` or `false` to enable/disable, or an integer for percentage of time |
+| `key` | string | no | `percentage_of_actors` or `percentage_of_time` (default) |
| `feature_group` | string | no | A Feature group name |
| `user` | string | no | A GitLab username |
| `group` | string | no | A GitLab group's path, for example `gitlab-org` |
@@ -89,6 +102,37 @@ Example response:
}
```
+### Set percentage of actors rollout
+
+Rollout to percentage of actors.
+
+```plaintext
+POST https://gitlab.example.com/api/v4/features/my_user_feature?private_token=<your_access_token>
+Content-Type: application/x-www-form-urlencoded
+value=42&key=percentage_of_actors&
+```
+
+Example response:
+
+```json
+{
+ "name": "my_user_feature",
+ "state": "conditional",
+ "gates": [
+ {
+ "key": "boolean",
+ "value": false
+ },
+ {
+ "key": "percentage_of_actors",
+ "value": 42
+ }
+ ]
+}
+```
+
+Rolls out the `my_user_feature` to `42%` of actors.
+
## Delete a feature
Removes a feature gate. Response is equal when the gate exists, or doesn't.