v2

latestOpenAPI 3.0.42026-08-04123200540.7 KB
Feature Flag & Setting values V2

Update value

This endpoint updates the value of a Feature Flag or Setting with a collection of JSON Patch operations in a specified Environment.

Only the defaultValue, targetingRules, and percentageEvaluationAttribute fields 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 of a Feature Flag.

{
  "defaultValue": {
    "boolValue": false
  },
  "targetingRules": [
    {
      "conditions": [
        {
          "userCondition": {
            "comparisonAttribute": "Email",
            "comparator": "sensitiveTextEquals",
            "comparisonValue": {
              "stringValue": "test@example.com"
            }
          }
        }
      ],
      "percentageOptions": [],
      "value": {
        "boolValue": true
      }
    }
  ]
}

If we send an update request body as below:

[
  {
    "op": "replace",
    "path": "/targetingRules/0/value/boolValue",
    "value": true
  }
]

Only the first Targeting Rule's value is going to be set to false and all the other fields are remaining unchanged.

So we get a response like this:

{
  "defaultValue": {
    "boolValue": false
  },
  "targetingRules": [
    {
      "conditions": [
        {
          "userCondition": {
            "comparisonAttribute": "Email",
            "comparator": "sensitiveTextEquals",
            "comparisonValue": {
              "stringValue": "test@example.com"
            }
          }
        }
      ],
      "percentageOptions": [],
      "value": {
        "boolValue": false
      }
    }
  ]
}
patch/v2/environments/{environmentId}/settings/{settingId}/value

Path parameters

environmentIdstring uuid required

The identifier of the Environment.

settingIdinteger required

The id of the Setting.

Query parameters

reasonstring

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

bypassApprovalboolean

Whether to bypass the approval process and directly apply the change. This is only applicable for users with bypass approval permission.

latestVersionIdstring uuid

Optional. The version identifier of the last change made to the Feature Flag or Setting in the Environment. It can be used to make sure concurrent updates are not overwriting each other. If provided and the version identifier does not match the current version, the update will be rejected with a 409 Conflict response. The latest version id can be acquired from the LastVersionId property of the response models.

Request body

op'unknown' | 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test' required
pathstring required

The source path.

fromstring nullable

The target path.

{"stackTrail":"components:schemas:JsonPatchOperation:properties:value","oasType":"schema","type":"unknown","description":"The discrete value.","nullable":true}

Response

When the patch was successful.

lastVersionIdstring uuid required

The version identifier of the last change made to the Feature Flag or Setting in the Environment. It can be used to make sure concurrent updates are not overwriting each other. If the version identifier does not match the current version, the update will be rejected with a 409 Conflict response.

updatedAtstring date-time nullable required

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

percentageEvaluationAttributestring nullable required

The user attribute used for percentage evaluation. If not set, it defaults to the Identifier user object attribute.

lastUpdaterUserEmailstring nullable required

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

lastUpdaterUserFullNamestring nullable required

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

settingIdsWherePrerequisiteinteger[] required

List of Feature Flag and Setting IDs where the actual Feature Flag or Setting is prerequisite.

changeRequestCountinteger required

The number of change requests for the Feature Flag or Setting.

readOnlyboolean required

Indicates whether you have Read-only access to the Environment.

approveRequiredboolean required

Indicates that a mandatory approval is required for saving and publishing.

canBypassApprovalboolean required

Indicates whether the user can bypass the approval flow.

reasonRequiredboolean required

Indicates that a mandatory note required for saving and publishing.