---
title: "Per-topic Kafka metadata for the topics list"
method: POST
path: "/topics/table_metrics"
tags: ["Topics"]
---

# Per-topic Kafka metadata for the topics list

`POST /topics/table_metrics`

Returns per-topic Kafka broker metadata (partition_count, replication_factor, retention_ms) and lastMessageTimestamp, keyed by topic_id.

`sources`/`transforms` entities must carry matching `topic_ids` and `topic_db_ids` (used for ownership verification); such entities missing `topic_db_ids` return HTTP 400. `destinations` are exempt (send `topic_db_ids: []`) — they are verified against the destination's topic_map. Topic names must match `[a-zA-Z0-9._-]{1,249}`; up to 1000 per entity.

All `kafka.*` fields are nullable — `null` means the broker did not return metadata for that topic, which is distinct from a legitimate `0`. Values may be up to ~60 s stale for `partition_count` / `replication_factor` / `retention_ms` and up to ~10 s stale for `lastMessageTimestamp`.

## Request body

- TopicTableMetricsReq
  - `entities` SingleTopicTableMetricReq[], required — List of entities (sources/destinations/transforms) with their topic IDs. `sources`/`transforms` entities that have `topic_ids` must also include `topic_db_ids` for ownership verification; otherwise the request returns HTTP 400. `destinations` are exempt (send `topic_db_ids: []`) — they are verified against the destination's topic_map.
    - `id` string, required
    - `entity_type` string, required
    - `connector` string, required
    - `topic_ids` string[], required
    - `topic_db_ids` string[], required

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/streamkap/apis/streamkap-rest-api.md) · [All operations](https://skmtc.net/streamkap/apis/streamkap-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/streamkap/streamkap-rest-api/revisions/e9ce8221bac6/schema)
