GET /v3/clusters/{string: cluster_id}/topics/{string: topic_name}

Retrieves metadata about a specific topic within a cluster.

Description

The behavior of the information retrieved depends on the configuration. See streams.default.stream in Configuration Parameters.
Table 1. Response Behavior
Parameters Defined Response
streams.default.stream is defined Gets metadata about a specific HPE Ezmeral Data Fabric Streams topic on this cluster. A fully qualified topic name can be passed or not. If the topic name is not fully qualified, the metadata is retrieved and appended to the default stream path. For example, topic1 is equivalent to default_stream:topic1.
streams.default.stream is not defined Gets metadata about a specific HPE Ezmeral Data Fabric Streams topic on this cluster. A fully qualified topic name is passed that contains the stream path.
NOTE
The full name for the HPE Ezmeral Data Fabric Streams topic contains characters such as a forward slash (/) and a colon (:). Therefore, the topic should be encoded. For example, /streaming_data/stream:topic-1 is equivalent to %2Fstreaming_data%2Fstream%3Atopic-1.
Table 2. Parameters
Parameters Description
cluster_id (string) Cluster’s id.
topic_name (string) Name of the topic.

Syntax

http://<host>:8082/v3/clusters/<string: cluster_id>/topics/<string: topic_name>

Request Example

$ curl -X GET -H "Content-Type: application/json" "http://localhost:8082/v3/clusters/682798077049224619/topics/tp-2"

Response Example

{
  "kind":"KafkaTopic",
  "metadata":
    {
      "self":"http://node1.cluster.com:8082/v3/clusters/682798077049224619/topics/str:tp-2",
      "resource_name":"crn:///kafka=682798077049224619/topic=str:tp-2"
    },
  "cluster_id":"682798077049224619",
  "topic_name":"/str:tp-2",
  "is_internal":false,
  "replication_factor":1,
  "partitions":
    {
      "related":"http://node1.cluster.com:8082/v3/clusters/682798077049224619/topics/str:tp-2/partitions"
    },
  "configs":
    {
      "related":"http://node1.cluster.com:8082/v3/clusters/682798077049224619/topics/str:tp-2/configs"
    },
  "partition_reassignments":
    {
      "related":"http://node1.cluster.com:8082/v3/clusters/682798077049224619/topics/str:tp-2/partitions/-/reassignment"
    }
}