GET /v3/clusters/{string: cluster_Id}/topics

Retrieves a list of topic names on the specific 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 Returns a list of topic names and metadata in the default stream. Returns topic names and metadata that contains a stream path.
streams.default.stream is not defined Returns {"error_code":80001,"message":"HPE Ezmeral Data Fabric Event Data Streams does not currently support this API. Set the streams.default.stream parameter to return topics for the default stream"}.
Table 2. Parameters
Parameters Description
cluster_id (string) Cluster’s id.

Syntax

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

Request Example

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

Response Example

{
  "kind":"KafkaTopicList",
  "metadata":
    {
      "self":"http://node1.cluster.com:8082/v3/clusters/682798077049224619/topics",
      "next":null
    },
  "data":
    [
        {
          "kind":"KafkaTopic",
          "metadata":
            {
              "self":"http://node1.cluster.com:8082/v3/clusters/682798077049224619/topics/str:tp",
              "resource_name":"crn:///kafka=682798077049224619/topic=str:tp"
            },
          "cluster_id":"682798077049224619",
          "topic_name":"/str:tp",
          "is_internal":false,
          "replication_factor":1,
          "partitions":
            {
              "related":"http://node1.cluster.com:8082/v3/clusters/682798077049224619/topics/str:tp/partitions"
            },
          "configs":
            {
              "related":"http://node1.cluster.com:8082/v3/clusters/682798077049224619/topics/str:tp/configs"
            },
          "partition_reassignments":
            {
              "related":"http://node1.cluster.com:8082/v3/clusters/682798077049224619/topics/str:tp/partitions/-/reassignment"
            }
        },
        {
          "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"
            }
        }
    ]
}