curl --request PATCH \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/{ruleId} \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "All Conditions",
"id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
"baseID": "38ttpCpzrQFTMKcqFKk02l",
"passPercentage": 10,
"conditions": [
{
"type": "user_id",
"targetValue": [
"35sClJFs8l0y5uRQhDwUDo"
],
"operator": "any"
}
],
"environments": [
"staging"
]
}
'{
"message": "Dynamic Config rules updated successfully.",
"data": {
"id": "dc2",
"name": "dc2",
"description": "",
"idType": "userID",
"lastModifierID": "65pqqzT46Kl7lHnd2JCmgH",
"lastModifiedTime": 1721248745926,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "3exemrfZ5pwOk6qyDH0dhP",
"createdTime": 1721247911588,
"creatorName": "Jathu Theivikaran",
"creatorEmail": "jathurshan@statsig.com",
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"team": null,
"isEnabled": true,
"rules": [
{
"id": "1HnUxxykNK2zl8AqW0HAl5",
"baseID": "1HnUxxykNK2zl8AqW0HAl5",
"name": "CA",
"passPercentage": 100,
"conditions": [],
"returnValue": true,
"returnValueJson5": "true",
"environments": null
},
{
"id": "2IIQAN6wbUyHJiLbrcBuvx:80.00:1",
"baseID": "2IIQAN6wbUyHJiLbrcBuvx",
"name": "Other",
"passPercentage": 80,
"conditions": [],
"returnValue": true,
"returnValueJson5": "true",
"environments": null
}
],
"defaultValue": {},
"defaultValueJson5": "{}"
}
}curl --request PATCH \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/{ruleId} \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "All Conditions",
"id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
"baseID": "38ttpCpzrQFTMKcqFKk02l",
"passPercentage": 10,
"conditions": [
{
"type": "user_id",
"targetValue": [
"35sClJFs8l0y5uRQhDwUDo"
],
"operator": "any"
}
],
"environments": [
"staging"
]
}
'{
"message": "Dynamic Config rules updated successfully.",
"data": {
"id": "dc2",
"name": "dc2",
"description": "",
"idType": "userID",
"lastModifierID": "65pqqzT46Kl7lHnd2JCmgH",
"lastModifiedTime": 1721248745926,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "3exemrfZ5pwOk6qyDH0dhP",
"createdTime": 1721247911588,
"creatorName": "Jathu Theivikaran",
"creatorEmail": "jathurshan@statsig.com",
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"team": null,
"isEnabled": true,
"rules": [
{
"id": "1HnUxxykNK2zl8AqW0HAl5",
"baseID": "1HnUxxykNK2zl8AqW0HAl5",
"name": "CA",
"passPercentage": 100,
"conditions": [],
"returnValue": true,
"returnValueJson5": "true",
"environments": null
},
{
"id": "2IIQAN6wbUyHJiLbrcBuvx:80.00:1",
"baseID": "2IIQAN6wbUyHJiLbrcBuvx",
"name": "Other",
"passPercentage": 80,
"conditions": [],
"returnValue": true,
"returnValueJson5": "true",
"environments": null
}
],
"defaultValue": {},
"defaultValueJson5": "{}"
}
}Optional header to respect review settings for mutation endpoints.
The name of this rule.
Of the users that meet the conditions of this rule, what percent should return true.
0 <= x <= 100Must be a multiple of 0.01An array of Condition objects.
Show child attributes
The environments this rule is enabled for.
The Statsig ID of this rule.
The base ID of this rule, i.e. without any added metadata. Will remain the exact same throughout
The return value of the rule.
Show child attributes