Skip to main content
POST
/
fact-metrics
/
{id}
/
analysis
cURL
curl -X POST https://api.growthbook.io/api/v1/fact-metrics/fact_1234/analysis \
  -d '{"lookbackDays":90}' \
  -u secret_abc123DEF456:
{
  "metricAnalysis": {
    "id": "<string>",
    "status": "<string>",
    "settings": {}
  }
}

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.

Authorizations

Authorization
string
header
required

If using Bearer auth, pass the Secret Key as the token:

curl https://api.growthbook.io/api/v1 \
-H "Authorization: Bearer secret_abc123DEF456"

Path Parameters

id
string
required

The fact metric id to analyze

Body

application/json
userIdType
string

The identifier type to use for the analysis. If not provided, defaults to the first available identifier type in the fact table.

lookbackDays
number

Number of days to look back for the analysis. Defaults to 30.

Required range: 1 <= x <= 999999
populationType
enum<string>

The type of population to analyze. Defaults to 'factTable', meaning the analysis will return the metric value for all units found in the fact table.

Available options:
factTable,
segment
populationId
string | null

The ID of the population (e.g., segment ID) when populationType is not 'factTable'. Defaults to null.

additionalNumeratorFilters
string[]

We support passing in adhoc filters for an analysis that don't live on the metric itself. These are in addition to the metric's filters. To use this, you can pass in an array of Fact Table Filter Ids.

additionalDenominatorFilters
string[]

We support passing in adhoc filters for an analysis that don't live on the metric itself. These are in addition to the metric's filters. To use this, you can pass in an array of Fact Table Filter Ids.

useCache
boolean

Whether to use a cached query if one exists. Defaults to true.

Response

200 - application/json

Success

metricAnalysis
object
required