Feature Flags

Update Feature Flag

Update an existing feature flag

patch/resources/feature-flags/v1/{id}

Request

Path parameters

idstring required

Request body

namestring

String that represent the feature flag name

onboolean

Boolean indicating whether the feature flag is on

offTreatment'true' | 'false'

Enum that represents the treatment in case feature flag is off

defaultTreatment'true' | 'false'

Enum that represents the default treatment

featureIdstring

UUID string that represents the related feature ID

descriptionstring

String the represents the feature flag description

metadatastring

JSON String that represents additional custom metadata to the feature flag entity

Example request

{
  "name": "Test Feature Flag",
  "on": true,
  "offTreatment": "false",
  "defaultTreatment": "true",
  "featureId": "26f1b6b8-0317-452c-becd-68a5f782417d ",
  "description": "This is a test feature flag",
  "metadata": "{}",
  "rules": [
    {
      "description": "This is the first rule",
      "conditionLogic": "and",
      "conditions": [
        {
          "attribute": "myCustomAttribute",
          "attributeType": "custom",
          "op": "in_list",
          "value": {
            "list": [
              "valueA",
              "valueB"
            ]
          }
        }
      ],
      "treatment": "true"
    }
  ]
}

Response

idstring

UUID string that represents the feature flag ID

namestring

String that represent the feature flag name

onboolean

Boolean indicating whether the feature flag is on

offTreatment'true' | 'false'

Enum that represents the treatment in case feature flag is off

defaultTreatment'true' | 'false'

Enum that represents the default treatment

descriptionstring

String the represents the feature flag description

metadatastring

JSON String that represents additional custom metadata to the feature flag entity

updatedAtstring date-time

Date when feature flag was created

createdAtstring date-time

Date when feature flag was last updated

Example response

{
  "id": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3",
  "name": "Test Feature Flag",
  "on": true,
  "offTreatment": "false",
  "defaultTreatment": "true",
  "feature": {
    "id": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3",
    "key": "test-feature",
    "name": "Test Feature"
  },
  "description": "This is a test feature flag",
  "metadata": "{}",
  "rules": [
    {
      "description": "This is the first rule",
      "conditionLogic": "and",
      "conditions": [
        {
          "attribute": "myCustomAttribute",
          "attributeType": "custom",
          "op": "in_list",
          "value": {
            "list": [
              "valueA",
              "valueB"
            ]
          }
        }
      ],
      "treatment": "true"
    }
  ],
  "updatedAt": "2022-01-01T00:00:00",
  "createdAt": "2022-01-01T00:00:00"
}

Changes

No recorded changes to this operation across all 1 revision of this API.