curl --request PATCH \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rules \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '{
"rules": [
{
"name": "All Conditions",
"id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
"baseID": "38ttpCpzrQFTMKcqFKk02l",
"passPercentage": 10,
"conditions": [
{
"type": "user_id",
"operator": "any",
"targetValue": [
0
],
"field": "string",
"customID": "string"
}
],
"returnValue": {},
"returnValueJson5": {},
"environments": [
"string"
]
}
]
}'
{
"message": "Dynamic Config rules updated successfully.",
"data": {
"id": "dc2",
"name": "dc2",
"description": "",
"idType": "userID",
"lastModifierID": "65pqqzT46Kl7lHnd2JCmgH",
"lastModifiedTime": 1721256932961,
"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": "2IIQAN6wbUyHJiLbrcBuvx:80.00:4",
"baseID": "2IIQAN6wbUyHJiLbrcBuvx",
"name": "Other2",
"passPercentage": 80,
"conditions": [],
"returnValue": true,
"returnValueJson5": "true",
"environments": null
},
{
"id": "H8AtJA3Vhyeyn6XbH1Xwe:71.00:1",
"baseID": "H8AtJA3Vhyeyn6XbH1Xwe",
"name": "CA",
"passPercentage": 71,
"conditions": [
{
"type": "country",
"targetValue": [
"CA"
],
"operator": "any"
}
],
"returnValue": {},
"returnValueJson5": "{}",
"environments": null
}
],
"defaultValue": {},
"defaultValueJson5": "{}"
}
}
curl --request PATCH \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rules \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '{
"rules": [
{
"name": "All Conditions",
"id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
"baseID": "38ttpCpzrQFTMKcqFKk02l",
"passPercentage": 10,
"conditions": [
{
"type": "user_id",
"operator": "any",
"targetValue": [
0
],
"field": "string",
"customID": "string"
}
],
"returnValue": {},
"returnValueJson5": {},
"environments": [
"string"
]
}
]
}'
{
"message": "Dynamic Config rules updated successfully.",
"data": {
"id": "dc2",
"name": "dc2",
"description": "",
"idType": "userID",
"lastModifierID": "65pqqzT46Kl7lHnd2JCmgH",
"lastModifiedTime": 1721256932961,
"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": "2IIQAN6wbUyHJiLbrcBuvx:80.00:4",
"baseID": "2IIQAN6wbUyHJiLbrcBuvx",
"name": "Other2",
"passPercentage": 80,
"conditions": [],
"returnValue": true,
"returnValueJson5": "true",
"environments": null
},
{
"id": "H8AtJA3Vhyeyn6XbH1Xwe:71.00:1",
"baseID": "H8AtJA3Vhyeyn6XbH1Xwe",
"name": "CA",
"passPercentage": 71,
"conditions": [
{
"type": "country",
"targetValue": [
"CA"
],
"operator": "any"
}
],
"returnValue": {},
"returnValueJson5": "{}",
"environments": null
}
],
"defaultValue": {},
"defaultValueJson5": "{}"
}
}
Optional header to respect review settings for mutation endpoints.
id
Update List of Dynamic Config Rule Response
The response is of type object
.