Skip to main content

Apply a patch to a feature's variants (in all environments).

PATCH 

<your-unleash-url>/api/admin/projects/:projectId/features/:featureName/variants

Apply a list of patches patch to the specified feature's variants. The patch objects should conform to the JSON-patch format (RFC 6902).

⚠️ Warning: This method is not atomic. If something fails in the middle of applying the patch, you can be left with a half-applied patch. We recommend that you instead patch variants on a per-environment basis, which is an atomic operation.

Request

Responses

featureVariantsSchema

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L -X PATCH '<your-unleash-url>/api/admin/projects/:projectId/features/:featureName/variants' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>' \
-d '[
{
"path": "/type",
"op": "replace",
"from": "/type",
"value": "kill-switch"
}
]'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Parameters
— pathrequired
— pathrequired
Body required
[
  {
    "path": "/type",
    "op": "replace",
    "from": "/type",
    "value": "kill-switch"
  }
]
ResponseClear

Click the Send API Request button above and see the response here!