Sign up and get started with Confidence today! Create your account
Sign up and get started with Confidence today! Create your account
Updates the flag. When updating a flag, all variants must match the schema, segments and variants referenced by rules must exist.
curl --request PATCH \
--url https://flags.eu.confidence.dev/v1/flags/{flag} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"schema": {
"schema": [
{}
]
},
"variants": [
{
"name": "<string>",
"value": {},
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"labels": [
{}
],
"description": "<string>",
"imageUri": "<string>"
}
],
"rules": [
{
"segment": "<string>",
"assignmentSpec": {
"bucketCount": {},
"assignments": [
{
"assignmentId": "<string>",
"fallthrough": {},
"clientDefault": {},
"bucketRanges": [
{
"lower": {},
"upper": {}
}
]
}
]
},
"usageMetadata": {
"resolveCount": 123,
"applyCount": 123,
"lastResolveTime": {},
"lastApplyTime": {},
"assignmentUsageMetadata": [
{
"assignmentId": "<string>",
"resolveCount": 123,
"applyCount": 123,
"lastApplyTime": {},
"emptyTargetingKeyCount": 123
}
]
},
"enabled": true,
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"name": "<string>",
"description": "<string>",
"targetingKeySelector": "<string>",
"environments": [
"<string>"
],
"labels": [
{}
],
"materializationSpec": {
"writeMaterialization": "<string>",
"readMaterialization": "<string>",
"mode": {
"materializationMustMatch": true,
"segmentTargetingCanBeIgnored": true
}
}
}
],
"clients": [
"<string>"
],
"labels": [
{}
],
"usageMetadata": {
"resolveCount": 123,
"lastResolveTime": {},
"lastApplyTime": {}
},
"owner": "<string>"
}
'{
"displayName": "<string>",
"state": "STATE_UNSPECIFIED",
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"name": "<string>",
"description": "<string>",
"schema": {
"schema": [
{}
]
},
"variants": [
{
"name": "<string>",
"value": {},
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"labels": [
{}
],
"description": "<string>",
"imageUri": "<string>"
}
],
"rules": [
{
"segment": "<string>",
"assignmentSpec": {
"bucketCount": {},
"assignments": [
{
"assignmentId": "<string>",
"variant": {
"variant": "<string>"
},
"fallthrough": {},
"clientDefault": {},
"bucketRanges": [
{
"lower": {},
"upper": {}
}
]
}
]
},
"usageMetadata": {
"resolveCount": 123,
"applyCount": 123,
"lastResolveTime": {},
"lastApplyTime": {},
"assignmentUsageMetadata": [
{
"assignmentId": "<string>",
"resolveCount": 123,
"applyCount": 123,
"lastApplyTime": {},
"emptyTargetingKeyCount": 123
}
]
},
"enabled": true,
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"name": "<string>",
"description": "<string>",
"targetingKeySelector": "<string>",
"environments": [
"<string>"
],
"labels": [
{}
],
"materializationSpec": {
"writeMaterialization": "<string>",
"readMaterialization": "<string>",
"mode": {
"materializationMustMatch": true,
"segmentTargetingCanBeIgnored": true
}
}
}
],
"clients": [
"<string>"
],
"archiveTime": {},
"labels": [
{}
],
"usageMetadata": {
"resolveCount": 123,
"lastResolveTime": {},
"lastApplyTime": {}
},
"owner": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://confidence.spotify.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The list of fields in Flag that you want to update e.g. 'rules', if empty all mutable properties are updated.
A description for the flag.
Schema for the value of each variant.
Show child attributes
Flag.Variant: List of variants for this flag. When a client resolves this flag, it will be assigned exactly one of the variants in this list along with its value.
Show child attributes
Flag.Rule: List of ordered rules that determines how entities are assigned to variants. When a client resolves this flag, each rule will be tried in order, the first rule that match, will provide a variant assignment. If not rule matches, no variant will be assigned.
Show child attributes
List of clients that this flag is enabled for.
General labels for this flag.
Show child attributes
Semi-realtime usage statistics for the flag.
Show child attributes
The owner of the resource. If not set will default to the creator.
Returns a Flag.
A flag controlling how entities are assigned variants.
The display name of the flag.
For example:
my-flag
The current state of the flag.
STATE_UNSPECIFIED, ACTIVE, ARCHIVED Time when the flag was first created.
Time when the flag was last updated.
Reference to the identity that created this flag.
Reference to the identity that last updated this flag.
The resource name of the flag.
For example:
flags/my-flag
A description for the flag.
Schema for the value of each variant.
Show child attributes
Flag.Variant: List of variants for this flag. When a client resolves this flag, it will be assigned exactly one of the variants in this list along with its value.
Show child attributes
Flag.Rule: List of ordered rules that determines how entities are assigned to variants. When a client resolves this flag, each rule will be tried in order, the first rule that match, will provide a variant assignment. If not rule matches, no variant will be assigned.
Show child attributes
List of clients that this flag is enabled for.
Time when the flag was archived.
General labels for this flag.
Show child attributes
Semi-realtime usage statistics for the flag.
Show child attributes
The owner of the resource. If not set will default to the creator.
Was this page helpful?
curl --request PATCH \
--url https://flags.eu.confidence.dev/v1/flags/{flag} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"schema": {
"schema": [
{}
]
},
"variants": [
{
"name": "<string>",
"value": {},
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"labels": [
{}
],
"description": "<string>",
"imageUri": "<string>"
}
],
"rules": [
{
"segment": "<string>",
"assignmentSpec": {
"bucketCount": {},
"assignments": [
{
"assignmentId": "<string>",
"fallthrough": {},
"clientDefault": {},
"bucketRanges": [
{
"lower": {},
"upper": {}
}
]
}
]
},
"usageMetadata": {
"resolveCount": 123,
"applyCount": 123,
"lastResolveTime": {},
"lastApplyTime": {},
"assignmentUsageMetadata": [
{
"assignmentId": "<string>",
"resolveCount": 123,
"applyCount": 123,
"lastApplyTime": {},
"emptyTargetingKeyCount": 123
}
]
},
"enabled": true,
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"name": "<string>",
"description": "<string>",
"targetingKeySelector": "<string>",
"environments": [
"<string>"
],
"labels": [
{}
],
"materializationSpec": {
"writeMaterialization": "<string>",
"readMaterialization": "<string>",
"mode": {
"materializationMustMatch": true,
"segmentTargetingCanBeIgnored": true
}
}
}
],
"clients": [
"<string>"
],
"labels": [
{}
],
"usageMetadata": {
"resolveCount": 123,
"lastResolveTime": {},
"lastApplyTime": {}
},
"owner": "<string>"
}
'{
"displayName": "<string>",
"state": "STATE_UNSPECIFIED",
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"name": "<string>",
"description": "<string>",
"schema": {
"schema": [
{}
]
},
"variants": [
{
"name": "<string>",
"value": {},
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"labels": [
{}
],
"description": "<string>",
"imageUri": "<string>"
}
],
"rules": [
{
"segment": "<string>",
"assignmentSpec": {
"bucketCount": {},
"assignments": [
{
"assignmentId": "<string>",
"variant": {
"variant": "<string>"
},
"fallthrough": {},
"clientDefault": {},
"bucketRanges": [
{
"lower": {},
"upper": {}
}
]
}
]
},
"usageMetadata": {
"resolveCount": 123,
"applyCount": 123,
"lastResolveTime": {},
"lastApplyTime": {},
"assignmentUsageMetadata": [
{
"assignmentId": "<string>",
"resolveCount": 123,
"applyCount": 123,
"lastApplyTime": {},
"emptyTargetingKeyCount": 123
}
]
},
"enabled": true,
"createTime": {},
"updateTime": {},
"creator": "<string>",
"updater": "<string>",
"name": "<string>",
"description": "<string>",
"targetingKeySelector": "<string>",
"environments": [
"<string>"
],
"labels": [
{}
],
"materializationSpec": {
"writeMaterialization": "<string>",
"readMaterialization": "<string>",
"mode": {
"materializationMustMatch": true,
"segmentTargetingCanBeIgnored": true
}
}
}
],
"clients": [
"<string>"
],
"archiveTime": {},
"labels": [
{}
],
"usageMetadata": {
"resolveCount": 123,
"lastResolveTime": {},
"lastApplyTime": {}
},
"owner": "<string>"
}