# GrowthBook

> Manage GrowthBook feature flags, experiments, projects and saved groups, turn flags on or off per environment, read experiment results, and follow new flags, flag changes, new experiments and experiments starting or stopping.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/growthbook

## Actions

### Create experiment

Create a draft experiment with its variations, ready to link to a feature flag and start in GrowthBook.

**Inputs**

- Name (`name`, text, required): The experiment's name.
- Tracking key (`tracking_key`, text, required): The key sent with exposure events, such as checkout-test. It must be unique.
- Variations (`variations`, list, required): The variations' names, control first, such as Control and New checkout. At least two.
- Hypothesis (`hypothesis`, text): What you expect to happen.
- Description (`description`, text): What the experiment tests.
- Project (`project_id`, text): The project the experiment belongs to.
- Tags (`tags`, list): Tags for filtering and grouping.
- Owner (`owner`, text): The owner's email address in GrowthBook.
- Data source (`datasource_id`, text): The data source its results come from.
- Goal metrics (`metric_ids`, list): The goal metrics.
- Assign by attribute (`hash_attribute`, text): The user attribute that assigns variations, such as id. Leave empty for id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "experiment": {
      "archived": true,
      "autoRefresh": true,
      "dateCreated": "example",
      "dateUpdated": "example",
      "description": "example",
      "hashAttribute": "example",
      "hypothesis": "example",
      "id": "example",
      "linkedFeatures": [
        "example"
      ],
      "name": "example",
      "owner": "example",
      "phases": [
        {
          "condition": "example",
          "coverage": 1,
          "dateEnded": "example",
          "dateStarted": "example",
          "name": "example",
          "reasonForStopping": "example"
        }
      ],
      "project": "example",
      "resultSummary": {
        "conclusions": "example",
        "status": "example",
        "winner": "example"
      },
      "settings": {
        "assignmentQueryId": "example",
        "datasourceId": "example",
        "statsEngine": "example"
      },
      "status": "example",
      "tags": [
        "example"
      ],
      "trackingKey": "example",
      "type": "example",
      "variations": [
        {
          "description": "example",
          "key": "example",
          "name": "example",
          "variationId": "example"
        }
      ]
    }
  }
}
```

### Create feature flag

Create a feature flag with its type and default value, on in the environments you choose.

**Inputs**

- Key (`key`, text, required): The flag's key, used in code, such as new-checkout. It can't be changed later.
- Value type (`value_type`, text): The kind of value the flag serves. Leave empty for on or off. One of: `boolean` (On or off), `string` (Text), `number`, `json`.
- Default value (`default_value`, text, required): The value served when the flag is on and no rule matches, such as true, a word, a number or JSON.
- Description (`description`, text): What the flag is for.
- Project (`project_id`, text): The project the flag belongs to.
- Owner (`owner`, text): The owner's email address in GrowthBook.
- Tags (`tags`, list): Tags for filtering and grouping.
- On in environments (`enabled_in`, list): Environments the flag is on in. Leave empty to follow each environment's default.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "feature": {
      "archived": true,
      "dateCreated": "example",
      "dateUpdated": "example",
      "defaultValue": "example",
      "description": "example",
      "environments": {},
      "id": "example",
      "owner": "example",
      "ownerEmail": "example",
      "prerequisites": [
        "example"
      ],
      "project": "example",
      "revision": {
        "comment": "example",
        "date": "example",
        "version": 1
      },
      "tags": [
        "example"
      ],
      "valueType": "example"
    }
  }
}
```

### Create project

Create a project to group feature flags, experiments and metrics.

**Inputs**

- Name (`name`, text, required): The project's name.
- Description (`description`, text): What the project is for.
- Owner (`owner`, text): The owner's email address in GrowthBook.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "project": {
      "dateCreated": "example",
      "dateUpdated": "example",
      "description": "example",
      "id": "example",
      "name": "example",
      "owner": "example",
      "publicId": "example",
      "settings": {}
    }
  }
}
```

### Create saved group

Create a saved group: a list of attribute values, such as user IDs, or a targeting condition.

**Inputs**

- Name (`name`, text, required): The group's name.
- Type (`type`, text): A list of values or a targeting condition. Leave empty for a list. One of: `list` (A list of attribute values), `condition` (A targeting condition).
- Attribute (`attribute_key`, text): For a list: the attribute the values are, such as id or email.
- Values (`values`, list): For a list: the attribute values in the group.
- Condition (`condition`, text): For a condition: the targeting condition as JSON, such as {"country": "US"}.
- Description (`description`, text): Who is in the group.
- Owner (`owner`, text): The owner's email address in GrowthBook.
- Projects (`project_ids`, list): Projects the group is offered in. Leave empty for all.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "savedGroup": {
      "archived": true,
      "attributeKey": "example",
      "condition": "example",
      "dateCreated": "example",
      "dateUpdated": "example",
      "description": "example",
      "id": "example",
      "name": "example",
      "owner": "example",
      "projects": [
        "example"
      ],
      "type": "example",
      "values": [
        "example"
      ]
    }
  }
}
```

### Delete experiment

Delete an experiment.

**Inputs**

- Experiment (`experiment_id`, text, required): The experiment.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "deletedId": "example"
  }
}
```

### Delete feature flag

Delete a feature flag.

**Inputs**

- Feature flag (`feature_id`, text, required): The feature flag.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "deletedId": "example"
  }
}
```

### Delete project

Delete a project.

**Inputs**

- Project (`project_id`, text, required): The project.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "deletedId": "example"
  }
}
```

### Delete saved group

Delete a saved group.

**Inputs**

- Saved group (`saved_group_id`, text, required): The saved group.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "deletedId": "example"
  }
}
```

### Get experiment

Get an experiment's variations, phases, status and result summary.

**Inputs**

- Experiment (`experiment_id`, text, required): The experiment.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "experiment": {
      "archived": true,
      "autoRefresh": true,
      "dateCreated": "example",
      "dateUpdated": "example",
      "description": "example",
      "hashAttribute": "example",
      "hypothesis": "example",
      "id": "example",
      "linkedFeatures": [
        "example"
      ],
      "name": "example",
      "owner": "example",
      "phases": [
        {
          "condition": "example",
          "coverage": 1,
          "dateEnded": "example",
          "dateStarted": "example",
          "name": "example",
          "reasonForStopping": "example"
        }
      ],
      "project": "example",
      "resultSummary": {
        "conclusions": "example",
        "status": "example",
        "winner": "example"
      },
      "settings": {
        "assignmentQueryId": "example",
        "datasourceId": "example",
        "statsEngine": "example"
      },
      "status": "example",
      "tags": [
        "example"
      ],
      "trackingKey": "example",
      "type": "example",
      "variations": [
        {
          "description": "example",
          "key": "example",
          "name": "example",
          "variationId": "example"
        }
      ]
    }
  }
}
```

### Get experiment results

Get an experiment's latest results: users and metric values per variation.

**Inputs**

- Experiment (`experiment_id`, text, required): The experiment.
- Phase (`phase`, text): Which phase, counting from 0. Leave empty for the latest.
- Dimension (`dimension`, text): Break the results down by this dimension.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "result": {
      "dateEnd": "example",
      "dateStart": "example",
      "dateUpdated": "example",
      "dimension": {
        "id": "example",
        "type": "example"
      },
      "experimentId": "example",
      "id": "example",
      "phase": "example",
      "results": [
        {
          "checks": {
            "srm": 1
          },
          "dimension": "example",
          "metrics": [
            {
              "metricId": "example",
              "variations": [
                {}
              ]
            }
          ],
          "totalUsers": 1
        }
      ]
    }
  }
}
```

### Get feature flag

Get a feature flag, whether it is on in each environment, and its rules.

**Inputs**

- Feature flag (`feature_id`, text, required): The feature flag.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "feature": {
      "archived": true,
      "dateCreated": "example",
      "dateUpdated": "example",
      "defaultValue": "example",
      "description": "example",
      "environments": {},
      "id": "example",
      "owner": "example",
      "ownerEmail": "example",
      "prerequisites": [
        "example"
      ],
      "project": "example",
      "revision": {
        "comment": "example",
        "date": "example",
        "version": 1
      },
      "tags": [
        "example"
      ],
      "valueType": "example"
    }
  }
}
```

### Get project

Get a project's name, description and owner.

**Inputs**

- Project (`project_id`, text, required): The project.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "project": {
      "dateCreated": "example",
      "dateUpdated": "example",
      "description": "example",
      "id": "example",
      "name": "example",
      "owner": "example",
      "publicId": "example",
      "settings": {}
    }
  }
}
```

### List environments

List the organization's environments, such as dev and production.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "environments": [
      {
        "defaultState": true,
        "description": "example",
        "id": "example",
        "isProduction": true,
        "projects": [
          "example"
        ],
        "toggleOnList": true
      }
    ]
  }
}
```

### List experiments

List experiments, optionally by project, status or name, sorted as you choose.

**Inputs**

- Project (`project_id`, text): Only those in this project.
- Status (`status`, text): Only experiments with this status. One of: `draft`, `running`, `stopped`.
- Search (`search`, text): Only experiments matching this text.
- Sort by (`sort_by`, text): What to sort by. Leave empty for date created. One of: `dateCreated` (Date created), `dateUpdated` (Date updated), `name`.
- Sort order (`sort_order`, text): Which come first. Leave empty for oldest first. One of: `asc` (Oldest or A to Z first), `desc` (Newest or Z to A first).
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Offset (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "experiments": [
      {
        "archived": true,
        "autoRefresh": true,
        "dateCreated": "example",
        "dateUpdated": "example",
        "description": "example",
        "hashAttribute": "example",
        "hypothesis": "example",
        "id": "example",
        "linkedFeatures": [
          "example"
        ],
        "name": "example",
        "owner": "example",
        "phases": [
          {
            "condition": "example",
            "coverage": 1,
            "dateEnded": "example",
            "dateStarted": "example",
            "name": "example",
            "reasonForStopping": "example"
          }
        ],
        "project": "example",
        "resultSummary": {
          "conclusions": "example",
          "status": "example",
          "winner": "example"
        },
        "settings": {
          "assignmentQueryId": "example",
          "datasourceId": "example",
          "statsEngine": "example"
        },
        "status": "example",
        "tags": [
          "example"
        ],
        "trackingKey": "example",
        "type": "example",
        "variations": [
          {
            "description": "example",
            "key": "example",
            "name": "example",
            "variationId": "example"
          }
        ]
      }
    ],
    "hasMore": true,
    "limit": 1,
    "nextOffset": 1,
    "offset": 1,
    "total": 1
  }
}
```

### List feature flags

List feature flags with their default value and per-environment settings.

**Inputs**

- Project (`project_id`, text): Only those in this project.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Offset (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "features": [
      {
        "archived": true,
        "dateCreated": "example",
        "dateUpdated": "example",
        "defaultValue": "example",
        "description": "example",
        "environments": {},
        "id": "example",
        "owner": "example",
        "ownerEmail": "example",
        "prerequisites": [
          "example"
        ],
        "project": "example",
        "revision": {
          "comment": "example",
          "date": "example",
          "version": 1
        },
        "tags": [
          "example"
        ],
        "valueType": "example"
      }
    ],
    "hasMore": true,
    "limit": 1,
    "nextOffset": 1,
    "offset": 1,
    "total": 1
  }
}
```

### List members

List the organization's members and their roles.

**Inputs**

- Email (`email`, text): Only the member with this email address.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Offset (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "hasMore": true,
    "limit": 1,
    "members": [
      {
        "dateCreated": "example",
        "email": "example",
        "environments": [
          "example"
        ],
        "globalRole": "example",
        "id": "example",
        "lastLoginDate": "example",
        "name": "example",
        "teams": [
          "example"
        ]
      }
    ],
    "nextOffset": 1,
    "offset": 1,
    "total": 1
  }
}
```

### List metrics

List the metrics experiments can measure.

**Inputs**

- Project (`project_id`, text): Only those in this project.
- Data source (`datasource_id`, text): Only metrics from this data source.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Offset (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "hasMore": true,
    "limit": 1,
    "metrics": [
      {
        "archived": true,
        "datasourceId": "example",
        "dateCreated": "example",
        "dateUpdated": "example",
        "description": "example",
        "id": "example",
        "name": "example",
        "owner": "example",
        "projects": [
          "example"
        ],
        "tags": [
          "example"
        ],
        "type": "example"
      }
    ],
    "nextOffset": 1,
    "offset": 1,
    "total": 1
  }
}
```

### List projects

List the organization's projects.

**Inputs**

- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Offset (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "hasMore": true,
    "limit": 1,
    "nextOffset": 1,
    "offset": 1,
    "projects": [
      {
        "dateCreated": "example",
        "dateUpdated": "example",
        "description": "example",
        "id": "example",
        "name": "example",
        "owner": "example",
        "publicId": "example",
        "settings": {}
      }
    ],
    "total": 1
  }
}
```

### List saved groups

List saved groups: lists of IDs or targeting conditions feature flags reuse.

**Inputs**

- Type (`type`, text): Only lists or only conditions. One of: `list` (A list of attribute values), `condition` (A targeting condition).
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Offset (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "hasMore": true,
    "limit": 1,
    "nextOffset": 1,
    "offset": 1,
    "savedGroups": [
      {
        "archived": true,
        "attributeKey": "example",
        "condition": "example",
        "dateCreated": "example",
        "dateUpdated": "example",
        "description": "example",
        "id": "example",
        "name": "example",
        "owner": "example",
        "projects": [
          "example"
        ],
        "type": "example",
        "values": [
          "example"
        ]
      }
    ],
    "total": 1
  }
}
```

### List segments

List the segments experiment results can be narrowed to.

**Inputs**

- Data source (`datasource_id`, text): Only segments from this data source.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Offset (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "hasMore": true,
    "limit": 1,
    "nextOffset": 1,
    "offset": 1,
    "segments": [
      {
        "datasourceId": "example",
        "dateCreated": "example",
        "dateUpdated": "example",
        "description": "example",
        "id": "example",
        "identifierType": "example",
        "name": "example",
        "owner": "example",
        "projects": [
          "example"
        ],
        "query": "example",
        "type": "example"
      }
    ],
    "total": 1
  }
}
```

### Turn feature flag on or off

Turn a feature flag on or off in one environment and publish the change.

**Inputs**

- Feature flag (`feature_id`, text, required): The feature flag.
- Environment (`environment`, text, required): The environment.
- On (`enabled`, true/false, required): Whether the flag is on in the environment.
- Reason (`reason`, text): Why, for the audit log.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "feature": {
      "archived": true,
      "dateCreated": "example",
      "dateUpdated": "example",
      "defaultValue": "example",
      "description": "example",
      "environments": {},
      "id": "example",
      "owner": "example",
      "ownerEmail": "example",
      "prerequisites": [
        "example"
      ],
      "project": "example",
      "revision": {
        "comment": "example",
        "date": "example",
        "version": 1
      },
      "tags": [
        "example"
      ],
      "valueType": "example"
    }
  }
}
```

### Update experiment

Change an experiment's name, hypothesis, description or tags, or archive it. Only the fields filled in change.

**Inputs**

- Experiment (`experiment_id`, text, required): The experiment.
- Name (`name`, text): The experiment's name.
- Hypothesis (`hypothesis`, text): What you expect to happen.
- Description (`description`, text): What the experiment tests.
- Tags (`tags`, list): The experiment's tags. These replace the tags it has.
- Archived (`archived`, true/false): Archive the experiment, or bring it back.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "experiment": {
      "archived": true,
      "autoRefresh": true,
      "dateCreated": "example",
      "dateUpdated": "example",
      "description": "example",
      "hashAttribute": "example",
      "hypothesis": "example",
      "id": "example",
      "linkedFeatures": [
        "example"
      ],
      "name": "example",
      "owner": "example",
      "phases": [
        {
          "condition": "example",
          "coverage": 1,
          "dateEnded": "example",
          "dateStarted": "example",
          "name": "example",
          "reasonForStopping": "example"
        }
      ],
      "project": "example",
      "resultSummary": {
        "conclusions": "example",
        "status": "example",
        "winner": "example"
      },
      "settings": {
        "assignmentQueryId": "example",
        "datasourceId": "example",
        "statsEngine": "example"
      },
      "status": "example",
      "tags": [
        "example"
      ],
      "trackingKey": "example",
      "type": "example",
      "variations": [
        {
          "description": "example",
          "key": "example",
          "name": "example",
          "variationId": "example"
        }
      ]
    }
  }
}
```

### Update feature flag

Change a feature flag's default value, description, owner, tags or project, or archive it. Only the fields filled in change.

**Inputs**

- Feature flag (`feature_id`, text, required): The feature flag.
- Default value (`default_value`, text): The value served when the flag is on and no rule matches.
- Description (`description`, text): What the flag is for.
- Owner (`owner`, text): The owner's email address in GrowthBook.
- Tags (`tags`, list): The flag's tags. These replace the tags it has.
- Project (`project_id`, text): Move the flag to this project.
- Archived (`archived`, true/false): Archive the flag, or bring it back.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "feature": {
      "archived": true,
      "dateCreated": "example",
      "dateUpdated": "example",
      "defaultValue": "example",
      "description": "example",
      "environments": {},
      "id": "example",
      "owner": "example",
      "ownerEmail": "example",
      "prerequisites": [
        "example"
      ],
      "project": "example",
      "revision": {
        "comment": "example",
        "date": "example",
        "version": 1
      },
      "tags": [
        "example"
      ],
      "valueType": "example"
    }
  }
}
```

### Update project

Rename a project or change its description or owner.

**Inputs**

- Project (`project_id`, text, required): The project.
- Name (`name`, text): The project's name.
- Description (`description`, text): What the project is for.
- Owner (`owner`, text): The owner's email address in GrowthBook.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "project": {
      "dateCreated": "example",
      "dateUpdated": "example",
      "description": "example",
      "id": "example",
      "name": "example",
      "owner": "example",
      "publicId": "example",
      "settings": {}
    }
  }
}
```

### Update saved group

Rename a saved group or replace its values or condition. Only the fields filled in change.

**Inputs**

- Saved group (`saved_group_id`, text, required): The saved group.
- Name (`name`, text): The group's name.
- Values (`values`, list): For a list: the values in the group. These replace the values it has.
- Condition (`condition`, text): For a condition: the targeting condition as JSON.
- Description (`description`, text): Who is in the group.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "savedGroup": {
      "archived": true,
      "attributeKey": "example",
      "condition": "example",
      "dateCreated": "example",
      "dateUpdated": "example",
      "description": "example",
      "id": "example",
      "name": "example",
      "owner": "example",
      "projects": [
        "example"
      ],
      "type": "example",
      "values": [
        "example"
      ]
    }
  }
}
```
