Skip to main content

Post values

POST 

/v1/configs/:configId/environments/:environmentId/values

This endpoint replaces the values of a specified Config's Feature Flags or Settings identified by the configId parameter in a specified Environment identified by the environmentId parameter.

Only the value, rolloutRules and percentageRules attributes are modifiable by this endpoint.

Important: As this endpoint is doing a complete replace, it's important to set every other attribute that you don't want to change in its original state. Not listing one means that it will reset.

For example: We have the following resource.

{
"settingValues": [
{
"rolloutPercentageItems": [
{
"percentage": 30,
"value": true
},
{
"percentage": 70,
"value": false
}
],
"rolloutRules": [],
"value": false,
"settingId": 1
}
]
}

If we send a replace request body as below:

{ 
"settingValues": [
{
"value": true,
"settingId": 1
}
]
}

Then besides that the default value is set to true, all the Percentage Rules are deleted. So we get a response like this:

{
"settingValues": [
{
"rolloutPercentageItems": [],
"rolloutRules": [],
"value": true,
"setting":
{
"settingId": 1
}
}
]
}

The rolloutRules property describes two types of rules:

  • Targeting rules: When you want to add or update a targeting rule, the comparator, comparisonAttribute, and comparisonValue members are required.
  • Segment rules: When you want to add add or update a segment rule, the segmentId which identifies the desired segment and the segmentComparator members are required.

Request

Path Parameters

    configId uuidrequired

    The identifier of the Config.

    environmentId uuidrequired

    The identifier of the Environment.

Query Parameters

    reason string

    The reason note for the Audit Log if the Product's "Config changes require a reason" preference is turned on.

Body

required

    settingValues

    object[]

    nullable

    The values to update.

  • Array [

  • rolloutRules

    object[]

    nullable

    The targeting rule collection.

  • Array [

  • comparisonAttribute stringnullable

    Possible values: <= 1000 characters

    The user attribute to compare.

    comparator RolloutRuleComparator

    Possible values: [isOneOf, isNotOneOf, contains, doesNotContain, semVerIsOneOf, semVerIsNotOneOf, semVerLess, semVerLessOrEquals, semVerGreater, semVerGreaterOrEquals, numberEquals, numberDoesNotEqual, numberLess, numberLessOrEquals, numberGreater, numberGreaterOrEquals, sensitiveIsOneOf, sensitiveIsNotOneOf]

    The comparison operator the evaluation process must use when it compares the given user attribute's value with the comparison value.

    comparisonValue stringnullable

    The value to compare against.

    value nullable

    The value to serve when the comparison matches. It must respect the setting type.

    segmentComparator SegmentComparator

    Possible values: [isIn, isNotIn]

    The segment comparison operator used during the evaluation process.

    segmentId uuidnullable

    The segment to compare against.

  • ]

  • rolloutPercentageItems

    object[]

    nullable

    The percentage rule collection.

  • Array [

  • percentage int64required

    The percentage value for the rule.

    value nullable

    The value to serve when the user falls in the percentage rule. It must respect the setting type.

  • ]

  • value nullable

    The value to serve. It must respect the setting type.

    settingId int32

    The id of the Setting.

  • ]

Responses

When everything is ok, the updated setting values returned.

Schema

    config

    object

    Details of the Config.

    product

    object

    Details of the Product.

    organization

    object

    Details of the Organization.

    organizationId uuid

    Identifier of the Organization.

    name stringnullable

    Name of the Organization.

    productId uuid

    Identifier of the Product.

    name stringnullable

    Name of the Product.

    description stringnullable

    Description of the Product.

    order int32

    The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.

    reasonRequired boolean

    Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.

    configId uuid

    Identifier of the Config.

    name stringnullable

    Name of the Config.

    description stringnullable

    Description of the Config.

    order int32

    The order of the Config represented on the ConfigCat Dashboard.

    migratedConfigId uuidnullable
    evaluationVersion EvaluationVersion

    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.

    organizationId uuid

    Identifier of the Organization.

    name stringnullable

    Name of the Organization.

    productId uuid

    Identifier of the Product.

    name stringnullable

    Name of the Product.

    description stringnullable

    Description of the Product.

    order int32

    The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.

    reasonRequired boolean

    Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.

    environmentId uuid

    Identifier of the Environment.

    name stringnullable

    Name of the Environment.

    color stringnullable

    The configured color of the Environment.

    description stringnullable

    Description of the Environment.

    order int32

    The order of the Environment represented on the ConfigCat Dashboard.

    reasonRequired boolean

    Determines whether a mandatory reason must be given every time when the Feature Flags or Settings in the given Environment are saved.

    readOnly boolean

    settingValues

    object[]

    nullable

  • Array [

  • rolloutRules

    object[]

    nullable

    The targeting rule collection.

  • Array [

  • comparisonAttribute stringnullable

    Possible values: <= 1000 characters

    The user attribute to compare.

    comparator RolloutRuleComparator

    Possible values: [isOneOf, isNotOneOf, contains, doesNotContain, semVerIsOneOf, semVerIsNotOneOf, semVerLess, semVerLessOrEquals, semVerGreater, semVerGreaterOrEquals, numberEquals, numberDoesNotEqual, numberLess, numberLessOrEquals, numberGreater, numberGreaterOrEquals, sensitiveIsOneOf, sensitiveIsNotOneOf]

    The comparison operator the evaluation process must use when it compares the given user attribute's value with the comparison value.

    comparisonValue stringnullable

    The value to compare against.

    value nullable

    The value to serve when the comparison matches. It must respect the setting type.

    segmentComparator SegmentComparator

    Possible values: [isIn, isNotIn]

    The segment comparison operator used during the evaluation process.

    segmentId uuidnullable

    The segment to compare against.

  • ]

  • rolloutPercentageItems

    object[]

    nullable

    The percentage rule collection.

  • Array [

  • percentage int64required

    The percentage value for the rule.

    value nullable

    The value to serve when the user falls in the percentage rule. It must respect the setting type.

  • ]

  • value nullable

    The value to serve. It must respect the setting type.

    setting

    object

    Metadata of a Feature Flag or Setting.

    settingId int32

    Identifier of the Feature Flag or Setting.

    key stringnullable

    Key of the Feature Flag or Setting.

    name stringnullable

    Name of the Feature Flag or Setting.

    hint stringnullable

    Description of the Feature Flag or Setting.

    settingType SettingType

    Possible values: [boolean, string, int, double]

    The type of the Feature Flag or Setting.

    order int32

    The order of the Feature Flag or Setting represented on the ConfigCat Dashboard.

    createdAt date-timenullable

    The creation time of the Feature Flag or Setting.

    creatorEmail stringnullable

    The user's email address who created the Feature Flag or Setting.

    creatorFullName stringnullable

    The user's name who created the Feature Flag or Setting.

    isWatching boolean
    updatedAt date-timenullable

    The last updated date and time when the Feature Flag or Setting.

    lastUpdaterUserEmail stringnullable

    The email of the user who last updated the Feature Flag or Setting.

    lastUpdaterUserFullName stringnullable

    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.

  • Array [

  • key stringnullable
    description stringnullable
    integrationLinkType IntegrationLinkType

    Possible values: [trello, jira, monday]

    url stringnullable
  • ]

  • settingTags

    object[]

    nullable

    The tags attached to the Feature Flag or Setting.

  • Array [

  • settingTagId int64
    tagId int64
    name stringnullable
    color stringnullable
  • ]

  • ]

  • featureFlagLimitations

    object

    Subscription limitations regarding Feature flag or Setting values and targeting.

    maxPercentageOptionCount int32

    Maximum number of percentage options a Feature Flag or Setting can have within a targeting rule.

    maxTargetingRuleCount int32

    Maximum number of targeting rules a Feature Flag or Setting can have.

    maxComparisonValueLength int32

    Maximum length of a text comparison value.

    maxComparisonValueListLength int32

    Maximum item count of a list comparison value.

    maxComparisonValueListItemLength int32

    Maximum length of a list comparison value's item.

    maxStringFlagValueLength int32

    Maximum length of a text Setting's value.

    maxConditionPerTargetingRuleCount int32

    Maximum number of AND conditions a Feature Flag or Setting can have within a targeting rule.

Loading...