Create an MQTT broker configuration
POST/api/v1/orgs/{orgId}/data-bridges/mqtt-broker-configs
Create a reusable MQTT broker configuration.
Finite values:
authType:UsernamePasswordmqttProtocolVersion:V310,V311,V500checkConnection:true,false
Defaults:
authType:UsernamePasswordmqttProtocolVersion:V311checkConnection:falsekeepAliveInterval: omitted storesnull; runtime uses60sreconnectInterval: omitted storesnull; runtime uses5s
Example:
{
"name": "production mqtt",
"brokerEndpoint": "mqtts://broker.example.com:8883",
"authType": "UsernamePassword",
"brokerCredentials": {
"username": "user",
"password": "pass"
},
"tls": {
"caCertificateId": "75ef53f3-979c-4b4f-9478-d2f345196d46"
},
"keepAliveInterval": "60s",
"reconnectInterval": "5s",
"mqttProtocolVersion": "V311",
"checkConnection": false
}
Request
Responses
- 201
- 400
- 401
- 403
- 409
MQTT broker configuration created.
Invalid configuration payload, MQTT/TLS endpoint scheme mismatch, unknown certificate reference, or connection check failure. Possible titles: WEDA.DataBridge.MqttTlsSchemeMismatch, WEDA.DataBridge.CaCertificateNotFound, and (when checkConnection is true) WEDA.DataBridge.BrokerUnreachable, WEDA.DataBridge.TlsInvalidCaCertificate, WEDA.DataBridge.TlsExpiredCertificate, WEDA.DataBridge.TlsHostnameMismatch.
Authentication is missing or invalid.
The caller lacks the required role for this operation.
Broker configuration name already exists.