Authorizations
Headers
Optional header to respect review settings for mutation endpoints.
Path Parameters
id
Body
application/json
curl --request PATCH \
--url https://statsigapi.net/console/v1/gates/{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": "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 list of current Gate Rules settings. It does NOT replace, create or delete if you add more rules and remove rules in the rules object. Please get the current rules through GET and use that as the base object.
curl --request PATCH \
--url https://statsigapi.net/console/v1/gates/{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": "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.
id
Show child attributes