---
search:
  tags:
    - Dashboard
    - POST
seo:
  description: >-
    Returns enriched topics grouped by entity ID. Use for polling… Reference for
    the POST /dashboard/lineage/topics/batch endpoint in the Streamkap REST API.
sidebar:
  label: Batch fetch topics for multiple entities
  badge: POST
title: Batch fetch topics for multiple entities
type: openapi-operation
---
Returns enriched topics grouped by entity ID. Use for polling refresh or expand-all when groups are already loaded. Accepts 1-100 entity IDs.

`POST /dashboard/lineage/topics/batch`

**Request body** (`application/json`, required)

- `group_by` (string, required) — Grouping dimension
- `entity_ids` (string[], required) — Entity IDs to fetch topics for
- `page_size` (integer) — Max topics per entity
- `sort` (string) — Sort field for topics
- `sort_dir` (string) — Sort direction
- `topic_name` (string | null) — Topic name substring filter
- `filter` (string | null) — Comma-separated quick filters
- `snapshot` (string | null) — Comma-separated snapshot status filter applied per table: running, pending, completed, completed\_with\_warnings, failed, cancelled, paused.
- `include_metrics` (boolean) — When false, return metrics as null
- `diff_bands` (string[] | string | null) — 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.

Request body example:

```json
{
  "group_by": "source",
  "entity_ids": [
    "string"
  ],
  "page_size": 20,
  "sort": "byteTotal",
  "sort_dir": "asc",
  "topic_name": "string",
  "filter": "string",
  "snapshot": "string",
  "include_metrics": true,
  "diff_bands": [
    "string"
  ]
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

Response example, 200:

```json
{
  "groups": {
    "property1": {
      "result": [
        {
          "id": "string",
          "name": "string",
          "source": {
            "id": "string",
            "name": "string",
            "connector": "",
            "snapshot_progress": {
              "state": "string",
              "snapshot_type": "incremental",
              "total_topic_count": 0,
              "remaining_topic_count": 0,
              "done_topic_count": 0,
              "cancelled_topic_count": 0,
              "failed_topic_count": 0,
              "total_table_count": 0,
              "remaining_table_count": 0,
              "rows_total": 0,
              "rows_scanned": 0,
              "progress_type": "rows",
              "percent_complete": 0,
              "eta_ms": 0,
              "start_timestamp": "string",
              "end_timestamp": "string"
            }
          },
          "metrics": {
            "StreamingMilliSecondsBehindSource": 0,
            "SnapshotPercentageComplete": 0,
            "recordSendTotal": 0,
            "sourceRecordWriteTotal": 0,
            "snapshotPercentageComplete": 0,
            "recordsLag": 0,
            "byteTotal": 0,
            "sourceRecordPollRate": 0,
            "sourceQaCount": 0
          },
          "snapshot_status": "string",
          "snapshot_details": [
            {
              "status": "string",
              "start_timestamp": "string",
              "end_timestamp": "string",
              "duration_ms": 0,
              "rows_scanned": 0,
              "rows_total": 0,
              "trace": "string",
              "eta_ms": 0
            }
          ],
          "transforms": [
            {
              "id": "string",
              "name": "string",
              "status": "",
              "metrics": {
                "latency": 0
              },
              "output_topics": [
                "string"
              ],
              "transform_type": "fan_out",
              "destinations": [
                {
                  "id": "string",
                  "name": "string",
                  "connector": "",
                  "pipeline_id": "",
                  "pipeline_status": "",
                  "lag": 0,
                  "latency_ms": 0,
                  "qaCount": 0,
                  "e2e_eta_ms": 0
                }
              ]
            }
          ],
          "destinations": [
            {
              "id": "string",
              "name": "string",
              "connector": "",
              "pipeline_id": "",
              "pipeline_status": "",
              "lag": 0,
              "latency_ms": 0,
              "qaCount": 0,
              "e2e_eta_ms": 0
            }
          ]
        }
      ],
      "total": 0,
      "page": 1,
      "has_next": false
    },
    "property2": {
      "result": [
        {
          "id": "string",
          "name": "string",
          "source": {
            "id": "string",
            "name": "string",
            "connector": "",
            "snapshot_progress": {
              "state": "string",
              "snapshot_type": "incremental",
              "total_topic_count": 0,
              "remaining_topic_count": 0,
              "done_topic_count": 0,
              "cancelled_topic_count": 0,
              "failed_topic_count": 0,
              "total_table_count": 0,
              "remaining_table_count": 0,
              "rows_total": 0,
              "rows_scanned": 0,
              "progress_type": "rows",
              "percent_complete": 0,
              "eta_ms": 0,
              "start_timestamp": "string",
              "end_timestamp": "string"
            }
          },
          "metrics": {
            "StreamingMilliSecondsBehindSource": 0,
            "SnapshotPercentageComplete": 0,
            "recordSendTotal": 0,
            "sourceRecordWriteTotal": 0,
            "snapshotPercentageComplete": 0,
            "recordsLag": 0,
            "byteTotal": 0,
            "sourceRecordPollRate": 0,
            "sourceQaCount": 0
          },
          "snapshot_status": "string",
          "snapshot_details": [
            {
              "status": "string",
              "start_timestamp": "string",
              "end_timestamp": "string",
              "duration_ms": 0,
              "rows_scanned": 0,
              "rows_total": 0,
              "trace": "string",
              "eta_ms": 0
            }
          ],
          "transforms": [
            {
              "id": "string",
              "name": "string",
              "status": "",
              "metrics": {
                "latency": 0
              },
              "output_topics": [
                "string"
              ],
              "transform_type": "fan_out",
              "destinations": [
                {
                  "id": "string",
                  "name": "string",
                  "connector": "",
                  "pipeline_id": "",
                  "pipeline_status": "",
                  "lag": 0,
                  "latency_ms": 0,
                  "qaCount": 0,
                  "e2e_eta_ms": 0
                }
              ]
            }
          ],
          "destinations": [
            {
              "id": "string",
              "name": "string",
              "connector": "",
              "pipeline_id": "",
              "pipeline_status": "",
              "lag": 0,
              "latency_ms": 0,
              "qaCount": 0,
              "e2e_eta_ms": 0
            }
          ]
        }
      ],
      "total": 0,
      "page": 1,
      "has_next": false
    }
  }
}
```
