curl --request POST \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rule \
--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>"
}'
{
"message": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"idType": "userID",
"description": "helpful summary of what this dynamic config does",
"lastModifierID": "<string>",
"lastModifiedTime": 123,
"lastModifierEmail": "<string>",
"lastModifierName": "<string>",
"creatorID": "<string>",
"createdTime": 123,
"creatorName": "<string>",
"creatorEmail": "<string>",
"tags": [
"a tag"
],
"targetApps": "<string>",
"holdoutIDs": [
"<string>"
],
"team": "<string>",
"teamID": "<string>",
"version": 123,
"isEnabled": true,
"rules": [
{
"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>"
}
],
"defaultValue": {},
"defaultValueJson5": "<string>",
"owner": {
"ownerID": "user123",
"ownerType": "USER",
"ownerName": "John Doe",
"ownerEmail": "owner123@test.com"
},
"schema": "<string>",
"schemaJson5": "<string>",
"precommitWebhook": {
"url": "<string>",
"internalStatusUrl": "<string>"
}
}
}
Optional header to respect review settings for mutation endpoints.
id
Add Dynamic Config Rule Response
The response is of type object
.
curl --request POST \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rule \
--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>"
}'
{
"message": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"idType": "userID",
"description": "helpful summary of what this dynamic config does",
"lastModifierID": "<string>",
"lastModifiedTime": 123,
"lastModifierEmail": "<string>",
"lastModifierName": "<string>",
"creatorID": "<string>",
"createdTime": 123,
"creatorName": "<string>",
"creatorEmail": "<string>",
"tags": [
"a tag"
],
"targetApps": "<string>",
"holdoutIDs": [
"<string>"
],
"team": "<string>",
"teamID": "<string>",
"version": 123,
"isEnabled": true,
"rules": [
{
"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>"
}
],
"defaultValue": {},
"defaultValueJson5": "<string>",
"owner": {
"ownerID": "user123",
"ownerType": "USER",
"ownerName": "John Doe",
"ownerEmail": "owner123@test.com"
},
"schema": "<string>",
"schemaJson5": "<string>",
"precommitWebhook": {
"url": "<string>",
"internalStatusUrl": "<string>"
}
}
}