---
title: "Batch fetch topics for multiple entities"
method: POST
path: "/dashboard/lineage/topics/batch"
tags: ["Dashboard"]
---

# Batch fetch topics for multiple entities

`POST /dashboard/lineage/topics/batch`

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

## Request body

- LineageTopicsBatchReq — Request body for POST /dashboard/lineage/topics/batch.
  - `group_by` 'source' | 'destination' | 'transform' | 'source_audit', required — Grouping dimension
  - `entity_ids` string[], required — Entity IDs to fetch topics for
  - `page_size` integer — Max topics per entity
  - `sort` 'byteTotal' | 'latency' | 'speed' | 'lag' | 'name' — Sort field for topics
  - `sort_dir` 'asc' | 'desc' — Sort direction
  - `topic_name` string, nullable — Topic name substring filter
  - `filter` string, nullable — Comma-separated quick filters
  - `include_metrics` boolean — When false, return metrics as null
  - `diff_bands` union — Diff% multi-band filter for source_audit. Either a JSON array (["0-0.05", "0.05-2"]) or a comma-separated string ('0-0.05,0.05-2'). Each band is an inclusive 'min-max' pair. Topic passes if its rounded-to-2-decimals max destination diff% falls in ANY band.
    - string[]
    - string

## Response `200`

Successful Response

- LineageTopicsBatchRes — Response for POST /dashboard/lineage/topics/batch.
  - `groups` object — Topics grouped by entity ID

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