This article contains a list of REST API commands that pertain to Kafka remote managers.
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.
Search Kafka Remote Managers
GET /kafka/remote-mgrs
Purpose: Finds Kafka remote queue managers (on a specific node, if specified).
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/kafka/remote-mgrs?nodeName=KafkaCM&attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
[
{
"wgsName": "MQM",
"nodeName": "KafkaCM",
"clusterName": "CLUSTER01",
"uri": "/rest/v1/kafka/remote-mgrs/KafkaCM/CLUSTER01",
"general": {
"bootstrapServers": "10.0.0.5:9092",
"groupId": ""
},
"configs": [
{
"configName": "security.protocol",
"value": "SASL_PLAINTEXT"
},
{
"configName": "sasl.mechanism",
"value": "PLAIN"
},
{
"configName": "sasl.jaas.config",
"value": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"admin\" password=\"password!\";"
}
],
"connects": [],
"ksqls": []
}
]
Read Kafka Remote Manager Data
GET /kafka/remote-mgrs/{nodeName}/{clusterName}
Purpose: Lists attributes of a specified Kafka remote manager on the specified node and cluster.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/kafka/remote-mgrs/KafkaCM/CLUSTER01?attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
{
"wgsName": "MQM",
"nodeName": "KafkaCM",
"clusterName": "CLUSTER01",
"uri": "/rest/v1/kafka/remote-mgrs/KafkaCM/CLUSTER01",
"general": {
"bootstrapServers": "10.0.0.5:9876",
"groupId": ""
},
"configs": [
{
"configName": "security.protocol",
"value": "SASL_PLAINTEXT"
},
{
"configName": "sasl.mechanism",
"value": "PLAIN"
},
{
"configName": "sasl.jaas.config",
"value": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"admin\" password=\"admin333!\";"
}
],
"connects": [],
"ksqls": []
}
Create Kafka Remote Manager
POST /kafka/remote-mgrs
Purpose: Creates a new Kafka remote manager on the specified node and cluster.
JSON example
{
"wgsName": "MQM",
"nodeName": "KafkaCM",
"clusterName": "CLUSTER01",
"uri": "string",
"general": {
"bootstrapServers": "10.0.0.5:9876",
"groupId": "string"
},
"configs": [
{
"configName": "string",
"value": "string",
"alter": "Set"
}
],
"connects": [
{
"instanceName": "string",
"url": "string",
"security": "None",
"username": "string",
"password": "string",
"token": "string",
"ignoreInvalidSslCerts": true,
"keyStorePath": "string",
"keyStorePassw": "string",
"trustStorePath": "string",
"trustStorePassw": "string",
"alter": "Set"
}
],
"schReg": {
"instanceName": "string",
"url": "string",
"security": "None",
"username": "string",
"password": "string",
"token": "string",
"ignoreInvalidSslCerts": true,
"keyStorePath": "string",
"keyStorePassw": "string",
"trustStorePath": "string",
"trustStorePassw": "string",
"alter": "Set"
},
"ksqls": [
{
"instanceName": "string",
"url": "string",
"security": "None",
"username": "string",
"password": "string",
"token": "string",
"ignoreInvalidSslCerts": true,
"keyStorePath": "string",
"keyStorePassw": "string",
"trustStorePath": "string",
"trustStorePassw": "string",
"alter": "Set"
}
]
}