# ConfigCat

> Manage ConfigCat feature flags, configs, tags and segments, turn flags on or off and set values per environment, read the audit log, and follow flag changes, new flags and other changes.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/configcat

## Actions

### Create config

Create a config in a product, to keep a group of feature flags in.

**Inputs**

- Product (`product_id`, text, required): The product.
- Name (`name`, text, required): The config's name.
- Description (`description`, text): What the config is for.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "configId": "example",
    "description": "example",
    "evaluationVersion": "example",
    "name": "example",
    "order": 1,
    "product": {
      "name": "example",
      "productId": "example"
    }
  }
}
```

### Create feature flag

Create a feature flag (on or off) or a text or number setting in a config. It starts off, or empty, in every environment.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.
- Key (`key`, text, required): The key code reads it by, such as isNewCheckoutEnabled. It can't be changed later.
- Name (`name`, text, required): The name shown in ConfigCat.
- Type (`setting_type`, text): The kind of value. Leave empty for a feature flag that is on or off. One of: `boolean` (Feature flag (on or off)), `string` (Text setting), `int` (Whole number setting), `double` (Decimal number setting).
- Description (`hint`, text): What the flag is for.
- Tags (`tag_ids`, list): Tags to put on the flag.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "configId": "example",
    "configName": "example",
    "createdAt": "example",
    "hint": "example",
    "isJson": true,
    "key": "example",
    "name": "example",
    "order": 1,
    "settingId": 1,
    "settingType": "example",
    "tags": [
      {
        "color": "example",
        "name": "example",
        "tagId": 1
      }
    ]
  }
}
```

### Create segment

Create a segment of users whose attribute compares to a value, such as Email contains @example.com.

**Inputs**

- Product (`product_id`, text, required): The product.
- Name (`name`, text, required): The segment's name.
- Description (`description`, text): Who the segment is.
- Attribute (`attribute`, text, required): The user attribute compared, such as Email, Country or a custom one.
- Comparison (`comparator`, text, required): How the attribute compares to the value. One of: `isOneOf` (Is one of), `isNotOneOf` (Is not one of), `contains`, `doesNotContain` (Does not contain), `semVerIsOneOf` (Version is one of), `semVerIsNotOneOf` (Version is not one of), `semVerLess` (Version less than), `semVerLessOrEquals` (Version at most), `semVerGreater` (Version greater than), `semVerGreaterOrEquals` (Version at least), and 8 more.
- Value (`value`, text, required): The value compared with; separate several with commas.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "comparator": "example",
    "comparisonAttribute": "example",
    "comparisonValue": "example",
    "createdAt": "example",
    "creatorEmail": "example",
    "description": "example",
    "lastUpdaterEmail": "example",
    "name": "example",
    "segmentId": "example",
    "updatedAt": "example",
    "usage": 1
  }
}
```

### Create tag

Create a tag for a product's feature flags.

**Inputs**

- Product (`product_id`, text, required): The product.
- Name (`name`, text, required): The tag's name.
- Color (`color`, text): The tag's color, such as panther or salmon, as ConfigCat names them.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "color": "example",
    "name": "example",
    "product": {
      "name": "example",
      "productId": "example"
    },
    "tagId": 1
  }
}
```

### Delete config

Delete a config and every feature flag in it.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "configId": "example",
    "deleted": true
  }
}
```

### Delete feature flag

Delete a feature flag or setting from every environment.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.
- Feature flag (`setting_id`, number, required): The feature flag or setting. At least 1.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "settingId": 1
  }
}
```

### Delete segment

Delete a segment no targeting rule uses.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Segment (`segment_id`, text, required): The segment.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "segmentId": "example"
  }
}
```

### Delete tag

Delete a tag and take it off every flag that has it.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Tag (`tag_id`, number, required): The tag. At least 1.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "tagId": 1
  }
}
```

### Get feature flag

Get a feature flag or setting's key, type, description and tags.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.
- Feature flag (`setting_id`, number, required): The feature flag or setting. At least 1.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "configId": "example",
    "configName": "example",
    "createdAt": "example",
    "hint": "example",
    "isJson": true,
    "key": "example",
    "name": "example",
    "order": 1,
    "settingId": 1,
    "settingType": "example",
    "tags": [
      {
        "color": "example",
        "name": "example",
        "tagId": 1
      }
    ]
  }
}
```

### Get flag value

Get a feature flag or setting's value in one environment and how many targeting rules it has.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.
- Environment (`environment_id`, text, required): The environment.
- Feature flag (`setting_id`, number, required): The feature flag or setting. At least 1.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "config": {
      "configId": "example",
      "evaluationVersion": "example",
      "name": "example"
    },
    "environment": {
      "environmentId": "example",
      "name": "example"
    },
    "lastUpdaterUserEmail": "example",
    "lastUpdaterUserFullName": "example",
    "setting": {
      "key": "example",
      "name": "example",
      "settingId": 1,
      "settingType": "example"
    },
    "targetingRuleCount": 1,
    "updatedAt": "example",
    "value": "example"
  }
}
```

### Get my account

Get the name and email address of the account the credentials belong to.

**Inputs**: None.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "email": "example",
    "fullName": "example",
    "id": "example"
  }
}
```

### List audit log

List what changed in a product and who changed it, optionally for one config, environment or kind of change, over at most 30 days.

**Inputs**

- Product (`product_id`, text, required): The product.
- Config (`config_id`, text): Only changes in this config.
- Environment (`environment_id`, text): Only changes in this environment.
- Kind of change (`type`, text): Only this kind of change. One of: `settingValueChanged` (Flag value changed), `settingCreated` (Flag created), `settingChanged` (Flag renamed or described), `settingDeleted` (Flag deleted), `configCreated` (Config created), `configChanged` (Config changed), `configDeleted` (Config deleted), `environmentCreated` (Environment created), `environmentChanged` (Environment changed), `environmentDeleted` (Environment deleted), and 10 more.
- Since (`since`, date and time): Only changes at or after this time. Leave empty, with Until, for the last 7 days.
- Until (`until`, date and time): Only changes before this time.
- Page (`page`, number): Which page, starting at 1. Leave empty for the first. At least 1.
- Entries per page (`page_size`, number): How many entries a page holds, up to 100. Leave empty for 100. From 1 to 100.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "actionTarget": "example",
        "auditLogDateTime": "example",
        "auditLogId": 1,
        "auditLogType": "example",
        "auditLogTypeEnum": "example",
        "details": "example",
        "userEmail": "example",
        "userName": "example",
        "where": "example",
        "why": "example"
      }
    ],
    "paging": {
      "currentPage": 1,
      "hasNext": true,
      "pageSize": 1,
      "totalCount": 1,
      "totalPages": 1
    }
  }
}
```

### List configs

List a product's configs: the groups its feature flags are kept in.

**Inputs**

- Product (`product_id`, text, required): The product.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "configs": [
      {
        "configId": "example",
        "description": "example",
        "evaluationVersion": "example",
        "name": "example",
        "order": 1,
        "product": {
          "name": "example",
          "productId": "example"
        }
      }
    ]
  }
}
```

### List environments

List a product's environments, such as Test and Production.

**Inputs**

- Product (`product_id`, text, required): The product.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "environments": [
      {
        "approveRequired": true,
        "color": "example",
        "description": "example",
        "environmentId": "example",
        "name": "example",
        "order": 1,
        "product": {
          "name": "example",
          "productId": "example"
        },
        "reasonRequired": true
      }
    ]
  }
}
```

### List feature flags

List the feature flags and settings in a config, with their type and tags.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "flags": [
      {
        "configId": "example",
        "configName": "example",
        "createdAt": "example",
        "hint": "example",
        "isJson": true,
        "key": "example",
        "name": "example",
        "order": 1,
        "settingId": 1,
        "settingType": "example",
        "tags": [
          {
            "color": "example",
            "name": "example",
            "tagId": 1
          }
        ]
      }
    ]
  }
}
```

### List flag values

List every feature flag and setting in a config with its value in one environment.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.
- Environment (`environment_id`, text, required): The environment.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "config": {
      "configId": "example",
      "evaluationVersion": "example",
      "name": "example"
    },
    "environment": {
      "environmentId": "example",
      "name": "example"
    },
    "values": [
      {
        "config": {
          "configId": "example",
          "evaluationVersion": "example",
          "name": "example"
        },
        "environment": {
          "environmentId": "example",
          "name": "example"
        },
        "lastUpdaterUserEmail": "example",
        "lastUpdaterUserFullName": "example",
        "setting": {
          "key": "example",
          "name": "example",
          "settingId": 1,
          "settingType": "example"
        },
        "targetingRuleCount": 1,
        "updatedAt": "example",
        "value": "example"
      }
    ]
  }
}
```

### List organizations

List the organizations the account belongs to.

**Inputs**: None.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "organizations": [
      {
        "name": "example",
        "organizationId": "example"
      }
    ]
  }
}
```

### List product members

List the people who can open a product, with their permission group.

**Inputs**

- Product (`product_id`, text, required): The product.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "members": [
      {
        "email": "example",
        "fullName": "example",
        "permissionGroupId": 1,
        "productId": "example",
        "userId": "example"
      }
    ]
  }
}
```

### List products

List the products the account can see.

**Inputs**: None.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "products": [
      {
        "approveRequired": true,
        "description": "example",
        "name": "example",
        "order": 1,
        "organization": {
          "name": "example",
          "organizationId": "example"
        },
        "productId": "example",
        "reasonRequired": true
      }
    ]
  }
}
```

### List segments

List a product's segments: groups of users targeting rules can name.

**Inputs**

- Product (`product_id`, text, required): The product.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "segments": [
      {
        "comparator": "example",
        "comparisonAttribute": "example",
        "comparisonValue": "example",
        "createdAt": "example",
        "creatorEmail": "example",
        "description": "example",
        "lastUpdaterEmail": "example",
        "name": "example",
        "segmentId": "example",
        "updatedAt": "example",
        "usage": 1
      }
    ]
  }
}
```

### List tags

List the tags a product's feature flags can carry.

**Inputs**

- Product (`product_id`, text, required): The product.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "tags": [
      {
        "color": "example",
        "name": "example",
        "product": {
          "name": "example",
          "productId": "example"
        },
        "tagId": 1
      }
    ]
  }
}
```

### Set setting value

Set a setting's value in one environment: text, a number, or true or false. Its targeting rules stay as they are.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.
- Environment (`environment_id`, text, required): The environment.
- Feature flag (`setting_id`, number, required): The feature flag or setting. At least 1.
- Value (`value`, text, required): The value, written as the setting's type: text, a number, or true or false.
- Reason (`reason`, text): Why, for the audit log. Needed when the product requires a reason for changes.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "config": {
      "configId": "example",
      "evaluationVersion": "example",
      "name": "example"
    },
    "environment": {
      "environmentId": "example",
      "name": "example"
    },
    "lastUpdaterUserEmail": "example",
    "lastUpdaterUserFullName": "example",
    "setting": {
      "key": "example",
      "name": "example",
      "settingId": 1,
      "settingType": "example"
    },
    "targetingRuleCount": 1,
    "updatedAt": "example",
    "value": "example"
  }
}
```

### Turn feature flag on or off

Turn a feature flag on or off in one environment. Its targeting rules stay as they are.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.
- Environment (`environment_id`, text, required): The environment.
- Feature flag (`setting_id`, number, required): The feature flag or setting. At least 1.
- On (`enabled`, true/false, required): Whether the flag is on in the environment.
- Reason (`reason`, text): Why, for the audit log. Needed when the product requires a reason for changes.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "config": {
      "configId": "example",
      "evaluationVersion": "example",
      "name": "example"
    },
    "environment": {
      "environmentId": "example",
      "name": "example"
    },
    "lastUpdaterUserEmail": "example",
    "lastUpdaterUserFullName": "example",
    "setting": {
      "key": "example",
      "name": "example",
      "settingId": 1,
      "settingType": "example"
    },
    "targetingRuleCount": 1,
    "updatedAt": "example",
    "value": "example"
  }
}
```

### Update feature flag

Rename a feature flag, change its description or replace its tags.

**Inputs**

- Product (`product_id`, text, required): The product the config and environment are in.
- Config (`config_id`, text, required): The config.
- Feature flag (`setting_id`, number, required): The feature flag or setting. At least 1.
- Name (`name`, text): The name shown in ConfigCat.
- Description (`hint`, text): What the flag is for.
- Tags (`tag_ids`, list): The flag's tags. These replace the tags it has.

**Outputs**

- `data` (object): The response from ConfigCat.

**Example output**

```json
{
  "data": {
    "configId": "example",
    "configName": "example",
    "createdAt": "example",
    "hint": "example",
    "isJson": true,
    "key": "example",
    "name": "example",
    "order": 1,
    "settingId": 1,
    "settingType": "example",
    "tags": [
      {
        "color": "example",
        "name": "example",
        "tagId": 1
      }
    ]
  }
}
```
