mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
Update strategy-api docs
This commit is contained in:
parent
9d1f1e5639
commit
cea7b45b1c
@ -12,25 +12,41 @@ Used to fetch all defined strategies and their defined paramters.
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"strategies": [
|
"strategies": [
|
||||||
{
|
{
|
||||||
"name": "default",
|
"name": "default",
|
||||||
"description": "Default on/off strategy.",
|
"description": "Default on/off strategy.",
|
||||||
"parametersTemplate": null
|
"parameters": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ActiveForUserWithEmail",
|
"name": "userWithId",
|
||||||
"description": "A comma separated list of email adresses this feature should be active for.",
|
"description": "Active for userId specified in the comma seperated 'userIds' parameter.",
|
||||||
"parametersTemplate": {
|
"parameters": [
|
||||||
"emails": "string"
|
{
|
||||||
}
|
"name": "userIds",
|
||||||
|
"type": "list",
|
||||||
|
"description": "List of unique userIds the feature should be active for.",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Accounts",
|
"name": "gradualRollout",
|
||||||
"description": "Enable for user accounts",
|
"description": "Gradual rollout to logged in users",
|
||||||
"parametersTemplate": {
|
"parameters": [
|
||||||
"Accountname": "string"
|
{
|
||||||
}
|
"name": "percentage",
|
||||||
}
|
"type": "percentage",
|
||||||
]}
|
"description": "How many percent should the new feature be active for.",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "group",
|
||||||
|
"type": "string",
|
||||||
|
"description": "Group key to use when hasing the userId. Makes sure that the same user get different value for different groups",
|
||||||
|
"required": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
]}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Create strategy
|
### Create strategy
|
||||||
@ -41,12 +57,23 @@ Used to fetch all defined strategies and their defined paramters.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name": "ActiveForUserWithEmail",
|
"name": "gradualRollout",
|
||||||
"description": "A comma separated list of email adresses this feature should be active for.",
|
"description": "Gradual rollout to logged in users",
|
||||||
"parametersTemplate": {
|
"parameters": [
|
||||||
"emails": "string"
|
{
|
||||||
}
|
"name": "percentage",
|
||||||
}
|
"type": "percentage",
|
||||||
|
"description": "How many percent should the new feature be active for.",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "group",
|
||||||
|
"type": "string",
|
||||||
|
"description": "Group key to use when hasing the userId. Makes sure that the same user get different value for different groups",
|
||||||
|
"required": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
Used to create a new Strategy. Name must be unique.
|
Used to create a new Strategy. Name is required and must be unique. It is also required to have a parameters array, but it can be empty.
|
Loading…
Reference in New Issue
Block a user