v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_Databases

Get Topic for a Kafka Cluster

To retrieve a given topic by name from the set of a Kafka cluster's topics, send a GET request to /v2/databases/$DATABASE_ID/topics/$TOPIC_NAME.

The result will be a JSON object with a topic key.

get/v2/databases/{database_cluster_uuid}/topics/{topic_name}

Path parameters

database_cluster_uuidstring uuid required

A unique identifier for a database cluster.

topic_namestring required

The name used to identify the Kafka topic.

Response

A JSON object with a key of topic.

Example response

{
  "topic": {
    "name": "events",
    "state": "active",
    "replication_factor": 2,
    "partitions": [
      {
        "size": 4096,
        "id": 1,
        "in_sync_replicas": 3,
        "consumer_groups": [
          {
            "group_name": "consumer"
          }
        ]
      }
    ],
    "config": {
      "cleanup_policy": "delete",
      "compression_type": "producer",
      "delete_retention_ms": 86400000,
      "file_delete_delay_ms": 60000,
      "flush_messages": 9223372036854776000,
      "flush_ms": 9223372036854776000,
      "index_interval_bytes": 4096,
      "max_compaction_lag_ms": 9223372036854776000,
      "max_message_bytes": 1048588,
      "message_down_conversion_enable": true,
      "message_format_version": "3.0-IV1",
      "message_timestamp_type": "create_time",
      "min_cleanable_dirty_ratio": 0.5,
      "min_insync_replicas": 1,
      "retention_bytes": 1000000,
      "retention_ms": 604800000,
      "segment_bytes": 209715200,
      "segment_ms": 604800000
    }
  }
}