Commit 340e78b8 authored by Russell Dickenson's avatar Russell Dickenson

Merge branch 'aa-percentage-of-actors-rollout-on-chatops' into 'master'

Documentation for % of actors rollout

See merge request gitlab-org/gitlab!29697
parents 4c0f6a93 c1560c0b
...@@ -31,6 +31,16 @@ Example response: ...@@ -31,6 +31,16 @@ Example response:
} }
] ]
}, },
{
"name": "my_user_feature",
"state": "on",
"gates": [
{
"key": "percentage_of_actors",
"value": 34
}
]
},
{ {
"name": "new_library", "name": "new_library",
"state": "on", "state": "on",
...@@ -58,6 +68,7 @@ POST /features/:name ...@@ -58,6 +68,7 @@ POST /features/:name
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `name` | string | yes | Name of the feature to create or update | | `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 | | `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 | | `feature_group` | string | no | A Feature group name |
| `user` | string | no | A GitLab username | | `user` | string | no | A GitLab username |
| `group` | string | no | A GitLab group's path, for example `gitlab-org` | | `group` | string | no | A GitLab group's path, for example `gitlab-org` |
...@@ -89,6 +100,37 @@ Example response: ...@@ -89,6 +100,37 @@ Example response:
} }
``` ```
### Set percentage of actors rollout
Rollout to percentage of users.
```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_time",
"value": 42
}
]
}
```
Rolls out the `my_user_feature` to `42%` of users.
## Delete a feature ## Delete a feature
Removes a feature gate. Response is equal when the gate exists, or doesn't. Removes a feature gate. Response is equal when the gate exists, or doesn't.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment