Post values
POST/v2/configs/:configId/environments/:environmentId/values
This endpoint batch updates the Feature Flags and Settings of a Config identified by the configId
parameter
in a specified Environment identified by the environmentId
parameter.
Only those Feature Flags and Settings are updated which are part of the request, all the others are left untouched.
Important: As this endpoint is doing a complete replace on those Feature Flags and Settings, which are set in the request. It's important to set every other field that you don't want to change in its original state. Not listing a field means that it will reset.
For example: We have the following resource of a Feature Flag.
{
"settingFormulas": [
{
"defaultValue": {
"boolValue": false
},
"targetingRules": [
{
"conditions": [
{
"userCondition": {
"comparisonAttribute": "Email",
"comparator": "sensitiveTextEquals",
"comparisonValue": {
"stringValue": "[email protected]"
}
}
}
],
"percentageOptions": [],
"value": {
"boolValue": true
}
}
],
"settingId": 1
}
]
}
If we send a batch replace request body as below:
{
"updateFormulas": [
{
"defaultValue": {
"boolValue": false
},
"settingId": 1
}
]
}
Then besides that the default value is set to true
, all Targeting Rules of the related Feature Flag are deleted.
So we get a response like this:
{
"settingFormulas": [
{
"defaultValue": {
"boolValue": false
},
"targetingRules": [],
"setting":
{
"settingId": 1
}
}
]
}
Request
Path Parameters
The identifier of the Config.
The identifier of the Environment.
Query Parameters
The reason note for the Audit Log if the Product's "Config changes require a reason" preference is turned on.
- application/json
- text/json
- application/*+json
Body
required
Array [
Array [
-
User condition
-
Segment condition
-
Prerequisite flag condition
Array [
Array [
]
]
Array [
]
]
]
updateFormulas
object[]
nullable
Evaluation descriptors of each updated Feature Flag and Setting.
defaultValue
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
targetingRules
object[]
nullable
The targeting rules of the Feature Flag or Setting.
conditions
object[]
nullable
The list of conditions that are combined with logical AND operators.
It can be one of the following:
userCondition
object
Describes a condition that is based on user attributes.
Possible values: non-empty
and <= 1000 characters
The User Object attribute that the condition is based on. Can be "User ID", "Email", "Country" or any custom attribute.
Possible values: [isOneOf
, isNotOneOf
, containsAnyOf
, doesNotContainAnyOf
, semVerIsOneOf
, semVerIsNotOneOf
, semVerLess
, semVerLessOrEquals
, semVerGreater
, semVerGreaterOrEquals
, numberEquals
, numberDoesNotEqual
, numberLess
, numberLessOrEquals
, numberGreater
, numberGreaterOrEquals
, sensitiveIsOneOf
, sensitiveIsNotOneOf
, dateTimeBefore
, dateTimeAfter
, sensitiveTextEquals
, sensitiveTextDoesNotEqual
, sensitiveTextStartsWithAnyOf
, sensitiveTextNotStartsWithAnyOf
, sensitiveTextEndsWithAnyOf
, sensitiveTextNotEndsWithAnyOf
, sensitiveArrayContainsAnyOf
, sensitiveArrayDoesNotContainAnyOf
, textEquals
, textDoesNotEqual
, textStartsWithAnyOf
, textNotStartsWithAnyOf
, textEndsWithAnyOf
, textNotEndsWithAnyOf
, arrayContainsAnyOf
, arrayDoesNotContainAnyOf
]
The comparison operator which defines the relation between the comparison attribute and the comparison value.
comparisonValue
object
required
The value that the user object's attribute is compared to.
The string representation of the comparison value.
The number representation of the comparison value.
listValue
object[]
nullable
The list representation of the comparison value.
Possible values: non-empty
The actual comparison value.
Possible values: <= 1500 characters
An optional hint for the comparison value.
segmentCondition
object
Describes a condition that is based on a segment.
The segment's identifier.
Possible values: [isIn
, isNotIn
]
The segment comparison operator used during the evaluation process.
prerequisiteFlagCondition
object
Describes a condition that is based on a prerequisite flag.
The prerequisite flag's identifier.
Possible values: [equals
, doesNotEqual
]
Prerequisite flag comparison operator used during the evaluation process.
prerequisiteComparisonValue
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
percentageOptions
object[]
nullable
The percentage options from where the evaluation process will choose a value based on the flag's percentage evaluation attribute.
A number between 0 and 100 that represents a randomly allocated fraction of the users.
value
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
value
object
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
Possible values: <= 1000 characters
The user attribute used for percentage evaluation. If not set, it defaults to the Identifier
user object attribute.
The identifier of the feature flag or setting.
Body
required
Array [
Array [
-
User condition
-
Segment condition
-
Prerequisite flag condition
Array [
Array [
]
]
Array [
]
]
]
updateFormulas
object[]
nullable
Evaluation descriptors of each updated Feature Flag and Setting.
defaultValue
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
targetingRules
object[]
nullable
The targeting rules of the Feature Flag or Setting.
conditions
object[]
nullable
The list of conditions that are combined with logical AND operators.
It can be one of the following:
userCondition
object
Describes a condition that is based on user attributes.
Possible values: non-empty
and <= 1000 characters
The User Object attribute that the condition is based on. Can be "User ID", "Email", "Country" or any custom attribute.
Possible values: [isOneOf
, isNotOneOf
, containsAnyOf
, doesNotContainAnyOf
, semVerIsOneOf
, semVerIsNotOneOf
, semVerLess
, semVerLessOrEquals
, semVerGreater
, semVerGreaterOrEquals
, numberEquals
, numberDoesNotEqual
, numberLess
, numberLessOrEquals
, numberGreater
, numberGreaterOrEquals
, sensitiveIsOneOf
, sensitiveIsNotOneOf
, dateTimeBefore
, dateTimeAfter
, sensitiveTextEquals
, sensitiveTextDoesNotEqual
, sensitiveTextStartsWithAnyOf
, sensitiveTextNotStartsWithAnyOf
, sensitiveTextEndsWithAnyOf
, sensitiveTextNotEndsWithAnyOf
, sensitiveArrayContainsAnyOf
, sensitiveArrayDoesNotContainAnyOf
, textEquals
, textDoesNotEqual
, textStartsWithAnyOf
, textNotStartsWithAnyOf
, textEndsWithAnyOf
, textNotEndsWithAnyOf
, arrayContainsAnyOf
, arrayDoesNotContainAnyOf
]
The comparison operator which defines the relation between the comparison attribute and the comparison value.
comparisonValue
object
required
The value that the user object's attribute is compared to.
The string representation of the comparison value.
The number representation of the comparison value.
listValue
object[]
nullable
The list representation of the comparison value.
Possible values: non-empty
The actual comparison value.
Possible values: <= 1500 characters
An optional hint for the comparison value.
segmentCondition
object
Describes a condition that is based on a segment.
The segment's identifier.
Possible values: [isIn
, isNotIn
]
The segment comparison operator used during the evaluation process.
prerequisiteFlagCondition
object
Describes a condition that is based on a prerequisite flag.
The prerequisite flag's identifier.
Possible values: [equals
, doesNotEqual
]
Prerequisite flag comparison operator used during the evaluation process.
prerequisiteComparisonValue
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
percentageOptions
object[]
nullable
The percentage options from where the evaluation process will choose a value based on the flag's percentage evaluation attribute.
A number between 0 and 100 that represents a randomly allocated fraction of the users.
value
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
value
object
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
Possible values: <= 1000 characters
The user attribute used for percentage evaluation. If not set, it defaults to the Identifier
user object attribute.
The identifier of the feature flag or setting.
Body
required
Array [
Array [
-
User condition
-
Segment condition
-
Prerequisite flag condition
Array [
Array [
]
]
Array [
]
]
]
updateFormulas
object[]
nullable
Evaluation descriptors of each updated Feature Flag and Setting.
defaultValue
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
targetingRules
object[]
nullable
The targeting rules of the Feature Flag or Setting.
conditions
object[]
nullable
The list of conditions that are combined with logical AND operators.
It can be one of the following:
userCondition
object
Describes a condition that is based on user attributes.
Possible values: non-empty
and <= 1000 characters
The User Object attribute that the condition is based on. Can be "User ID", "Email", "Country" or any custom attribute.
Possible values: [isOneOf
, isNotOneOf
, containsAnyOf
, doesNotContainAnyOf
, semVerIsOneOf
, semVerIsNotOneOf
, semVerLess
, semVerLessOrEquals
, semVerGreater
, semVerGreaterOrEquals
, numberEquals
, numberDoesNotEqual
, numberLess
, numberLessOrEquals
, numberGreater
, numberGreaterOrEquals
, sensitiveIsOneOf
, sensitiveIsNotOneOf
, dateTimeBefore
, dateTimeAfter
, sensitiveTextEquals
, sensitiveTextDoesNotEqual
, sensitiveTextStartsWithAnyOf
, sensitiveTextNotStartsWithAnyOf
, sensitiveTextEndsWithAnyOf
, sensitiveTextNotEndsWithAnyOf
, sensitiveArrayContainsAnyOf
, sensitiveArrayDoesNotContainAnyOf
, textEquals
, textDoesNotEqual
, textStartsWithAnyOf
, textNotStartsWithAnyOf
, textEndsWithAnyOf
, textNotEndsWithAnyOf
, arrayContainsAnyOf
, arrayDoesNotContainAnyOf
]
The comparison operator which defines the relation between the comparison attribute and the comparison value.
comparisonValue
object
required
The value that the user object's attribute is compared to.
The string representation of the comparison value.
The number representation of the comparison value.
listValue
object[]
nullable
The list representation of the comparison value.
Possible values: non-empty
The actual comparison value.
Possible values: <= 1500 characters
An optional hint for the comparison value.
segmentCondition
object
Describes a condition that is based on a segment.
The segment's identifier.
Possible values: [isIn
, isNotIn
]
The segment comparison operator used during the evaluation process.
prerequisiteFlagCondition
object
Describes a condition that is based on a prerequisite flag.
The prerequisite flag's identifier.
Possible values: [equals
, doesNotEqual
]
Prerequisite flag comparison operator used during the evaluation process.
prerequisiteComparisonValue
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
percentageOptions
object[]
nullable
The percentage options from where the evaluation process will choose a value based on the flag's percentage evaluation attribute.
A number between 0 and 100 that represents a randomly allocated fraction of the users.
value
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
value
object
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
Possible values: <= 1000 characters
The user attribute used for percentage evaluation. If not set, it defaults to the Identifier
user object attribute.
The identifier of the feature flag or setting.
Responses
- 200
- 400
- 404
- 429
When everything is ok, the updated setting values returned.
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
-
User condition
-
Segment condition
-
Prerequisite flag condition
Array [
Array [
]
]
Array [
]
]
Array [
]
Array [
]
]
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.
settingFormulas
object[]
nullable
Evaluation descriptors of each updated Feature Flag and Setting.
defaultValue
object
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
targetingRules
object[]
nullable
The targeting rules of the Feature Flag or Setting.
conditions
object[]
nullable
The list of conditions that are combined with logical AND operators.
It can be one of the following:
userCondition
object
Describes a condition that is based on user attributes.
Possible values: non-empty
and <= 1000 characters
The User Object attribute that the condition is based on. Can be "User ID", "Email", "Country" or any custom attribute.
Possible values: [isOneOf
, isNotOneOf
, containsAnyOf
, doesNotContainAnyOf
, semVerIsOneOf
, semVerIsNotOneOf
, semVerLess
, semVerLessOrEquals
, semVerGreater
, semVerGreaterOrEquals
, numberEquals
, numberDoesNotEqual
, numberLess
, numberLessOrEquals
, numberGreater
, numberGreaterOrEquals
, sensitiveIsOneOf
, sensitiveIsNotOneOf
, dateTimeBefore
, dateTimeAfter
, sensitiveTextEquals
, sensitiveTextDoesNotEqual
, sensitiveTextStartsWithAnyOf
, sensitiveTextNotStartsWithAnyOf
, sensitiveTextEndsWithAnyOf
, sensitiveTextNotEndsWithAnyOf
, sensitiveArrayContainsAnyOf
, sensitiveArrayDoesNotContainAnyOf
, textEquals
, textDoesNotEqual
, textStartsWithAnyOf
, textNotStartsWithAnyOf
, textEndsWithAnyOf
, textNotEndsWithAnyOf
, arrayContainsAnyOf
, arrayDoesNotContainAnyOf
]
The comparison operator which defines the relation between the comparison attribute and the comparison value.
comparisonValue
object
required
The value that the user object's attribute is compared to.
The string representation of the comparison value.
The number representation of the comparison value.
listValue
object[]
nullable
The list representation of the comparison value.
Possible values: non-empty
The actual comparison value.
Possible values: <= 1500 characters
An optional hint for the comparison value.
segmentCondition
object
Describes a condition that is based on a segment.
The segment's identifier.
Possible values: [isIn
, isNotIn
]
The segment comparison operator used during the evaluation process.
prerequisiteFlagCondition
object
Describes a condition that is based on a prerequisite flag.
The prerequisite flag's identifier.
Possible values: [equals
, doesNotEqual
]
Prerequisite flag comparison operator used during the evaluation process.
prerequisiteComparisonValue
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
percentageOptions
object[]
nullable
The percentage options from where the evaluation process will choose a value based on the flag's percentage evaluation attribute.
A number between 0 and 100 that represents a randomly allocated fraction of the users.
value
object
required
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
value
object
Represents the value of a Feature Flag or Setting.
The served value in case of a boolean Feature Flag.
The served value in case of a text Setting.
The served value in case of a whole number Setting.
The served value in case of a decimal number Setting.
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 user attribute used for percentage evaluation. If not set, it defaults to the Identifier
user object attribute.
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.
List of Feature Flag and Setting IDs where the actual Feature Flag or Setting is prerequisite.
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.
{
"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
},
"readOnly": true,
"settingFormulas": [
{
"lastVersionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"defaultValue": {
"boolValue": true,
"stringValue": "string",
"intValue": 0,
"doubleValue": 0
},
"targetingRules": [
{
"conditions": [
{
"userCondition": {
"comparisonAttribute": "string",
"comparator": "isOneOf",
"comparisonValue": {
"stringValue": "string",
"doubleValue": 0,
"listValue": [
{
"value": "string",
"hint": "string"
}
]
}
},
"segmentCondition": {
"segmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"comparator": "isIn"
},
"prerequisiteFlagCondition": {
"prerequisiteSettingId": 0,
"comparator": "equals",
"prerequisiteComparisonValue": {
"boolValue": true,
"stringValue": "string",
"intValue": 0,
"doubleValue": 0
}
}
}
],
"percentageOptions": [
{
"percentage": 0,
"value": {
"boolValue": true,
"stringValue": "string",
"intValue": 0,
"doubleValue": 0
}
}
],
"value": {
"boolValue": true,
"stringValue": "string",
"intValue": 0,
"doubleValue": 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",
"percentageEvaluationAttribute": "string",
"lastUpdaterUserEmail": "string",
"lastUpdaterUserFullName": "string",
"integrationLinks": [
{
"key": "string",
"description": "string",
"integrationLinkType": "trello",
"url": "string"
}
],
"settingTags": [
{
"settingTagId": 0,
"tagId": 0,
"name": "string",
"color": "string"
}
],
"settingIdsWherePrerequisite": [
0
]
}
],
"featureFlagLimitations": {
"maxPercentageOptionCount": 0,
"maxTargetingRuleCount": 0,
"maxComparisonValueLength": 0,
"maxComparisonValueListLength": 0,
"maxComparisonValueListItemLength": 0,
"maxStringFlagValueLength": 0,
"maxConditionPerTargetingRuleCount": 0
}
}
Bad request.
Not found.
Too many requests. In case of the request rate exceeds the rate limits.