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

# Batch fetch topics for multiple entities

> Returns enriched topics grouped by entity ID. Use for polling refresh or expand-all when groups are already loaded. Accepts 1-100 entity IDs.



## OpenAPI

````yaml /openapi/openapi.json post /dashboard/lineage/topics/batch
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:
  /dashboard/lineage/topics/batch:
    post:
      tags:
        - Dashboard
      summary: Batch fetch topics for multiple entities
      description: >-
        Returns enriched topics grouped by entity ID. Use for polling refresh or
        expand-all when groups are already loaded. Accepts 1-100 entity IDs.
      operationId: getDashboardLineageTopicsBatch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LineageTopicsBatchReq'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineageTopicsBatchRes'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - FronteggHTTPAuthentication: []
components:
  schemas:
    LineageTopicsBatchReq:
      properties:
        group_by:
          type: string
          enum:
            - source
            - destination
            - transform
            - source_audit
          title: Group By
          description: Grouping dimension
        entity_ids:
          items:
            type: string
          type: array
          maxItems: 100
          minItems: 1
          title: Entity Ids
          description: Entity IDs to fetch topics for
        page_size:
          type: integer
          maximum: 100
          minimum: 1
          title: Page Size
          description: Max topics per entity
          default: 20
        sort:
          type: string
          enum:
            - byteTotal
            - latency
            - speed
            - lag
            - name
          title: Sort
          description: Sort field for topics
          default: byteTotal
        sort_dir:
          type: string
          enum:
            - asc
            - desc
          title: Sort Dir
          description: Sort direction
          default: desc
        topic_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic Name
          description: Topic name substring filter
        filter:
          anyOf:
            - type: string
            - type: 'null'
          title: Filter
          description: Comma-separated quick filters
        include_metrics:
          type: boolean
          title: Include Metrics
          description: When false, return metrics as null
          default: true
        diff_min:
          anyOf:
            - type: number
            - type: 'null'
          title: Diff Min
          description: Min diff% filter (inclusive). Only for source_audit.
        diff_max:
          anyOf:
            - type: number
            - type: 'null'
          title: Diff Max
          description: Max diff% filter (inclusive). Only for source_audit.
      additionalProperties: true
      type: object
      required:
        - group_by
        - entity_ids
      title: LineageTopicsBatchReq
      description: Request body for POST /dashboard/lineage/topics/batch.
    LineageTopicsBatchRes:
      properties:
        groups:
          additionalProperties:
            $ref: '#/components/schemas/EmbeddedTopicsRes'
          type: object
          title: Groups
          description: Topics grouped by entity ID
      additionalProperties: true
      type: object
      title: LineageTopicsBatchRes
      description: Response for POST /dashboard/lineage/topics/batch.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EmbeddedTopicsRes:
      properties:
        result:
          items:
            $ref: '#/components/schemas/LineageTopicRes'
          type: array
          title: Result
          description: Enriched topics for this group
        total:
          type: integer
          title: Total
          description: Total matching topics in this group
          default: 0
        page:
          type: integer
          title: Page
          description: Page number (always 1 for embedded)
          default: 1
        has_next:
          type: boolean
          title: Has Next
          description: Whether more topics exist beyond this page
          default: false
      additionalProperties: true
      type: object
      title: EmbeddedTopicsRes
      description: Paginated topics embedded within a lineage group.
    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
    LineageTopicRes:
      properties:
        id:
          type: string
          title: Id
          description: Topic entity ID
        name:
          type: string
          title: Name
          description: Full topic name
        source:
          $ref: '#/components/schemas/TopicSourceRef'
          description: Source that produces this topic
        metrics:
          anyOf:
            - $ref: '#/components/schemas/TopicMetricsDetailRes'
            - type: 'null'
          description: Topic-level metrics. Null when include_metrics=false.
        snapshot_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Snapshot Status
          description: >-
            Latest snapshot status for this topic: running, pending, completed,
            failed, or null if never snapshotted.
        snapshot_details:
          items:
            $ref: '#/components/schemas/TopicSnapshotStatusRes'
          type: array
          title: Snapshot Details
          description: >-
            Detailed snapshot history for this topic. Empty list if never
            snapshotted.
        transforms:
          items:
            $ref: '#/components/schemas/TopicTransformRef'
          type: array
          title: Transforms
          description: Transforms applied to this topic
        destinations:
          items:
            $ref: '#/components/schemas/TopicDestinationRef'
          type: array
          title: Destinations
          description: Destinations consuming this topic
      additionalProperties: true
      type: object
      required:
        - id
        - name
        - source
      title: LineageTopicRes
      description: A single topic in the lineage topics view.
    TopicSourceRef:
      properties:
        id:
          type: string
          title: Id
          description: Source entity ID
        name:
          type: string
          title: Name
          description: Source display name
        connector:
          type: string
          title: Connector
          description: Source connector type
          default: ''
        snapshot_progress:
          anyOf:
            - $ref: '#/components/schemas/SourceSnapshotProgressRes'
            - type: 'null'
          description: >-
            Snapshot progress. Null when include_metrics=false or no snapshot
            data.
      additionalProperties: true
      type: object
      required:
        - id
        - name
      title: TopicSourceRef
      description: Reference to the source that produces a topic.
    TopicMetricsDetailRes:
      properties:
        StreamingMilliSecondsBehindSource:
          type: integer
          title: Streamingmillisecondsbehindsource
          description: Streaming latency in milliseconds
          default: 0
        SnapshotPercentageComplete:
          type: integer
          title: Snapshotpercentagecomplete
          description: Snapshot completion percentage (uppercase)
          default: 0
        recordSendTotal:
          type: integer
          title: Recordsendtotal
          description: Total records sent
          default: 0
        sourceRecordWriteTotal:
          type: integer
          title: Sourcerecordwritetotal
          description: Total source records written
          default: 0
        snapshotPercentageComplete:
          type: integer
          title: Snapshotpercentagecomplete
          description: Snapshot completion percentage (lowercase)
          default: 0
        recordsLag:
          type: integer
          title: Recordslag
          description: Consumer records lag
          default: 0
        byteTotal:
          type: integer
          title: Bytetotal
          description: Total bytes processed
          default: 0
        sourceRecordPollRate:
          type: number
          title: Sourcerecordpollrate
          description: Source record poll rate (records/sec)
          default: 0
        sourceQaCount:
          anyOf:
            - type: number
            - type: 'null'
          title: Sourceqacount
          description: Source DB row count from metrics_qa. Null when not collected.
      additionalProperties: true
      type: object
      title: TopicMetricsDetailRes
      description: Detailed metrics for a single topic in lineage view.
    TopicSnapshotStatusRes:
      properties:
        status:
          type: string
          title: Status
          description: 'Snapshot status: running, pending, completed, failed'
        start_timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: Start Timestamp
          description: Snapshot start time (UTC)
        end_timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: End Timestamp
          description: Snapshot end time (UTC)
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
          description: Snapshot duration in milliseconds
        rows_scanned:
          type: integer
          title: Rows Scanned
          description: Number of rows scanned so far
          default: 0
        rows_total:
          type: integer
          title: Rows Total
          description: Total number of rows to scan
          default: 0
        trace:
          anyOf:
            - type: string
            - type: 'null'
          title: Trace
          description: Error trace message for failed snapshots
        eta_ms:
          type: integer
          title: Eta Ms
          description: Estimated milliseconds to completion
          default: 0
      additionalProperties: true
      type: object
      required:
        - status
      title: TopicSnapshotStatusRes
      description: >-
        Snapshot status entry for a single topic, sourced from ClickHouse
        snapshot_progress.
    TopicTransformRef:
      properties:
        id:
          type: string
          title: Id
          description: Transform entity ID
        name:
          type: string
          title: Name
          description: Transform display name
        status:
          type: string
          title: Status
          description: Transform status (e.g. RUNNING)
          default: ''
        metrics:
          anyOf:
            - $ref: '#/components/schemas/TransformMetricsRes'
            - type: 'null'
          description: Transform-level metrics. Null when include_metrics=false.
        output_topics:
          items:
            type: string
          type: array
          title: Output Topics
          description: Output topics from this transform
        transform_type:
          anyOf:
            - $ref: '#/components/schemas/TransformsLibraryEnum'
            - type: 'null'
          description: Transform library type (e.g. topic_router, sql_join)
        destinations:
          items:
            $ref: '#/components/schemas/TopicDestinationRef'
          type: array
          title: Destinations
          description: >-
            Destinations consuming this transform's output topics, with
            lag/count keyed to the output topic.
      additionalProperties: true
      type: object
      required:
        - id
        - name
      title: TopicTransformRef
      description: Reference to a transform applied to a topic.
    TopicDestinationRef:
      properties:
        id:
          type: string
          title: Id
          description: Destination entity ID
        name:
          type: string
          title: Name
          description: Destination display name
        connector:
          type: string
          title: Connector
          description: Destination connector type
          default: ''
        pipeline_id:
          type: string
          title: Pipeline Id
          description: Pipeline entity ID
          default: ''
        pipeline_status:
          type: string
          title: Pipeline Status
          description: Pipeline status
          default: ''
        lag:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lag
          description: Destination consumer lag. Null when include_metrics=false.
        qaCount:
          anyOf:
            - type: number
            - type: 'null'
          title: Qacount
          description: >-
            Destination row count for this topic from metrics_qa. Null when not
            collected.
        e2e_eta_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: E2E Eta Ms
          description: >-
            Estimated milliseconds for destination to fully consume remaining
            data. Shown during active snapshots or when lag exceeds threshold.
            -1 means records are remaining but destination is not consuming
            (stalled). Null when not applicable.
      additionalProperties: true
      type: object
      required:
        - id
        - name
      title: TopicDestinationRef
      description: Reference to a destination consuming a topic.
    SourceSnapshotProgressRes:
      properties:
        state:
          type: string
          title: State
          description: 'Snapshot state: running, pending, completed, failed, or not_started'
        snapshot_type:
          type: string
          title: Snapshot Type
          description: 'Snapshot type: incremental or blocking'
          default: incremental
        total_table_count:
          type: integer
          title: Total Table Count
          description: Total tables included in the snapshot
          default: 0
        remaining_table_count:
          type: integer
          title: Remaining Table Count
          description: Tables still to be processed
          default: 0
        rows_total:
          type: integer
          title: Rows Total
          description: >-
            Total source rows across all tables (from QA metrics). 0 if
            unavailable.
          default: 0
        rows_scanned:
          type: integer
          title: Rows Scanned
          description: Total rows scanned across all tables. 0 if unavailable.
          default: 0
        progress_type:
          type: string
          enum:
            - rows
            - tables
          title: Progress Type
          description: >-
            Whether percent_complete is based on row counts ('rows') or table
            counts ('tables').
          default: tables
        percent_complete:
          type: number
          title: Percent Complete
          description: Snapshot completion percentage (0-100)
          default: 0
        eta_ms:
          type: integer
          title: Eta Ms
          description: Estimated milliseconds to completion
          default: 0
        start_timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: Start Timestamp
          description: Snapshot start time (UTC)
        end_timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: End Timestamp
          description: Snapshot end time (UTC)
      additionalProperties: true
      type: object
      required:
        - state
      title: SourceSnapshotProgressRes
      description: >-
        Snapshot progress for a source connector.


        Sourced from the ClickHouse snapshot_progress table via
        get_snapshot_summary().
    TransformMetricsRes:
      properties:
        latency:
          type: integer
          title: Latency
          description: Transform processing latency in milliseconds
          default: 0
      additionalProperties: true
      type: object
      title: TransformMetricsRes
      description: Metrics for a transform in the topic lineage view.
    TransformsLibraryEnum:
      type: string
      enum:
        - fan_out
        - sql_join
        - enrich
        - enrich_async
        - map_filter
        - toast_handling
        - un_nesting
        - rollup
        - topic_router
      title: TransformsLibraryEnum
  securitySchemes:
    FronteggHTTPAuthentication:
      type: http
      scheme: bearer

````