curl --request PATCH \
--url https://statsigapi.net/console/v1/gates/{id}/rules/{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": "Gate updated successfully.",
"data": {
"id": "a_gate",
"isEnabled": true,
"description": "helpful summary of what this gate does",
"status": "In Progress",
"lastModifierName": "CONSOLE API",
"lastModifierID": "1vaasdfLlkaujjajiuOSBP2",
"rules": [
{
"name": "All Conditions",
"id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
"baseID": "38ttpCpzrQFTMKcqFKk02l",
"passPercentage": 10,
"conditions": [
{
"type": "user_id",
"targetValue": [
"35sClJFs8l0y5uRQhDwUDo"
],
"operator": "any"
}
],
"environments": [
"staging"
]
}
],
"tags": [
"* Core"
]
}
}Update all given rules. It does NOT create or delete if you add more rules and remove rules in the rules object.
curl --request PATCH \
--url https://statsigapi.net/console/v1/gates/{id}/rules/{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": "Gate updated successfully.",
"data": {
"id": "a_gate",
"isEnabled": true,
"description": "helpful summary of what this gate does",
"status": "In Progress",
"lastModifierName": "CONSOLE API",
"lastModifierID": "1vaasdfLlkaujjajiuOSBP2",
"rules": [
{
"name": "All Conditions",
"id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
"baseID": "38ttpCpzrQFTMKcqFKk02l",
"passPercentage": 10,
"conditions": [
{
"type": "user_id",
"targetValue": [
"35sClJFs8l0y5uRQhDwUDo"
],
"operator": "any"
}
],
"environments": [
"staging"
]
}
],
"tags": [
"* Core"
]
}
}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