Variants
Create Variant
Overview
OpenFeature Evaluation
Namespaces
Rollouts
Variants
Create Variant
POST
/
api
/
v1
/
namespaces
/
{namespaceKey}
/
flags
/
{flagKey}
/
variants
curl --request POST \
--url https://try.flipt.io/api/v1/namespaces/default/flags/{flagKey}/variants \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"key": "<key>",
"name": "<name>",
"description": "<description>",
"attachment": "<attachment>"
}'
{
"id": "<string>",
"flagKey": "<string>",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attachment": "<string>",
"namespaceKey": "<string>"
}
curl --request POST \
--url https://try.flipt.io/api/v1/namespaces/default/flags/{flagKey}/variants \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"key": "<key>",
"name": "<name>",
"description": "<description>",
"attachment": "<attachment>"
}'
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200 - application/json
OK
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://try.flipt.io/api/v1/namespaces/default/flags/{flagKey}/variants \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"key": "<key>",
"name": "<name>",
"description": "<description>",
"attachment": "<attachment>"
}'
{
"id": "<string>",
"flagKey": "<string>",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attachment": "<string>",
"namespaceKey": "<string>"
}