I am creating custom UI on top of open source apache kafka setup. I need to list all the available topics in kafka broker to the UI. Is there any http/https rest API available that will return json of available topics?
Hi @AshishGupta
take a look at the v2 endpoint,
https://docs.confluent.io/platform/current/kafka-rest/api.html#topics
and the v3 endpoint,
https://docs.confluent.io/platform/current/kafka-rest/api.html#topic-v3
There’s an usage example for the v3 endpoint in the documentation,
https://docs.confluent.io/platform/current/kafka-rest/api.html#list-all-topics
Thanks Josephh. I think these are specific to Confluent Kafka setup.But In my case, I am using open source Apache Kafka.
- There is no such thing
- You can run the REST Proxy for any Kafka cluster.
Kafka otherwise has no HTTP endpoint to list topics.
CMAK and AKHQ, for example use Java/Scala with AdminClient API to do server-side rendering of topics from the cluster rather than make HTTP requests.