dots.v2.databases.byDatabase_cluster_uuid().topics.byTopic_name().get()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.databases.byDatabase_cluster_uuid(database_cluster_uuid).topics.byTopic_name(topic_name).get(requestConfiguration?: RequestConfiguration<object>): Promise<undefined | WithTopic_nameGetResponse>

Description

To retrieve a given topic by name from the set of a Kafka cluster’s topics, send a GET request to /v2/databases/{database_cluster_uuid}/topics/{topic_name}.

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

Parameters

database_cluster_uuid string required

Example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30

A unique identifier for a database cluster.

topic_name string required

Example: customer-events

The name used to identify the Kafka topic.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.databases
    .byDatabase_cluster_uuid("9cc10173-e9ea-4176-9dbc-a4cee4c4ff30").topics
    .byTopic_name("customer-events").get();

Response Example

Show Response Example
{
  "topic": {
    "name": "customer-events",
    "partitions": [
      {
        "size": 4096,
        "id": 0,
        "in_sync_replicas": 3,
        "earliest_offset": 0,
        "consumer_groups": [
          {
            "name": "consumer-group-1",
            "offset": 0
          },
          {
            "name": "consumer-group-2",
            "offset": 1
          }
        ]
      },
      {
        "size": 4096,
        "id": 1,
        "in_sync_replicas": 3,
        "earliest_offset": 0,
        "consumer_groups": null
      }
    ],
    "replication_factor": 3,
    "state": "active",
    "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_difference_max_ms": 9223372036854776000,
      "message_timestamp_type": "create_time",
      "min_cleanable_dirty_ratio": 0.5,
      "min_compaction_lag_ms": 0,
      "min_insync_replicas": 1,
      "preallocate": false,
      "retention_bytes": -1,
      "retention_ms": 604800000,
      "segment_bytes": 209715200,
      "segment_index_bytes": 10485760,
      "segment_jitter_ms": 0,
      "segment_ms": 604800000
    }
  }
}

More Information

See /v2/databases/{database_cluster_uuid}/topics/{topic_name} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.