GrowthBook REST API (1.0.0)
Download OpenAPI specification:Download
GrowthBook offers a full REST API for interacting with the GrowthBook application. This is currently in beta as we add more authenticated API routes and features.
Request data can use either JSON or Form data encoding (with proper Content-Type
headers). All response bodies are JSON-encoded.
The API base URL for GrowthBook Cloud is https://api.growthbook.io
. For self-hosted deployments, it is the same as your API_HOST environment variable (defaults to http://localhost:3100
). The rest of these docs will assume you are using GrowthBook Cloud.
We support both the HTTP Basic and Bearer authentication schemes for convenience.
You first need to generate a new Secret Key in GrowthBook by going to Settings -> API Keys
.
If using HTTP Basic auth, pass the Secret Key as the username and leave the password blank:
curl https://api.growthbook.io/api/v1 \
-u secret_abc123DEF456:
# The ":" at the end stops curl from asking for a password
If using Bearer auth, pass the Secret Key as the token:
curl https://api.growthbook.io/api/v1 \
-H "Authorization: Bearer secret_abc123DEF456"
The API may return the following error status codes:
- 400 - Bad Request - Often due to a missing required parameter
- 401 - Unauthorized - No valid API key provided
- 402 - Request Failed - The parameters are valid, but the request failed
- 403 - Forbidden - Provided API key does not have the required access
- 404 - Not Found - Unknown API route or requested resource
- 429 - Too Many Requests - You exceeded the rate limit of 60 requests per minute. Try again later.
- 5XX - Server Error - Something went wrong on GrowthBook's end (these are rare)
The response body will be a JSON object with the following properties:
- message - Information about the error
Get all projects
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer How many items to skip (use in conjunction with limit for pagination) |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/projects \ -u secret_abc123DEF456:
Response samples
- 200
{- "projects": [
- {
- "id": "string",
- "name": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z"
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single project
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/projects/prj_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "project": {
- "id": "string",
- "name": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z"
}
}
Get all features
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/features \ -u secret_abc123DEF456:
Response samples
- 200
{- "features": [
- {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "archived": true,
- "description": "string",
- "owner": "string",
- "project": "string",
- "valueType": "boolean",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}, - "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- null
], - "hashAttribute": "string",
- "namespace": [
- null,
- null,
- null
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}
}
}, - "property2": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}, - "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- null
], - "hashAttribute": "string",
- "namespace": [
- null,
- null,
- null
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}
}
}
}, - "revision": {
- "version": 0,
- "comment": "string",
- "date": "2019-08-24T14:15:22Z",
- "publishedBy": "string"
}
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single feature
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/features/my_feature \ -u secret_abc123DEF456:
Response samples
- 200
{- "feature": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "archived": true,
- "description": "string",
- "owner": "string",
- "project": "string",
- "valueType": "boolean",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}, - "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}
}
}, - "property2": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}, - "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}
}
}
}, - "revision": {
- "version": 0,
- "comment": "string",
- "date": "2019-08-24T14:15:22Z",
- "publishedBy": "string"
}
}
}
Toggle a feature in one or more environments
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
reason | string |
required | object |
Responses
Request samples
- Payload
- cURL
{- "reason": "string",
- "environments": {
- "property1": true,
- "property2": true
}
}
Response samples
- 200
{- "feature": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "archived": true,
- "description": "string",
- "owner": "string",
- "project": "string",
- "valueType": "boolean",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}, - "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}
}
}, - "property2": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}, - "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "id": "string",
- "enabled": true,
- "type": "string",
- "value": "string"
}
], - "definition": {
- "defaultValue": "string",
- "rules": [
- {
- "force": "string",
- "weights": [
- null
], - "variations": [
- "string"
], - "hashAttribute": "string",
- "namespace": [
- 0,
- 0,
- 0
], - "key": "string",
- "coverage": 0,
- "condition": { }
}
]
}
}
}
}, - "revision": {
- "version": 0,
- "comment": "string",
- "date": "2019-08-24T14:15:22Z",
- "publishedBy": "string"
}
}
}
Get all data sources
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/data-sources \ -u secret_abc123DEF456:
Response samples
- 200
{- "dataSources": [
- {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "type": "string",
- "name": "string",
- "description": "string",
- "projectIds": [
- "string"
], - "eventTracker": "string",
- "identifierTypes": [
- {
- "id": "string",
- "description": "string"
}
], - "assignmentQueries": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "identifierType": "string",
- "sql": "string",
- "includesNameColumns": true,
- "dimensionColumns": [
- "string"
]
}
], - "identifierJoinQueries": [
- {
- "identifierTypes": [
- "string"
], - "sql": "string"
}
], - "mixpanelSettings": {
- "viewedExperimentEventName": "string",
- "experimentIdProperty": "string",
- "variationIdProperty": "string",
- "extraUserIdProperty": "string"
}
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single data source
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/data-sources/ds_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "dataSource": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "type": "string",
- "name": "string",
- "description": "string",
- "projectIds": [
- "string"
], - "eventTracker": "string",
- "identifierTypes": [
- {
- "id": "string",
- "description": "string"
}
], - "assignmentQueries": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "identifierType": "string",
- "sql": "string",
- "includesNameColumns": true,
- "dimensionColumns": [
- "string"
]
}
], - "identifierJoinQueries": [
- {
- "identifierTypes": [
- "string"
], - "sql": "string"
}
], - "mixpanelSettings": {
- "viewedExperimentEventName": "string",
- "experimentIdProperty": "string",
- "variationIdProperty": "string",
- "extraUserIdProperty": "string"
}
}
}
Get all metrics
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
datasourceId | string Filter by Data Source |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/metrics \ -u secret_abc123DEF456:
Response samples
- 200
{- "metrics": [
- {
- "id": "string",
- "dateCreated": "string",
- "dateUpdated": "string",
- "owner": "string",
- "datasourceId": "string",
- "name": "string",
- "description": "string",
- "type": "string",
- "tags": [
- "string"
], - "projects": [
- "string"
], - "archived": true,
- "behavior": {
- "goal": "increase",
- "cap": 0,
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "riskThresholdSuccess": 0,
- "riskThresholdDanger": 0,
- "minPercentChange": 0,
- "maxPercentChange": 0,
- "minSampleSize": 0
}, - "sql": {
- "identifierTypes": [
- "string"
], - "conversionSQL": "string",
- "userAggregationSQL": "string",
- "denominatorMetricId": "string",
- "builder": {
- "identifierTypeColumns": [
- {
- "identifierType": "string",
- "columnName": "string"
}
], - "tableName": "string",
- "valueColumnName": "string",
- "timestampColumnName": "string",
- "conditions": [
- {
- "column": "string",
- "operator": "string",
- "value": "string"
}
]
}
}, - "mixpanel": {
- "eventName": "string",
- "eventValue": "string",
- "userAggregation": "string",
- "conditions": [
- {
- "property": "string",
- "operator": "string",
- "value": "string"
}
]
}
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single metric
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/metrics/met_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "metric": {
- "id": "string",
- "dateCreated": "string",
- "dateUpdated": "string",
- "owner": "string",
- "datasourceId": "string",
- "name": "string",
- "description": "string",
- "type": "string",
- "tags": [
- "string"
], - "projects": [
- "string"
], - "archived": true,
- "behavior": {
- "goal": "increase",
- "cap": 0,
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "riskThresholdSuccess": 0,
- "riskThresholdDanger": 0,
- "minPercentChange": 0,
- "maxPercentChange": 0,
- "minSampleSize": 0
}, - "sql": {
- "identifierTypes": [
- "string"
], - "conversionSQL": "string",
- "userAggregationSQL": "string",
- "denominatorMetricId": "string",
- "builder": {
- "identifierTypeColumns": [
- {
- "identifierType": "string",
- "columnName": "string"
}
], - "tableName": "string",
- "valueColumnName": "string",
- "timestampColumnName": "string",
- "conditions": [
- {
- "column": "string",
- "operator": "string",
- "value": "string"
}
]
}
}, - "mixpanel": {
- "eventName": "string",
- "eventValue": "string",
- "userAggregation": "string",
- "conditions": [
- {
- "property": "string",
- "operator": "string",
- "value": "string"
}
]
}
}
}
Get all experiments
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
datasourceId | string Filter by Data Source |
experimentId | string Filter the returned list by the experiment tracking key (id) |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/experiments \ -u secret_abc123DEF456:
Response samples
- 200
{- "experiments": [
- {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "project": "string",
- "hypothesis": "string",
- "description": "string",
- "tags": [
- "string"
], - "owner": "string",
- "archived": true,
- "status": "string",
- "autoRefresh": true,
- "variations": [
- {
- "variationId": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- "string"
]
}
], - "phases": [
- {
- "name": "string",
- "dateStarted": "string",
- "dateEnded": "string",
- "reasonForStopping": "string",
- "seed": "string",
- "coverage": 0,
- "trafficSplit": [
- {
- "variationId": "string",
- "weight": 0
}
], - "namespace": {
- "namespaceId": "string",
- "range": [ ]
}, - "targetingCondition": "string"
}
], - "settings": {
- "datasourceId": "string",
- "assignmentQueryId": "string",
- "experimentId": "string",
- "segmentId": "string",
- "queryFilter": "string",
- "inProgressConversions": "include",
- "multipleVariations": "include",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "goals": [
- {
- "metricId": "string",
- "overrides": {
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "guardrails": [
- {
- "metricId": "string",
- "overrides": {
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "activationMetric": {
- "metricId": "string",
- "overrides": {
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
}, - "resultSummary": {
- "status": "string",
- "winner": "string",
- "conclusions": "string"
}
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single experiment
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/experiments/exp_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "experiment": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "project": "string",
- "hypothesis": "string",
- "description": "string",
- "tags": [
- "string"
], - "owner": "string",
- "archived": true,
- "status": "string",
- "autoRefresh": true,
- "variations": [
- {
- "variationId": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- "string"
]
}
], - "phases": [
- {
- "name": "string",
- "dateStarted": "string",
- "dateEnded": "string",
- "reasonForStopping": "string",
- "seed": "string",
- "coverage": 0,
- "trafficSplit": [
- {
- "variationId": "string",
- "weight": 0
}
], - "namespace": {
- "namespaceId": "string",
- "range": [ ]
}, - "targetingCondition": "string"
}
], - "settings": {
- "datasourceId": "string",
- "assignmentQueryId": "string",
- "experimentId": "string",
- "segmentId": "string",
- "queryFilter": "string",
- "inProgressConversions": "include",
- "multipleVariations": "include",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "goals": [
- {
- "metricId": "string",
- "overrides": {
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "guardrails": [
- {
- "metricId": "string",
- "overrides": {
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "activationMetric": {
- "metricId": "string",
- "overrides": {
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
}, - "resultSummary": {
- "status": "string",
- "winner": "string",
- "conclusions": "string"
}
}
}
Get results for an experiment
Authorizations:
path Parameters
id required | string The id of the requested resource |
query Parameters
phase | string |
dimension | string |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/experiments/exp_123abc/results \ -u secret_abc123DEF456:
Response samples
- 200
{- "result": {
- "id": "string",
- "dateUpdated": "string",
- "experimentId": "string",
- "phase": "string",
- "dateStart": "string",
- "dateEnd": "string",
- "dimension": {
- "type": "string",
- "id": "string"
}, - "settings": {
- "datasourceId": "string",
- "assignmentQueryId": "string",
- "experimentId": "string",
- "segmentId": "string",
- "queryFilter": "string",
- "inProgressConversions": "include",
- "multipleVariations": "include",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "goals": [
- {
- "metricId": "string",
- "overrides": {
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "guardrails": [
- {
- "metricId": "string",
- "overrides": {
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "activationMetric": {
- "metricId": "string",
- "overrides": {
- "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
}, - "queryIds": [
- "string"
], - "results": [
- {
- "dimension": "string",
- "totalUsers": 0,
- "checks": {
- "srm": 0
}, - "metrics": [
- {
- "metricId": "string",
- "variations": [
- {
- "variationId": "string",
- "analyses": [
- {
- "engine": null,
- "numerator": null,
- "denominator": null,
- "mean": null,
- "stddev": null,
- "percentChange": null,
- "ciLow": null,
- "ciHigh": null,
- "pValue": null,
- "risk": null,
- "chanceToBeatControl": null
}
]
}
]
}
]
}
]
}
}
Get all dimensions
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer How many items to skip (use in conjunction with limit for pagination) |
datasourceId | string Filter by Data Source |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/dimensions \ -u secret_abc123DEF456:
Response samples
- 200
{- "dimensions": [
- {
- "id": "string",
- "dateCreated": "string",
- "dateUpdated": "string",
- "owner": "string",
- "datasourceId": "string",
- "identifierType": "string",
- "name": "string",
- "query": "string"
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single dimension
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/dimensions/dim_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "dimension": {
- "id": "string",
- "dateCreated": "string",
- "dateUpdated": "string",
- "owner": "string",
- "datasourceId": "string",
- "identifierType": "string",
- "name": "string",
- "query": "string"
}
}
Get all segments
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer How many items to skip (use in conjunction with limit for pagination) |
datasourceId | string Filter by Data Source |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/segments \ -u secret_abc123DEF456:
Response samples
- 200
{- "segments": [
- {
- "id": "string",
- "owner": "string",
- "datasourceId": "string",
- "identifierType": "string",
- "name": "string",
- "query": "string",
- "dateCreated": "string",
- "dateUpdated": "string"
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single segment
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/segments/seg_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "segment": {
- "id": "string",
- "owner": "string",
- "datasourceId": "string",
- "identifierType": "string",
- "name": "string",
- "query": "string",
- "dateCreated": "string",
- "dateUpdated": "string"
}
}
Get all sdk connections
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
withProxy | string |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/sdk-connections \ -u secret_abc123DEF456:
Response samples
- 200
{- "connections": [
- {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "languages": [
- "string"
], - "environment": "string",
- "project": "string",
- "encryptPayload": true,
- "encryptionKey": "string",
- "key": "string",
- "proxyEnabled": true,
- "proxyHost": "string",
- "proxySigningKey": "string"
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single sdk connection
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/sdk-connections/sdk_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "sdkConnection": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "languages": [
- "string"
], - "environment": "string",
- "project": "string",
- "encryptPayload": true,
- "encryptionKey": "string",
- "key": "string",
- "proxyEnabled": true,
- "proxyHost": "string",
- "proxySigningKey": "string"
}
}
Get all visual changesets
Authorizations:
path Parameters
id required | string The experiment id the visual changesets belong to |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/experiments/exp_123abc/visual-changesets \ -u secret_abc123DEF456:
Response samples
- 200
{- "visualChangesets": [
- {
- "id": "string",
- "urlPattern": "string",
- "editorUrl": "string",
- "experiment": "string",
- "visualChanges": [
- {
- "description": "string",
- "css": "string",
- "variation": "string",
- "domMutations": [
- {
- "selector": "string",
- "action": "append",
- "attribute": "string",
- "value": "string"
}
]
}
]
}
]
}
Get a single visual changeset
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/visual-changesets/ds_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "visualChangeset": {
- "id": "string",
- "urlPattern": "string",
- "editorUrl": "string",
- "experiment": "string",
- "visualChanges": [
- {
- "description": "string",
- "css": "string",
- "variation": "string",
- "domMutations": [
- {
- "selector": "string",
- "action": "append",
- "attribute": "string",
- "value": "string"
}
]
}
]
}
}