Confluent Version 2 API

![generally-available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%230074A2) Version 2 of the Metrics API adds the ability to query metrics for Kafka Connect, ksqlDB, and Schema Registry. This capability is enabled by the introduction of a [Resource](#section/Object-Model/Resources) abstraction into the API object model. Resources represent the entity against which metrics are collected. ### Migration Guide The following endpoint URLs have changed in version 2: | Endpoint | Version 1 (Sunset) | Version 2 | | ----------------------- | -------------------------------- | ---------------------------------------- | | Metrics discovery | `/metrics/{dataset}/descriptors` | `/metrics/{dataset}/descriptors/metrics` | The label prefix syntax has changed in version 2: | Label | Version 1 (Sunset) | Version 2 | | ----------------------- | ---------------------------- | ----------------------- | | Resource labels *(new)* | *N/A* | `resource.` | | Kafka cluster ID | `metric.label.cluster_id` | `resource.kafka.id` | | All other metric labels | `metric.label.` | `metric.` | This example shows a request to `/v1/metrics/cloud/query` migrated into the new `v2` syntax #### Version 1 Request ```json { "group_by": [ "metric.label.topic" ], "aggregations": [{ "metric": "io.confluent.kafka.server/received_bytes", "agg": "SUM" }], "filter": { "field": "metric.label.cluster_id", "op": "EQ", "value": "lkc-00000" }, "granularity": "ALL", "intervals" : [ "2020-01-01T00:00:00Z/PT1H" ] } ``` #### Version 2 Request ```json { "group_by": [ "metric.topic" ], "aggregations": [{ "metric": "io.confluent.kafka.server/received_bytes", "agg": "SUM" }], "filter": { "field": "resource.kafka.id", "op": "EQ", "value": "lkc-00000" }, "granularity": "ALL", "intervals" : [ "2020-01-01T00:00:00Z/PT1H" ] } ```

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v2/metrics/{dataset}/descriptors/metrics List the metrics available in a dataset · List metric descriptors #
Ask an LLM
“Which metrics can I query in the Confluent Cloud metrics dataset?”
“What labels and data type does each available metric have?”
Tell an agent
List every metric descriptor in the {dataset} dataset.
Show the metric names and labels in {dataset} that apply to {resource_type} resources.
GET /v2/metrics/{dataset}/descriptors/resources List the resource types a dataset has metrics for · List resource descriptors #
Ask an LLM
“What kinds of resources does a metrics dataset report on?”
“Which resource types and their labels are described in the cloud dataset?”
Tell an agent
List the resource descriptors in the {dataset} dataset.
Show up to {page_size} resource types described in {dataset}.
POST /v2/metrics/{dataset}/query Query time-series metric values · Query metric values #
Ask an LLM
“How do I get hourly bytes received for my Kafka cluster over the last day?”
“Can I group metric results by topic and keep only the top groups?”
Tell an agent
Query {aggregations} in {dataset} at {granularity} granularity over {intervals}.
Get {aggregations} values over {intervals} at {granularity}, grouped by {group_by}, from {dataset}.
GET /v2/metrics/{dataset}/export Export current metrics for Prometheus scraping · Export metric values #
Ask an LLM
“How can I scrape Confluent Cloud metrics into Prometheus or another OpenMetrics tool?”
“Can I export current metrics for just one Kafka cluster or connector?”
Tell an agent
Export the current {dataset} metric values for Kafka cluster {kafka_id} in OpenMetrics format.
Export only the {metric} metric for connector {connector_id} from {dataset}.
POST /v2/metrics/{dataset}/attributes Enumerate the label values for a metric · Query label values #
Ask an LLM
“Which topic names currently show up as label values for a metric?”
“How do I find all the distinct values a metric label takes in a time range?”
Tell an agent
List the distinct {group_by} label values in {dataset}.
Enumerate the {group_by} values seen for metric {metric} in {dataset} during {intervals}.
GET /v2/metrics/{dataset}/discovery Discover Prometheus scrape targets · Discover target resources #
Ask an LLM
“Can Prometheus automatically discover which of my Confluent Cloud resources to scrape?”
“Which resources are scrape targets in a given environment?”
Tell an agent
Get the Prometheus service discovery targets for {dataset}.
Discover scrape targets in {dataset} for environment {env}.

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/confluent:confluent-version-2-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

confluent-version-2-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    name: Confluent
    url: https://confluent.io
    email: support@confluent.io
  description: '# Introduction


    The Confluent Cloud Metrics API provides actionable operational metrics about your Confluent

    Cloud deployment.'
  version: ''
  title: Confluent Cloud Metrics Version 2 API
  x-api-id: 4be9bd3c-ea9b-4efe-89aa-946c36b50161
  x-audience: external-public
  x-logo:
    url: https://assets.confluent.io/m/1661ef5e4ff82d3d/
servers:
- url: https://api.telemetry.confluent.cloud
security:
- api-key: []
- confluent-sts-access-token: []
tags:


# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/confluent/refs/heads/main/openapi/confluent-version-2-api-openapi.yml