> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamkap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Per-topic Kafka metadata for the topics list

> 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`.



## OpenAPI

````yaml /openapi/openapi.json post /topics/table_metrics
openapi: 3.1.0
info:
  title: Streamkap REST API
  description: >-
    The Streamkap REST API allows you to programmatically manage your CDC
    pipelines, sources, destinations, transforms, and more.


    Authenticate using a bearer token obtained from the [Access
    Token](/api-reference/auth/access-token) endpoint with your API client
    credentials.
  contact:
    name: Streamkap Support
    url: https://streamkap.com/
    email: support@streamkap.com
  license:
    name: Proprietary
  version: 2.0.0
servers:
  - url: https://api.streamkap.com
    description: Production
security: []
tags:
  - name: Alerts
    description: Manage alert subscribers, preferences, and notification credentials.
  - name: Authentication
    description: Obtain and refresh access tokens, manage client credentials and roles.
  - name: Billing
    description: Retrieve usage metrics, summaries, and export billing data.
  - name: Consumer Groups
    description: List, inspect, and reset Kafka consumer group offsets.
  - name: Dashboard
    description: Retrieve organisation-level statistics and overview data.
  - name: Destinations
    description: Create, configure, and manage data destinations and their lifecycle.
  - name: Kafka Access
    description: Manage Kafka users and their access permissions.
  - name: Logs
    description: Query and summarise system logs.
  - name: Pipelines
    description: Create, configure, and manage CDC pipelines and their lifecycle.
  - name: Project Keys
    description: Manage project keys that bundle API credentials and optional Kafka access.
  - name: Schema Registry
    description: Browse schema subjects, versions, and retrieve schema definitions.
  - name: Services
    description: View and switch service metadata.
  - name: Sources
    description: >-
      Create, configure, and manage data sources, snapshots, and their
      lifecycle.
  - name: Tags
    description: Create, update, and manage resource tags for organisation.
  - name: Topics
    description: Browse topic details, statistics, configurations, metrics, and messages.
  - name: Transforms
    description: >-
      Create, deploy, and manage data transforms, unit tests, and implementation
      details.
paths:
  /topics/table_metrics:
    post:
      tags:
        - Topics
      summary: Per-topic Kafka metadata for the topics list
      description: >-
        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`.
      operationId: getTopicTableMetrics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TopicTableMetricsReq'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  $ref: '#/components/schemas/TopicTableMetricsRowRes'
                type: object
                title: Response Gettopictablemetrics
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - FronteggHTTPAuthentication: []
components:
  schemas:
    TopicTableMetricsReq:
      properties:
        entities:
          items:
            $ref: '#/components/schemas/SingleTopicTableMetricReq'
          type: array
          title: Entities
          description: >-
            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.
      additionalProperties: true
      type: object
      required:
        - entities
      title: TopicTableMetricsReq
    TopicTableMetricsRowRes:
      properties:
        id:
          type: string
          title: Id
        kafka:
          $ref: '#/components/schemas/TopicListKafkaMetadata'
        lastMessageTimestamp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lastmessagetimestamp
        snapshotStatus:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Snapshotstatus
          default: []
        recordErrorTotal:
          anyOf:
            - type: integer
            - type: 'null'
          title: Recorderrortotal
      additionalProperties: true
      type: object
      required:
        - id
        - kafka
      title: TopicTableMetricsRowRes
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SingleTopicTableMetricReq:
      properties:
        id:
          type: string
          title: Id
        entity_type:
          type: string
          title: Entity Type
        connector:
          type: string
          title: Connector
        topic_ids:
          items:
            type: string
          type: array
          maxItems: 1000
          title: Topic Ids
        topic_db_ids:
          items:
            type: string
          type: array
          maxItems: 1000
          title: Topic Db Ids
      additionalProperties: true
      type: object
      required:
        - id
        - entity_type
        - connector
        - topic_ids
        - topic_db_ids
      title: SingleTopicTableMetricReq
    TopicListKafkaMetadata:
      properties:
        partition_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Partition Count
        replication_factor:
          anyOf:
            - type: integer
            - type: 'null'
          title: Replication Factor
        retention_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retention Ms
      additionalProperties: true
      type: object
      title: TopicListKafkaMetadata
      description: >-
        Per-topic Kafka broker metadata.


        All fields are nullable: `null` means the broker did not return metadata
        for the

        topic, distinct from a legitimate `0`.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    FronteggHTTPAuthentication:
      type: http
      scheme: bearer

````