Skip to main content
PATCH
/
console
/
v1
/
dynamic_configs
/
{id}
/
rule
/
{ruleId}
Update Dynamic Config Rule By Id
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": "<string>",
  "passPercentage": 50,
  "conditions": [
    {
      "targetValue": [
        "<string>"
      ],
      "operator": "<string>",
      "field": "<string>",
      "customID": "<string>",
      "type": "app_version"
    }
  ],
  "environments": [
    "<string>"
  ],
  "id": "<string>",
  "baseID": "<string>",
  "returnValue": {},
  "returnValueJson5": "<string>",
  "variants": [
    {
      "id": "<string>",
      "name": "<string>",
      "passPercentage": 50,
      "returnValue": {},
      "returnValueJson5": "<string>"
    }
  ]
}'
{
  "message": "Dynamic Config rules updated successfully.",
  "data": {
    "id": "a_dynamic_config",
    "description": "helpful summary of what this dynamic config does",
    "idType": "userID",
    "creatorEmail": "[email protected]",
    "creatorName": "John Smith",
    "createdTime": 1674769467002,
    "lastModifierID": "1vaQaBoLlkauH9iiuOSBP2",
    "lastModifierName": "CONSOLE API",
    "lastModifiedTime": 1707344887865,
    "lastModifierEmail": null,
    "holdoutIDs": [],
    "isEnabled": true,
    "rules": [
      {
        "name": "All Conditions",
        "id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
        "baseID": "38ttpCpzrQFTMKcqFKk02l",
        "passPercentage": 10,
        "conditions": [
          {
            "type": "public",
            "operator": "string",
            "targetValue": 0,
            "field": "string",
            "customID": "string"
          }
        ],
        "returnValue": {
          "key": true
        },
        "completedAutomatedRollouts": [],
        "pendingAutomatedRollouts": []
      }
    ],
    "defaultValue": {
      "key": "the default value"
    },
    "tags": [
      "a tag"
    ]
  }
}

Authorizations

STATSIG-API-KEY
string
header
required

Headers

x-respect-review-settings
string

Path Parameters

id
string
required
ruleId
string
required

Query Parameters

dryRun
boolean
Example:

Body

application/json
name
string
passPercentage
number
Required range: 0 <= x <= 100Must be a multiple of 0.01
conditions
object[]
environments
string[] | null
id
string
baseID
string
returnValue
object
returnValueJson5
string
variants
object[]

Response

200 - application/json
message
string
required
data
object
required