---
title: "Get dashboard lineage topics"
method: GET
path: "/dashboard/lineage/topics"
tags: ["Dashboard"]
---

# Get dashboard lineage topics

`GET /dashboard/lineage/topics`

Returns detailed topic-level lineage information including source, transforms, destinations, and per-topic metrics. Supports filtering and pagination.

## Query parameters

- `source_id` string, nullable — Filter by source entity ID
- `destination_id` string, nullable — Filter by destination entity ID
- `transform_id` string, nullable — Filter by transform entity ID
- `topic_name` string, nullable — Filter by topic name (substring match)
- `filter` string, nullable — Comma-separated topic filters: has_destination, orphaned, has_transform, dlq, snapshotting
- `include_dlq` boolean — When false, exclude DLQ topics
- `snapshot` string, nullable — Comma-separated snapshot status filter: running, completed, pending
- `page` integer — Page number (1-indexed)
- `page_size` integer — Results per page
- `sort` 'byteTotal' | 'latency' | 'speed' | 'lag' | 'name' — Sort field
- `sort_dir` 'asc' | 'desc' — Sort direction
- `include_metrics` boolean — When false, skip ClickHouse metrics and return metrics as null for faster initial render

## Response `200`

Successful Response

- DashboardLineageTopicsRes — Response model for GET /dashboard/lineage/topics.
  - `page` integer — Current page number
  - `page_size` integer — Results per page
  - `total` integer, nullable — Total number of results
  - `has_next` boolean, nullable — Whether more pages exist
  - `result` LineageTopicRes[] — List of topics with lineage info
    - `id` string, required — Topic entity ID
    - `name` string, required — Full topic name
    - `source` TopicSourceRef, required — Reference to the source that produces a topic.
      - `id` string, required — Source entity ID
      - `name` string, required — Source display name
      - `connector` string — Source connector type
      - `snapshot_progress` SourceSnapshotProgressRes — Snapshot progress for a source connector. Sourced from the ClickHouse snapshot_progress table via get_snapshot_summary().
        - `state` string, required — Snapshot state: running, pending, completed, failed, or not_started
        - `snapshot_type` string — Snapshot type: incremental or blocking
        - `total_topic_count` integer — Logical topics (selectors) in the snapshot — what the user sees. Equals total_table_count unless a selector fanned out (sharded/regex).
        - `remaining_topic_count` integer — Logical topics still to be processed
        - `done_topic_count` integer — Logical topics in a terminal DONE/COMPLETED state
        - `cancelled_topic_count` integer — Logical topics cancelled by the user before completing
        - `failed_topic_count` integer — Logical topics that terminated in a FAILED state
        - `total_table_count` integer — Physical tables in the snapshot — expanded per shard/regex match. Exceeds total_topic_count only on fanout.
        - `remaining_table_count` integer — Physical tables still to be processed
        - `rows_total` integer — Total source rows across all tables (from QA metrics). 0 if unavailable.
        - `rows_scanned` integer — Total rows scanned across all tables. 0 if unavailable.
        - `progress_type` 'rows' | 'tables' — Whether percent_complete is based on row counts ('rows') or table counts ('tables').
        - `percent_complete` number — Snapshot completion percentage (0-100)
        - `eta_ms` integer — Estimated milliseconds to completion
        - `start_timestamp` string, nullable — Snapshot start time (UTC)
        - `end_timestamp` string, nullable — Snapshot end time (UTC)
    - `metrics` TopicMetricsDetailRes — Detailed metrics for a single topic in lineage view.
      - `StreamingMilliSecondsBehindSource` integer — Streaming latency in milliseconds
      - `SnapshotPercentageComplete` integer — Snapshot completion percentage (uppercase)
      - `recordSendTotal` integer — Total records sent
      - `sourceRecordWriteTotal` integer — Total source records written
      - `snapshotPercentageComplete` integer — Snapshot completion percentage (lowercase)
      - `recordsLag` integer — Consumer records lag
      - `byteTotal` integer — Total bytes processed
      - `sourceRecordPollRate` number — Source record poll rate (records/sec)
      - `sourceQaCount` number, nullable — Source DB row count from metrics_qa. Null when not collected.
    - `snapshot_status` string, nullable — Latest snapshot status for this topic: running, pending, completed, failed, or null if never snapshotted.
    - `snapshot_details` TopicSnapshotStatusRes[] — Detailed snapshot history for this topic. Empty list if never snapshotted.
      - `status` string, required — Snapshot status: running, pending, completed, failed
      - `start_timestamp` string, nullable — Snapshot start time (UTC)
      - `end_timestamp` string, nullable — Snapshot end time (UTC)
      - `duration_ms` integer, nullable — Snapshot duration in milliseconds
      - `rows_scanned` integer — Number of rows scanned so far
      - `rows_total` integer — Total number of rows to scan
      - `trace` string, nullable — Error trace message for failed snapshots
      - `eta_ms` integer — Estimated milliseconds to completion
    - `transforms` TopicTransformRef[] — Transforms applied to this topic
      - `id` string, required — Transform entity ID
      - `name` string, required — Transform display name
      - `status` string — Transform status (e.g. RUNNING)
      - `metrics` TransformMetricsRes — Metrics for a transform in the topic lineage view.
        - `latency` integer — Transform processing latency in milliseconds
      - `output_topics` string[] — Output topics from this transform
      - `transform_type` 'fan_out' | 'sql_join' | 'enrich' | 'enrich_async' | 'map_filter' | 'toast_handling' | 'un_nesting' | 'rollup' | 'topic_router'
      - `destinations` TopicDestinationRef[] — Destinations consuming this transform's output topics, with lag/count keyed to the output topic.
        - `id` string, required — Destination entity ID
        - `name` string, required — Destination display name
        - `connector` string — Destination connector type
        - `pipeline_id` string — Pipeline entity ID
        - `pipeline_status` string — Pipeline status
        - `lag` integer, nullable — Destination consumer lag. Null when include_metrics=false.
        - `latency_ms` integer, nullable — Destination wall-clock consumer latency in milliseconds (worst partition). Null when include_metrics=false or no probe sample exists yet.
        - `qaCount` number, nullable — Destination row count for this topic from metrics_qa. Null when not collected.
        - `e2e_eta_ms` integer, nullable — 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.
    - `destinations` TopicDestinationRef[] — Destinations consuming this topic
      - `id` string, required — Destination entity ID
      - `name` string, required — Destination display name
      - `connector` string — Destination connector type
      - `pipeline_id` string — Pipeline entity ID
      - `pipeline_status` string — Pipeline status
      - `lag` integer, nullable — Destination consumer lag. Null when include_metrics=false.
      - `latency_ms` integer, nullable — Destination wall-clock consumer latency in milliseconds (worst partition). Null when include_metrics=false or no probe sample exists yet.
      - `qaCount` number, nullable — Destination row count for this topic from metrics_qa. Null when not collected.
      - `e2e_eta_ms` integer, nullable — 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.

## 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/versions/8aea6143d003/schema)
