Update value
PATCH/v1/settings/:settingKeyOrId/value
This endpoint updates the value of a Feature Flag or Setting
with a collection of JSON Patch operations in a specified Environment
identified by the SDK key passed in the X-CONFIGCAT-SDKKEY
header.
Only the value
, rolloutRules
and percentageRules
attributes are modifiable by this endpoint.
The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don't want to change. It supports collection reordering, so it also can be used for reordering the targeting rules of a Feature Flag or Setting.
For example: We have the following resource.
{
"rolloutPercentageItems": [
{
"percentage": 30,
"value": true
},
{
"percentage": 70,
"value": false
}
],
"rolloutRules": [],
"value": false
}
If we send an update request body as below:
[
{
"op": "replace",
"path": "/value",
"value": true
}
]
Only the default served value is going to be set to true
and all the Percentage Rules are remaining unchanged.
So we get a response like this:
{
"rolloutPercentageItems": [
{
"percentage": 30,
"value": true
},
{
"percentage": 70,
"value": false
}
],
"rolloutRules": [],
"value": true
}
Request
Path Parameters
The key or id of the Setting.
Query Parameters
The reason note for the Audit Log if the Product's "Config changes require a reason" preference is turned on.
Header Parameters
The ConfigCat SDK Key. (https://app.configcat.com/sdkkey)
- application/json
- text/json
- application/*+json
Body
required
Array [
]
Possible values: [unknown
, add
, remove
, replace
, move
, copy
, test
]
The JSON Patch operation. (https://jsonpatch.com)
Possible values: non-empty
The source path.
The target path.
The discrete value.
Body
required
Array [
]
Possible values: [unknown
, add
, remove
, replace
, move
, copy
, test
]
The JSON Patch operation. (https://jsonpatch.com)
Possible values: non-empty
The source path.
The target path.
The discrete value.
Body
required
Array [
]
Possible values: [unknown
, add
, remove
, replace
, move
, copy
, test
]
The JSON Patch operation. (https://jsonpatch.com)
Possible values: non-empty
The source path.
The target path.
The discrete value.
Responses
- 200
- 204
- 400
- 404
- 429
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Array [
]
Array [
]
Array [
]
rolloutRules
object[]
nullable
The targeting rule collection.
Possible values: <= 1000 characters
The user attribute to compare.
Possible values: [isOneOf
, isNotOneOf
, contains
, doesNotContain
, semVerIsOneOf
, semVerIsNotOneOf
, semVerLess
, semVerLessOrEquals
, semVerGreater
, semVerGreaterOrEquals
, numberEquals
, numberDoesNotEqual
, numberLess
, numberLessOrEquals
, numberGreater
, numberGreaterOrEquals
, sensitiveIsOneOf
, sensitiveIsNotOneOf
]
The value to compare against.
The value to serve when the comparison matches. It must respect the setting type.
Possible values: [isIn
, isNotIn
]
The segment comparison operator.
The segment to compare against.
rolloutPercentageItems
object[]
nullable
The percentage rule collection.
The percentage value for the rule.
The value to serve when the user falls in the percentage rule. It must respect the setting type.
The value to serve. It must respect the setting type.
setting
object
Metadata of a Feature Flag or Setting.
Identifier of the Feature Flag or Setting.
Key of the Feature Flag or Setting.
Name of the Feature Flag or Setting.
Description of the Feature Flag or Setting.
Possible values: [boolean
, string
, int
, double
]
The type of the Feature Flag or Setting.
The order of the Feature Flag or Setting represented on the ConfigCat Dashboard.
The creation time of the Feature Flag or Setting.
The user's email address who created the Feature Flag or Setting.
The user's name who created the Feature Flag or Setting.
The last updated date and time when the Feature Flag or Setting.
The email of the user who last updated the Feature Flag or Setting.
The name of the user who last updated the Feature Flag or Setting.
integrationLinks
object[]
nullable
The integration links attached to the Feature Flag or Setting.
Possible values: [trello
, jira
, monday
]
settingTags
object[]
nullable
The tags attached to the Feature Flag or Setting.
config
object
Details of the Config.
product
object
Details of the Product.
organization
object
Details of the Organization.
Identifier of the Organization.
Name of the Organization.
Identifier of the Product.
Name of the Product.
Description of the Product.
The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.
Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.
Identifier of the Config.
Name of the Config.
Description of the Config.
The order of the Config represented on the ConfigCat Dashboard.
Possible values: [v1
, v2
]
Determines the evaluation version of a Config.
Using v2
enables the new features of Config V2 (https://configcat.com/docs/advanced/config-v2).
environment
object
Details of the Environment.
product
object
Details of the Product.
organization
object
Details of the Organization.
Identifier of the Organization.
Name of the Organization.
Identifier of the Product.
Name of the Product.
Description of the Product.
The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.
Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.
Identifier of the Environment.
Name of the Environment.
The configured color of the Environment.
Description of the Environment.
The order of the Environment represented on the ConfigCat Dashboard.
Determines whether a mandatory reason must be given every time when the Feature Flags or Settings in the given Environment are saved.
featureFlagLimitations
object
Subscription limitations regarding Feature flag or Setting values and targeting.
Maximum number of percentage options a Feature Flag or Setting can have within a targeting rule.
Maximum number of targeting rules a Feature Flag or Setting can have.
Maximum length of a text comparison value.
Maximum item count of a list comparison value.
Maximum length of a list comparison value's item.
Maximum length of a text Setting's value.
Maximum number of AND
conditions a Feature Flag or Setting can have within a targeting rule.
{
"rolloutRules": [
{
"comparisonAttribute": "string",
"comparator": "isOneOf",
"comparisonValue": "string",
"segmentComparator": "isIn",
"segmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"rolloutPercentageItems": [
{
"percentage": 0
}
],
"setting": {
"settingId": 0,
"key": "string",
"name": "string",
"hint": "string",
"settingType": "boolean",
"order": 0,
"createdAt": "2024-07-29T15:51:28.071Z",
"creatorEmail": "string",
"creatorFullName": "string",
"isWatching": true
},
"updatedAt": "2024-07-29T15:51:28.071Z",
"lastUpdaterUserEmail": "string",
"lastUpdaterUserFullName": "string",
"integrationLinks": [
{
"key": "string",
"description": "string",
"integrationLinkType": "trello",
"url": "string"
}
],
"settingTags": [
{
"settingTagId": 0,
"tagId": 0,
"name": "string",
"color": "string"
}
],
"config": {
"product": {
"organization": {
"organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"order": 0,
"reasonRequired": true
},
"configId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"order": 0,
"migratedConfigId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"evaluationVersion": "v1"
},
"environment": {
"product": {
"organization": {
"organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"order": 0,
"reasonRequired": true
},
"environmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"color": "string",
"description": "string",
"order": 0,
"reasonRequired": true
},
"featureFlagLimitations": {
"maxPercentageOptionCount": 0,
"maxTargetingRuleCount": 0,
"maxComparisonValueLength": 0,
"maxComparisonValueListLength": 0,
"maxComparisonValueListItemLength": 0,
"maxStringFlagValueLength": 0,
"maxConditionPerTargetingRuleCount": 0
},
"readOnly": true
}
When no change applied on the resource.
Bad request.
Not found.
Too many requests. In case of the request rate exceeds the rate limits.