Segments
Create a new segment
Changed onCreates a new segment using the payload provided
post/api/admin/segments
Request
- Base URLhttps://app.unleash-instance.example.com
- URLhttps://app.unleash-instance.example.com/api/admin/segments
- Auth
- API key in header Authorization
- or HTTP bearer
Request body
Example request
{
"name": "beta-users",
"description": "Users willing to help us test and build new features.",
"project": "red-vista",
"constraints": [
{
"contextName": "appName",
"operator": "IN",
"values": [
"my-app",
"my-other-app"
],
"value": "my-app"
}
]
}Response
The resource was successfully created.
Example response
{
"id": 2,
"name": "ios-users",
"description": "IOS users segment",
"constraints": [
{
"contextName": "appName",
"operator": "IN",
"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"
}Changes
- breaking
the
//request property's minLength was increased from0to1 - warning
added the new
SEMVER_GTEenum value to the//response property for the response status - warning
added the new
SEMVER_LTEenum value to the//response property for the response status - info
added the new
SEMVER_GTEenum value to the request property// - info
added the new
SEMVER_LTEenum value to the request property//
- breaking
- warning
added the new
REGEXenum value to the//response property for the response status - info
added the new
REGEXenum value to the request property//
- warning