mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
1.1 KiB
1.1 KiB
Strategies API
Fetch Strategies
GET: http://unleash.host.com/api/strategies
Used to fetch all defined strategies and their defined paramters.
Response
{
"version": 1,
"strategies": [
{
"name": "default",
"description": "Default on/off strategy.",
"parametersTemplate": null
},
{
"name": "ActiveForUserWithEmail",
"description": "A comma separated list of email adresses this feature should be active for.",
"parametersTemplate": {
"emails": "string"
}
},
{
"name": "Accounts",
"description": "Enable for user accounts",
"parametersTemplate": {
"Accountname": "string"
}
}
]}
Create strategy
POST: http://unleash.host.com/api/strategies
Body
{
"name": "ActiveForUserWithEmail",
"description": "A comma separated list of email adresses this feature should be active for.",
"parametersTemplate": {
"emails": "string"
}
}
Used to create a new Strategy. Name must be unique.