Skip to main content

Add a feature dependency.

POST <your-unleash-url>/api/admin/projects/:projectId/features/:child/dependencies

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Add a dependency to a parent feature. Each environment will resolve corresponding dependency independently.

Request

Path Parameters

  • projectId string required
  • child string required

Body

required

createDependentFeatureSchema

  • feature string required

    The name of the feature we depend on.

  • enabled boolean

    Whether the parent feature should be enabled. When false variants are ignored. true by default.

  • variants string[]

    The list of variants the parent feature should resolve to. Leave empty when you only want to check the enabled status.

Responses

This response has no body.

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Request

Base URL
<your-unleash-url>
Security Scheme
apiKey
projectId — path required
child — path required
Body required
{
"feature": "parent_feature",
"enabled": false,
"variants": [
"variantA",
"variantB"
]
}
curl / cURL
curl -L -X POST '<your-unleash-url>/api/admin/projects/:projectId/features/:child/dependencies' \
-H 'Content-Type: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
--data-raw '{
"feature": "parent_feature",
"enabled": false,
"variants": [
"variantA",
"variantB"
]
}'