GrowthBook · Capability

GrowthBook REST API — usage

GrowthBook REST API — usage. 1 operations. Lead operation: Get metric usage across experiments. Self-contained Naftiko capability covering one Growthbook business surface.

Run with Naftiko Growthbookusage

What You Can Do

GET
Getmetricusage — Get metric usage across experiments
/v1/v1/usage/metrics

MCP Tools

get-metric-usage-across-experiments

Get metric usage across experiments

read-only idempotent

Capability Spec

growthbook-usage.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GrowthBook REST API — usage
  description: 'GrowthBook REST API — usage. 1 operations. Lead operation: Get metric usage across experiments. Self-contained
    Naftiko capability covering one Growthbook business surface.'
  tags:
  - Growthbook
  - usage
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GROWTHBOOK_API_KEY: GROWTHBOOK_API_KEY
capability:
  consumes:
  - type: http
    namespace: growthbook-usage
    baseUri: https://api.growthbook.io/api
    description: GrowthBook REST API — usage business capability. Self-contained, no shared references.
    resources:
    - name: v1-usage-metrics
      path: /v1/usage/metrics
      operations:
      - name: getmetricusage
        method: GET
        description: Get metric usage across experiments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ids
          in: query
          type: string
          description: List of comma-separated metric IDs (both fact and legacy) to get usage for, e.g. ids=met_123,fact_456
          required: true
    authentication:
      type: bearer
      token: '{{env.GROWTHBOOK_API_KEY}}'
  exposes:
  - type: rest
    namespace: growthbook-usage-rest
    port: 8080
    description: REST adapter for GrowthBook REST API — usage. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/usage/metrics
      name: v1-usage-metrics
      description: REST surface for v1-usage-metrics.
      operations:
      - method: GET
        name: getmetricusage
        description: Get metric usage across experiments
        call: growthbook-usage.getmetricusage
        with:
          ids: rest.ids
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: growthbook-usage-mcp
    port: 9090
    transport: http
    description: MCP adapter for GrowthBook REST API — usage. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-metric-usage-across-experiments
      description: Get metric usage across experiments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: growthbook-usage.getmetricusage
      with:
        ids: tools.ids
      outputParameters:
      - type: object
        mapping: $.