Skip to main content

Update a strategy type

PUT 

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

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

Request

Path Parameters

    name stringrequired

Bodyrequired

updateStrategySchema

    descriptionstring

    A description of the strategy type.

    Example: Enable the feature for users who have not logged in before.
    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 [
  • namestringrequired

    The name of the parameter

    Example: Rollout percentage
    typestringrequired

    The type of the parameter

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

    Example: percentage
    descriptionstring

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

    Example: How many percent of users should see this feature?
    requiredboolean

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

    Example: false
  • ]

Responses

This response has no body.

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L -X PUT '<your-unleash-url>/api/admin/strategies/:name' \
-H 'Content-Type: application/json' \
-H 'Authorization: <Authorization>' \
-d '{
"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
}
]
}'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Parameters
— pathrequired
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
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!