Skip to main content
POST
/
v1
/
flags
/
{flag}
/
variants
Create Variant
curl --request POST \
  --url https://flags.eu.confidence.dev/v1/flags/{flag}/variants \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "name": "<string>",
  "value": {},
  "createTime": {},
  "updateTime": {},
  "creator": "<string>",
  "updater": "<string>",
  "labels": [
    {}
  ],
  "description": "<string>",
  "imageUri": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

flag
string
required

Query Parameters

variantId
string

The ID to use for the variant, which will become the final component of the variant's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Body

application/json

The body is of type object.

Response

200 - application/json

OK

A possible named value the flag can assign.

name
string
required

The resource name of the variant. For example: flags/my-flag/variants/control

value
object
required

The value that this variant represents. A possibly nested json object.

createTime
object
required

Time when the flag was first created.

updateTime
object
required

Time when the flag was last updated.

creator
string
required

Reference to the identity that created this variant.

updater
string
required

Reference to the identity that last updated this variant.

labels
object[]

General set of labels for this resource.

description
string

A human-friendly description of the variant.

imageUri
string

An image URL or path for the variant.