v2

latestOpenAPI 3.0.02026-08-073221853.1 MB
Dynamic Configs

Partially Update Dynamic Config

patch/console/v1/dynamic_configs/{id}

Path parameters

idstring required

id

Query parameters

dryRunboolean
Example:true

Skips persisting updates to the entity (used to validate that inputs are correct)

Request body

namestring

Optional name for the configuration.

isEnabledboolean

Is the dynamic config enabled

descriptionstring

A brief summary of what the dynamic config is being used for

defaultValueobject

The fallback JSON object when no rules are triggered

defaultValueJson5string

Can include comments. If provided with defaultValue, must parse to the same JSON

idTypestring

The type of ID which the dynamic config is based on.

tagsstring[]

The list of tag names attached to the dynamic config

creatorIDstring nullable
creatorEmailstring nullable
schemastring nullable

A schema using JSON Schema Draft 2020-12 to enforce return values of this dynamic config's rules.

schemaJson5string nullable

schema except with Json5 comments. Optional and should parse to same json as schema.

teamstring nullable

The team name associated with the dynamic config, Enterprise only.

teamIDstring nullable

The team ID associated with the dynamic config, Enterprise only.

releasePipelineIDstring nullable

The release pipeline ID associated with the dynamic config

type'PERMANENT' | 'TEMPORARY'

Set to PERMANENT to mark this config as long-lived, or TEMPORARY to unmark it. Only honored on the update endpoints; this field is ignored when creating a config.

Example request

{
  "name": "my_config",
  "description": "helpful summary of what this dynamic config does",
  "idType": "userID",
  "tags": [
    "a tag"
  ],
  "owner": {
    "ownerID": "user123",
    "ownerType": "USER",
    "ownerName": "John Doe",
    "ownerEmail": "owner123@test.com"
  }
}

Response

Partially Update Dynamic Config Response

messagestring required

A simple string explaining the result of the operation.

Example response

{
  "message": "Dynamic config updated successfully.",
  "data": {
    "id": "a_dynamic_config",
    "permalink": "https://console.statsig.com/company_id/dynamic_configs/a_dynamic_config",
    "description": "helpful summary of what this dynamic config does",
    "idType": "userID",
    "creatorEmail": "johnsmith@mydomain.com",
    "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"
    ],
    "type": "TEMPORARY",
    "typeReason": "NONE",
    "isPermanent": false
  }
}