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

# Get Kafka topic detail

> Retrieves topic metadata and partition sizes. Includes the owning source reader name, table name, and pipeline names and UUIDs when the topic belongs to an Artie pipeline.

`GET /kafka-clusters/{uuid}/topics/{topic}`

## Authorization

* `Authorization` (header): API key passed as a Bearer token in the Authorization header.

## Path parameters

* `topic` (string, required)
* `uuid` (string, required)

## Query parameters

* `forceRefresh` (boolean)

## Example request

```bash
curl --request GET \
  --url https://api.artie.com/kafka-clusters/{uuid}/topics/{topic} \
  --header 'Authorization: Bearer <token>'
```

## Responses

### 200 OK

* `managed` (object): The topic's replication and per-partition leader and offsets.
  * `partitions` (object[], required)
    * `inSyncCount` (integer, required): How many copies are caught up with the leader, the leader included.
    * `latestOffset` (integer): The offset the next message gets. Missing when the brokers didn't answer for it.
    * `leaderID` (integer): The broker that serves the partition. Missing while it has no leader, except that a leaderless partition whose last in-sync copy was broker 0 still shows 0.
    * `partition` (integer, required)
  * `replicationFactor` (integer, required): How many copies of each partition the brokers keep.
* `partitionSizes` (object[] | null, required)
  * `partition` (integer<int32>, required)
  * `sizeBytes` (integer<int64>, required)
* `pipelines` (object[] | null, required)
  * `name` (string, required)
  * `uuid` (string, required)
* `topic` (object, required)
  * `artieManaged` (boolean, required): Whether Artie manages this topic: a CDC topic under the company prefix outside the customer namespace, or a Kafka-internal __ topic.
  * `localRetentionMS` (string): How long a tiered topic keeps data on broker disks (local.retention.ms). -2 means the same as retention. Left out when the brokers don't report it.
  * `partitionCount` (integer, required)
  * `retentionMS` (string, required)
  * `sourceName` (string)
  * `tableName` (string)
  * `tieredStorage` (object, required)
    * `canTier` (boolean, required): Whether tiered storage can be on for this topic. Kafka refuses it on compacted topics, and Artie keeps it off Kafka's and Cruise Control's own topics and topics whose retention can't be read.
    * `state` (string, required): off, on or paused, from the topic's remote.storage.enable and remote.log.copy.disable configs. One of: `off`, `on`, `paused`.
    * `switchOn` (boolean, required): Whether the topic's tiered storage switch is on. On a Managed Kafka cluster it's the topic's own switch, else the cluster's tierAllTopics; elsewhere it's whether the topic is tiered (on or paused).
  * `topic` (string, required)

```json
{
  "managed": {
    "partitions": [
      {
        "inSyncCount": 123,
        "latestOffset": 123,
        "leaderID": 123,
        "partition": 123
      }
    ],
    "replicationFactor": 123
  },
  "partitionSizes": [
    {
      "partition": 123,
      "sizeBytes": 123
    }
  ],
  "pipelines": [
    {
      "name": "<string>",
      "uuid": "<string>"
    }
  ],
  "topic": {
    "artieManaged": true,
    "localRetentionMS": "<string>",
    "partitionCount": 123,
    "retentionMS": "<string>",
    "sourceName": "<string>",
    "tableName": "<string>",
    "tieredStorage": {
      "canTier": true,
      "state": "off",
      "switchOn": true
    },
    "topic": "<string>"
  }
}
```

### 404 Not Found

### 500 Internal Server Error