Create MQTT Broker from API

webfrank
Getting noticed

Create MQTT Broker from API

Hi,

  I would like to create a MQTT Broker from API but I need to enter also authentication settings which seems are not supported by the API.

 

I'm using Python SDK with the following payload:

 

{
"networkId": "L_xxxxxx",
"name": "API",
"host": "mqtt.example.com",
"port": 1883,
"security": {
"mode": "none"
},
"authentication": {
"username": "abcdefgh",
"password": "1234567890"
}
}

 

The MQTT Broker got created but credentials are not stored. Same happens if I lately update the broker.

 

The response from the server is

 

{
"authentication": {
"username": null

},

"host": "mqtt.example.com",

"id": "121212121212121",

"name": "API",

"port": 1883,

"security": {

"mode": "none",

"tls": {

"hasCaCertificate": false,

"verifyHostnames": true

}

}

}
4 REPLIES 4
PhilipDAth
Kind of a big deal
Kind of a big deal

Does it work if you do it via the dashboard?

Hi, yes from dashboard is working.

sungod
Head in the Cloud

As a test, if you create a broker with password manually, then do 

/networks/{networkId}/mqttBrokers/{mqttBrokerId}

 on it, does it return the password?
 
That'd confirm the API doesn't support setting/reading the password - whether that is the correct behaviour is another matter, IMO logically it should allow it, I'd open a case with tech support.
 

Hi, password is never returned.

Get notified when there are additional replies to this discussion.