Skip to main content

Update strategy segments

POST 

<your-unleash-url>/api/admin/segments/strategies

Sets the segments of the strategy specified to be exactly the ones passed in the payload. Any segments that were used by the strategy before will be removed if they are not in the provided list of segments.

Request

Responses

The resource was successfully created.
Response Headers
  • location string
    The location of the newly created resource.

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L '<your-unleash-url>/api/admin/segments/strategies' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
-d '{
"projectId": "red-vista",
"strategyId": "15d1e20b-6310-4e17-a0c2-9fb84de3053a",
"environmentId": "development",
"segmentIds": [
1,
5,
6
]
}'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Body required
{
  "projectId": "red-vista",
  "strategyId": "15d1e20b-6310-4e17-a0c2-9fb84de3053a",
  "environmentId": "development",
  "segmentIds": [
    1,
    5,
    6
  ]
}
ResponseClear

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