curl -X POST https://api.growthbook.io/api/v1/fact-tables \
-d '{"name":"Orders", "datasource":"ds_abc123", "userIdTypes":["id"], "sql":"SELECT * FROM orders"}' \
-u secret_abc123DEF456:
{
"factTable": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"owner": "<unknown>",
"projects": [
"<string>"
],
"tags": [
"<string>"
],
"datasource": "<string>",
"userIdTypes": [
"<string>"
],
"sql": "<string>",
"managedBy": "",
"dateCreated": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z",
"eventName": "<string>",
"columns": [
{
"column": "<string>",
"datatype": "number",
"deleted": false,
"numberFormat": "",
"jsonFields": {},
"name": "<string>",
"description": "<string>",
"alwaysInlineFilter": false,
"isAutoSliceColumn": false,
"autoSlices": [
"<string>"
],
"lockedAutoSlices": [
"<string>"
],
"dateCreated": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z"
}
],
"columnsError": "<string>",
"archived": true
}
}Documentation Index
Fetch the complete documentation index at: https://growthbook-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
If using Bearer auth, pass the Secret Key as the token:
curl https://api.growthbook.io/api/v1 \
-H "Authorization: Bearer secret_abc123DEF456"
The datasource id
List of identifier columns in this table. For example, "id" or "anonymous_id"
The SQL query for this fact table
Description of the fact table
List of associated project ids
List of associated tags
The event name used in SQL template variables
Set this to "api" to disable editing in the GrowthBook UI
, api, admin Success
Show child attributes
curl -X POST https://api.growthbook.io/api/v1/fact-tables \
-d '{"name":"Orders", "datasource":"ds_abc123", "userIdTypes":["id"], "sql":"SELECT * FROM orders"}' \
-u secret_abc123DEF456:
{
"factTable": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"owner": "<unknown>",
"projects": [
"<string>"
],
"tags": [
"<string>"
],
"datasource": "<string>",
"userIdTypes": [
"<string>"
],
"sql": "<string>",
"managedBy": "",
"dateCreated": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z",
"eventName": "<string>",
"columns": [
{
"column": "<string>",
"datatype": "number",
"deleted": false,
"numberFormat": "",
"jsonFields": {},
"name": "<string>",
"description": "<string>",
"alwaysInlineFilter": false,
"isAutoSliceColumn": false,
"autoSlices": [
"<string>"
],
"lockedAutoSlices": [
"<string>"
],
"dateCreated": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z"
}
],
"columnsError": "<string>",
"archived": true
}
}