This article contains a list of REST API commands that pertain to Kafka topics.
For a walk-through of the Navigator REST API using the demo site, see Using the REST API using the Navigator demo system. No installation is required. The article Performing REST API operations using the Swagger UI includes three detailed examples, as well as instructions for issuing plain text or JSON-formatted MQSC Commands through the REST API.
Jump ahead: |
Search Kafka Topics
GET /kafka/topics
Purpose: Lists Kafka topics that meet the criteria specified in the parameters.
Curl example
curl -i -u Admin:admin -X GET "http://192.168.88.233:8019/rest/v1/kafka/topics"
Read Kafka Topic Data
GET /kafka/topics/{nodeName}/{clusterName}/{topicName}
Purpose: Lists attributes of a specified Kafka topic on the specified node and cluster.
Curl example
curl -i -u Admin:admin -X GET "http://192.168.88.233:8019/rest/v1/kafka/topics/CMKafka/localhost:9095/TopicA?attributes=%2A"
JSON example
{
"nodeName": "CMKafka",
"clusterName": "localhost:9095",
"topicName": "TopicA",
"queries": {
"attributes": "*"
},
"auth": {
"user": "Admin",
"password": "admin"
}
}