Environments
Get the environments available to a project
Changed onGets the environments that are available for this project. An environment is available for a project if enabled in the project configuration
get/api/admin/environments/project/{projectId}
Request
- Base URLhttps://app.unleash-instance.example.com
- URLhttps://app.unleash-instance.example.com/api/admin/environments/project/{projectId}
- Auth
- API key in header Authorization
- or HTTP bearer
Path parameters
projectIdstring required
Response
environmentsProjectSchema
Example response
{
"version": 1,
"environments": [
{
"name": "development",
"type": "production",
"enabled": true,
"sortOrder": 1,
"projectApiTokenCount": 5,
"projectEnabledToggleCount": 7,
"defaultStrategy": {
"id": "6b5157cb-343a-41e7-bfa3-7b4ec3044840",
"name": "flexibleRollout",
"title": "Gradual Rollout 25-Prod",
"featureName": "myAwesomeFeature",
"sortOrder": 9999,
"segments": [
1,
2
],
"constraints": [
{
"contextName": "appName",
"operator": "IN",
"values": [
"my-app",
"my-other-app"
],
"value": "my-app"
}
],
"variants": [
{
"name": "blue_group",
"weightType": "fix",
"stickiness": "custom.context.field",
"payload": {
"type": "json",
"value": "{\"color\": \"red\"}"
}
}
]
},
"visible": true,
"requiredApprovals": 3
}
]
}Changes
- 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
- warning
- warning
added the new
REGEXenum value to the/////response property for the response status
- warning