Linkerd Statistics API

Resource statistics and golden metrics

Operations 1

POST /api/v1/stat Linkerd Get stat summary for resources #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/linkerd-statistics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

linkerd-statistics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Linkerd Viz Metrics Statistics API
  description: The Linkerd Viz extension provides a metrics API that powers the linkerd viz CLI commands and the Linkerd dashboard. It queries Prometheus for golden metrics including request volume, success rate, and latency distributions for HTTP, HTTP/2, and gRPC traffic across meshed workloads.
  version: 2.x
  contact:
    name: Linkerd
    url: https://linkerd.io/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://metrics-api.linkerd-viz.svc.cluster.local:8085
  description: Linkerd Viz Metrics API service (in-cluster)
tags:
- name: Statistics
  description: Resource statistics and golden metrics
paths:
  /api/v1/stat:
    post:
      operationId: getStatSummary
      summary: Linkerd Get stat summary for resources
      description: Returns aggregated metrics (request rate, success rate, latency percentiles) for the specified Kubernetes resources. This powers the linkerd viz stat command. Supports deployments, pods, namespaces, services, replicasets, statefulsets, daemonsets, cronjobs, jobs, and replicationcontrollers.
      tags:
      - Statistics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StatSummaryRequest'
      responses:
        '200':
          description: Stat summary response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatSummaryResponse'
        '500':
          description: Internal server error
components:
  schemas:
    StatSummaryResponse:
      type: object
      properties:
        ok:
          type: object
          properties:
            stat_tables:
              type: array
              items:
                $ref: '#/components/schemas/StatTable'
        error:
          type: object
          properties:
            error:
              type: string
    StatTableRow:
      type: object
      properties:
        resource:
          $ref: '#/components/schemas/Resource'
        time_window:
          type: string
        status:
          type: string
        meshed_pod_count:
          type: integer
        running_pod_count:
          type: integer
        failed_pod_count:
          type: integer
        stats:
          $ref: '#/components/schemas/BasicStats'
        tcp_stats:
          $ref: '#/components/schemas/TcpStats'
    StatTable:
      type: object
      properties:
        pod_group:
          type: object
          properties:
            rows:
              type: array
              items:
                $ref: '#/components/schemas/StatTableRow'
    StatSummaryRequest:
      type: object
      properties:
        resource_type:
          type: string
          description: The Kubernetes resource type to query metrics for.
          enum:
          - deployment
          - pod
          - namespace
          - service
          - replicaset
          - statefulset
          - daemonset
          - cronjob
          - job
          - replicationcontroller
        resource_name:
          type: string
          description: Optional specific resource name to filter by.
        namespace:
          type: string
          description: Kubernetes namespace to scope the query.
        time_window:
          type: string
          description: Time window for aggregation (e.g., 1m, 10m, 1h).
          default: 1m
        from_resource_type:
          type: string
          description: Filter by source resource type.
        from_resource_name:
          type: string
          description: Filter by source resource name.
        from_namespace:
          type: string
          description: Filter by source namespace.
        to_resource_type:
          type: string
          description: Filter by destination resource type.
        to_resource_name:
          type: string
          description: Filter by destination resource name.
        to_namespace:
          type: string
          description: Filter by destination namespace.
        tcp_stats:
          type: boolean
          description: Include TCP-level statistics.
      required:
      - resource_type
    Resource:
      type: object
      properties:
        namespace:
          type: string
        type:
          type: string
        name:
          type: string
    TcpStats:
      type: object
      properties:
        open_connections:
          type: integer
          format: int64
        read_bytes_total:
          type: integer
          format: int64
        write_bytes_total:
          type: integer
          format: int64
    BasicStats:
      type: object
      properties:
        success_count:
          type: integer
          format: int64
        failure_count:
          type: integer
          format: int64
        latency_ms_p50:
          type: number
          format: double
        latency_ms_p95:
          type: number
          format: double
        latency_ms_p99:
          type: number
          format: double
        actual_success_count:
          type: integer
          format: int64
        actual_failure_count:
          type: integer
          format: int64
externalDocs:
  description: Linkerd Viz CLI Reference
  url: https://linkerd.io/2-edge/reference/cli/viz/