From d301d758176f1b4528e73a5a0bcbabbc88622b87 Mon Sep 17 00:00:00 2001 From: ivaosthu Date: Sat, 17 Dec 2016 13:03:31 +0100 Subject: [PATCH] Updated strategy-api documentation --- docs/api/strategies-api.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/api/strategies-api.md b/docs/api/strategies-api.md index 906996cbbf..862e024973 100644 --- a/docs/api/strategies-api.md +++ b/docs/api/strategies-api.md @@ -76,4 +76,35 @@ Used to fetch all defined strategies and their defined paramters. }, ``` -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. \ No newline at end of file +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. + + +### Update strategy + +`PUT: http://unleash.host.com/api/strategies/:name` + +**Body** + +```json +{ + "name": "gradualRollout", + "description": "Gradual rollout to logged in users with updated desc", + "parameters": [ + { + "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 update a Strategy definition. Name can't be changed. +**PS! I can be dangerous to change a implemnted strategy as the implementation also might need to be changed**