Import feature flags
POST<your-unleash-url>/api/admin/features-batch/import
Import feature flags into a specific project and environment.
Request
Responses
- 200
- 404
This response has no body.
The requested resource was not found.
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/features-batch/import' \
-H 'Content-Type: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
-d '{
"project": "My awesome project",
"environment": "development",
"data": {
"features": [
{
"name": "my-feature",
"description": "best feature ever",
"type": "release",
"project": "default",
"stale": false,
"impressionData": false,
"archived": false
}
],
"featureStrategies": [
{
"name": "flexibleRollout",
"id": "924974d7-8003-43ee-87eb-c5f887c06fd1",
"featureName": "my-feature",
"title": "Rollout 50%",
"parameters": {
"groupId": "default",
"rollout": "50",
"stickiness": "random"
},
"constraints": [],
"disabled": false,
"segments": [
1
]
}
],
"featureEnvironments": [
{
"enabled": true,
"featureName": "my-feature",
"environment": "development",
"variants": [
{
"name": "a",
"weight": 500,
"overrides": [],
"stickiness": "random",
"weightType": "variable"
},
{
"name": "b",
"weight": 500,
"overrides": [],
"stickiness": "random",
"weightType": "variable"
}
],
"name": "variant-testing"
}
],
"contextFields": [
{
"name": "appName",
"description": "Allows you to constrain on application name",
"stickiness": false,
"sortOrder": 2,
"legalValues": []
}
],
"featureTags": [
{
"featureName": "my-feature",
"tagType": "simple",
"tagValue": "user-facing"
}
],
"segments": [
{
"id": 1,
"name": "new-segment-name"
}
],
"tagTypes": [
{
"name": "simple",
"description": "Used to simplify filtering of features",
"icon": "#"
}
],
"dependencies": [
{
"feature": "child_feature",
"dependencies": [
{
"feature": "parent_feature",
"enabled": false,
"variants": [
"variantA",
"variantB"
]
}
]
}
]
}
}'
ResponseClear