v1

latestOpenAPI 3.0.42026-07-13107171473.3 KB
Feature Flag & Setting values using SDK Key

Update 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 <a target="_blank" rel="noopener noreferrer" href="https://app.configcat.com/sdkkey">SDK key</a> 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
}
patch/v1/settings/{settingKeyOrId}/value

Path parameters

settingKeyOrIdstring required

The key or 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.

Headers

X-CONFIGCAT-SDKKEYstring

The ConfigCat SDK Key. (https://app.configcat.com/sdkkey)

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

updatedAtstring date-time nullable required

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

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.

readOnlyboolean required