v1

OpenAPI 3.0.42026-07-13107171473.3 KB
Feature Flag & Setting values

Post 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 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.
post/v1/configs/{configId}/environments/{environmentId}/values

Path parameters

configIdstring uuid required

The identifier of the Config.

environmentIdstring uuid required

The identifier of the Environment.

Query parameters

reasonstring

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

Request body

Response

When everything is ok, the updated setting values returned.

readOnlyboolean required