GrowthBook · Capability

GrowthBook REST API — metrics

GrowthBook REST API — metrics. 5 operations. Lead operation: Get all metrics. Self-contained Naftiko capability covering one Growthbook business surface.

Run with Naftiko Growthbookmetrics

What You Can Do

GET
Listmetrics — Get all metrics
/v1/v1/metrics
POST
Postmetric — Create a single metric
/v1/v1/metrics
GET
Getmetric — Get a single metric
/v1/v1/metrics/{id}
PUT
Putmetric — Update a metric
/v1/v1/metrics/{id}
DELETE
Deletemetric — Deletes a metric
/v1/v1/metrics/{id}

MCP Tools

get-all-metrics

Get all metrics

read-only idempotent
create-single-metric

Create a single metric

get-single-metric

Get a single metric

read-only idempotent
update-metric

Update a metric

idempotent
deletes-metric

Deletes a metric

idempotent

Capability Spec

growthbook-metrics.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GrowthBook REST API — metrics
  description: 'GrowthBook REST API — metrics. 5 operations. Lead operation: Get all metrics. Self-contained Naftiko capability
    covering one Growthbook business surface.'
  tags:
  - Growthbook
  - metrics
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GROWTHBOOK_API_KEY: GROWTHBOOK_API_KEY
capability:
  consumes:
  - type: http
    namespace: growthbook-metrics
    baseUri: https://api.growthbook.io/api
    description: GrowthBook REST API — metrics business capability. Self-contained, no shared references.
    resources:
    - name: v1-metrics
      path: /v1/metrics
      operations:
      - name: listmetrics
        method: GET
        description: Get all metrics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: postmetric
        method: POST
        description: Create a single metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-metrics-id
      path: /v1/metrics/{id}
      operations:
      - name: getmetric
        method: GET
        description: Get a single metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: putmetric
        method: PUT
        description: Update a metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletemetric
        method: DELETE
        description: Deletes a metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.GROWTHBOOK_API_KEY}}'
  exposes:
  - type: rest
    namespace: growthbook-metrics-rest
    port: 8080
    description: REST adapter for GrowthBook REST API — metrics. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/metrics
      name: v1-metrics
      description: REST surface for v1-metrics.
      operations:
      - method: GET
        name: listmetrics
        description: Get all metrics
        call: growthbook-metrics.listmetrics
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postmetric
        description: Create a single metric
        call: growthbook-metrics.postmetric
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/metrics/{id}
      name: v1-metrics-id
      description: REST surface for v1-metrics-id.
      operations:
      - method: GET
        name: getmetric
        description: Get a single metric
        call: growthbook-metrics.getmetric
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putmetric
        description: Update a metric
        call: growthbook-metrics.putmetric
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletemetric
        description: Deletes a metric
        call: growthbook-metrics.deletemetric
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: growthbook-metrics-mcp
    port: 9090
    transport: http
    description: MCP adapter for GrowthBook REST API — metrics. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-all-metrics
      description: Get all metrics
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: growthbook-metrics.listmetrics
      outputParameters:
      - type: object
        mapping: $.
    - name: create-single-metric
      description: Create a single metric
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: growthbook-metrics.postmetric
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-metric
      description: Get a single metric
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: growthbook-metrics.getmetric
      outputParameters:
      - type: object
        mapping: $.
    - name: update-metric
      description: Update a metric
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: growthbook-metrics.putmetric
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: deletes-metric
      description: Deletes a metric
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: growthbook-metrics.deletemetric
      outputParameters:
      - type: object
        mapping: $.