v7

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-013764062.2 MB
Features

Patch a feature's variants in an environment

Apply a list of patches to the features environments in the specified environment. The patch objects should conform to the JSON-patch format (RFC 6902).

patch/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/variants

Path parameters

projectIdstring required
featureNamestring required
environmentstring required

Request body

pathstring required

The path to the property to operate on

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

The kind of operation to perform

fromstring

The target to move or copy from, if performing one of those operations

valuestring

The value to add or replace, if performing one of those operations

Example request

[
  {
    "path": "/type",
    "op": "replace",
    "from": "/type",
    "value": "kill-switch"
  }
]

Response

featureVariantsSchema

versioninteger required

The version of the feature variants schema.

Example response

{
  "version": 1,
  "variants": [
    {
      "name": "blue_group",
      "weightType": "variable",
      "stickiness": "custom.context.field",
      "payload": {
        "type": "json",
        "value": "{\"color\": \"red\"}"
      },
      "overrides": [
        {
          "contextName": "userId",
          "values": [
            "red",
            "blue"
          ]
        }
      ]
    }
  ]
}