SMI TrafficMetrics

Service Mesh Interface (SMI) TrafficMetrics resource (metrics.smi-spec.io/v1alpha1). Provides a common integration point for tools consuming metrics related to HTTP traffic, exposed via a Kubernetes APIService. Source: https://github.com/servicemeshinterface/smi-spec/blob/main/apis/traffic-metrics/v1alpha1/traffic-metrics.md

Service MeshKubernetesTraffic PolicyTraffic ManagementTraffic MetricsStandardsCNCFArchivedSpecificationCustom Resource Definitions

Properties

Name Type Description
kind object
apiVersion object
resource object
edge object Optional traffic edge (source resource for the observed traffic).
timestamp string
window string ISO-8601-style duration window (e.g. '30s').
metrics array
View JSON Schema on GitHub

JSON Schema

traffic-metrics-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api-evangelist.github.io/service-mesh-interface/json-schema/traffic-metrics-schema.json",
  "title": "SMI TrafficMetrics",
  "description": "Service Mesh Interface (SMI) TrafficMetrics resource (metrics.smi-spec.io/v1alpha1). Provides a common integration point for tools consuming metrics related to HTTP traffic, exposed via a Kubernetes APIService. Source: https://github.com/servicemeshinterface/smi-spec/blob/main/apis/traffic-metrics/v1alpha1/traffic-metrics.md",
  "type": "object",
  "required": ["kind", "resource"],
  "properties": {
    "kind": { "const": "TrafficMetrics" },
    "apiVersion": { "const": "metrics.smi-spec.io/v1alpha1" },
    "resource": {
      "type": "object",
      "required": ["name", "namespace", "kind"],
      "properties": {
        "name": { "type": "string" },
        "namespace": { "type": "string" },
        "kind": { "type": "string", "enum": ["Pod", "Namespace", "Deployment", "StatefulSet", "DaemonSet", "Service"] }
      }
    },
    "edge": {
      "type": "object",
      "description": "Optional traffic edge (source resource for the observed traffic).",
      "properties": {
        "direction": { "type": "string", "enum": ["to", "from"] },
        "side": { "type": "string", "enum": ["client", "server"] },
        "resource": {
          "type": "object",
          "properties": {
            "name": { "type": "string" },
            "namespace": { "type": "string" },
            "kind": { "type": "string" }
          }
        }
      }
    },
    "timestamp": { "type": "string", "format": "date-time" },
    "window": {
      "type": "string",
      "description": "ISO-8601-style duration window (e.g. '30s')."
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name", "value"],
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "p99_response_latency",
              "p90_response_latency",
              "p50_response_latency",
              "success_count",
              "failure_count"
            ]
          },
          "unit": { "type": "string" },
          "value": { "type": "string" }
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/traffic-metrics"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

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

Get an API key

Free tier, no email required.

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