Features
Create (overwrite) variants for a feature flag in multiple environments
This overwrites the current variants for the feature flag in the :featureName parameter for the :environment parameter.
put/api/admin/projects/{projectId}/features/{featureName}/variants-batch
Path parameters
projectIdstring required
featureNamestring required
Request body
Example request
{
"variants": [
{
"name": "blue_group",
"weightType": "variable",
"stickiness": "custom.context.field",
"payload": {
"type": "json",
"value": "{\"color\": \"red\"}"
},
"overrides": [
{
"contextName": "userId",
"values": [
"red",
"blue"
]
}
]
}
]
}Response
featureVariantsSchema
Example response
{
"version": 1,
"variants": [
{
"name": "blue_group",
"weightType": "variable",
"stickiness": "custom.context.field",
"payload": {
"type": "json",
"value": "{\"color\": \"red\"}"
},
"overrides": [
{
"contextName": "userId",
"values": [
"red",
"blue"
]
}
]
}
]
}