跳至主要内容

Replace an MQTT broker configuration

PUT 

/api/v1/orgs/{orgId}/data-bridges/mqtt-broker-configs/{mqttConfigId}

Update broker endpoint and protocol settings for an existing MQTT broker configuration.

Authentication type and credential secrets are updated only by the credentials endpoint.

Finite values:

  • mqttProtocolVersion: V310, V311, V500
  • checkConnection: true, false

When checkConnection is true, the updated endpoint and protocol are verified using the stored credentials. The request fails if credentials are missing or the broker cannot be reached.

This is a full replacement, not a patch: an omitted tls clears the stored CA reference. An mqtts:// endpoint left without tls.caCertificateId then verifies the broker against the OS trust store instead of the uploaded certificate, so resend tls on every update that should keep it.

Defaults:

  • mqttProtocolVersion: V311
  • checkConnection: false
  • keepAliveInterval: omitted stores null; runtime uses 60s
  • reconnectInterval: omitted stores null; runtime uses 5s
  • tls: omitted clears tls.caCertificateId

Example:

{
"name": "production mqtt updated",
"brokerEndpoint": "mqtts://broker.example.com:8883",
"tls": {
"caCertificateId": "75ef53f3-979c-4b4f-9478-d2f345196d46"
},
"keepAliveInterval": "60s",
"reconnectInterval": "5s",
"mqttProtocolVersion": "V311",
"checkConnection": false
}

Request​

Responses​

OK