Get strategy segments
GET<your-unleash-url>/api/admin/segments/strategies/:strategyId
Retrieve all segments that are referenced by the specified strategy. Returns an empty list of segments if the strategy ID doesn't exist.
Request
Path Parameters
strategyId stringrequired
Responses
- 200
segmentsSchema
- application/json
- Schema
- Example (auto)
Schema
segments object[]
{
"segments": [
{
"id": 2,
"name": "ios-users",
"description": "IOS users segment",
"constraints": [
{
"contextName": "appName",
"operator": "IN",
"caseInsensitive": false,
"inverted": false,
"values": [
"my-app",
"my-other-app"
],
"value": "my-app"
}
],
"usedInFeatures": 3,
"usedInProjects": 2,
"project": "red-vista",
"createdBy": "someone@example.com",
"createdAt": "2023-04-12T11:13:31.960Z"
}
]
}
Authorization: Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L '<your-unleash-url>/api/admin/segments/strategies/:strategyId' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>'
ResponseClear