Skip to main content

Update a strategy type

PUT <your-unleash-url>/api/admin/strategies/:name

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Updates the specified strategy type. Any properties not specified in the request body are left untouched.

Request

Path Parameters

  • name string required

Body

required

updateStrategySchema

  • description string

    A description of the strategy type.

  • parameters object[]required

    The parameter list lets you pass arguments to your custom activation strategy. These will be made available to your custom strategy implementation.

  • Array [
  • name string required

    The name of the parameter

  • type string required

    Possible values: [string, percentage, list, number, boolean]

  • description string

    A description of this strategy parameter. Use this to indicate to the users what the parameter does.

  • required boolean

    Whether this parameter must be configured when using the strategy. Defaults to false

  • ]
Responses

This response has no body.

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Request

Base URL
<your-unleash-url>
Security Scheme
apiKey
name — path required
Body required
{
"description": "Enable the feature for users who have not logged in before.",
"parameters": [
{
"name": "Rollout percentage",
"type": "percentage",
"description": "How many percent of users should see this feature?",
"required": false
}
]
}
curl / cURL
curl -L -X PUT '<your-unleash-url>/api/admin/strategies/:name' \
-H 'Content-Type: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
--data-raw '{
"description": "Enable the feature for users who have not logged in before.",
"parameters": [
{
"name": "Rollout percentage",
"type": "percentage",
"description": "How many percent of users should see this feature?",
"required": false
}
]
}'