Koyeb · Capability

Koyeb Rest API — Metrics

Koyeb Rest API — Metrics. 1 operations. Lead operation: Get Metrics. Self-contained Naftiko capability covering one Koyeb business surface.

Run with Naftiko KoyebMetrics

What You Can Do

GET
Getmetrics — Get Metrics
/v1/v1/streams/metrics

MCP Tools

get-metrics

Get Metrics

read-only idempotent

Capability Spec

koyeb-metrics.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Koyeb Rest API — Metrics
  description: 'Koyeb Rest API — Metrics. 1 operations. Lead operation: Get Metrics. Self-contained Naftiko capability covering
    one Koyeb business surface.'
  tags:
  - Koyeb
  - Metrics
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    KOYEB_API_KEY: KOYEB_API_KEY
capability:
  consumes:
  - type: http
    namespace: koyeb-metrics
    baseUri: https://app.koyeb.com
    description: Koyeb Rest API — Metrics business capability. Self-contained, no shared references.
    resources:
    - name: v1-streams-metrics
      path: /v1/streams/metrics
      operations:
      - name: getmetrics
        method: GET
        description: Get Metrics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: service_id
          in: query
          type: string
          description: ID of the service to query instances metrics for. Ignored if instance_id is set.
        - name: instance_id
          in: query
          type: string
          description: ID of the instance to query metrics for.
        - name: name
          in: query
          type: string
          description: Metric to query.
        - name: start
          in: query
          type: string
          description: (Optional) Defaults to an hour prior to end.
        - name: end
          in: query
          type: string
          description: (Optional) Defaults to now.
        - name: step
          in: query
          type: string
          description: (Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m.
  exposes:
  - type: rest
    namespace: koyeb-metrics-rest
    port: 8080
    description: REST adapter for Koyeb Rest API — Metrics. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/streams/metrics
      name: v1-streams-metrics
      description: REST surface for v1-streams-metrics.
      operations:
      - method: GET
        name: getmetrics
        description: Get Metrics
        call: koyeb-metrics.getmetrics
        with:
          service_id: rest.service_id
          instance_id: rest.instance_id
          name: rest.name
          start: rest.start
          end: rest.end
          step: rest.step
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: koyeb-metrics-mcp
    port: 9090
    transport: http
    description: MCP adapter for Koyeb Rest API — Metrics. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-metrics
      description: Get Metrics
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: koyeb-metrics.getmetrics
      with:
        service_id: tools.service_id
        instance_id: tools.instance_id
        name: tools.name
        start: tools.start
        end: tools.end
        step: tools.step
      outputParameters:
      - type: object
        mapping: $.