Skip to main content
GET
/
metrics
/
{id}
cURL
curl https://api.growthbook.io/api/v1/metrics/met_123abc \
  -u secret_abc123DEF456:
{
  "metric": {
    "id": "<string>",
    "managedBy": "",
    "dateCreated": "<string>",
    "dateUpdated": "<string>",
    "owner": "<string>",
    "datasourceId": "<string>",
    "name": "<string>",
    "description": "<string>",
    "type": "binomial",
    "tags": [
      "<string>"
    ],
    "projects": [
      "<string>"
    ],
    "archived": true,
    "behavior": {
      "goal": "increase",
      "windowSettings": {
        "type": "none",
        "delayValue": 123,
        "delayUnit": "minutes",
        "windowValue": 123,
        "windowUnit": "minutes"
      },
      "riskThresholdSuccess": 123,
      "riskThresholdDanger": 123,
      "minPercentChange": 123,
      "maxPercentChange": 123,
      "minSampleSize": 123,
      "targetMDE": 123,
      "cappingSettings": {
        "type": "none",
        "value": 123,
        "ignoreZeros": true
      },
      "cap": 123,
      "capping": "absolute",
      "capValue": 123,
      "priorSettings": {
        "override": true,
        "proper": true,
        "mean": 123,
        "stddev": 123
      },
      "conversionWindowStart": 123,
      "conversionWindowEnd": 123
    },
    "sql": {
      "identifierTypes": [
        "<string>"
      ],
      "conversionSQL": "<string>",
      "userAggregationSQL": "<string>",
      "denominatorMetricId": "<string>"
    },
    "sqlBuilder": {
      "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>"
        }
      ]
    }
  }
}

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 id of the requested resource

Response

200 - application/json

Success

metric
object
required