This will update an existing MQTT broker configuration for IPTV / FlexCare.
This is a partial update: only the fields present in the request body are changed, and fields that are omitted keep their stored values. The _id and reseller fields are immutable — any value sent for them is ignored and the stored values are kept, so a configuration can never be moved to another reseller via this endpoint.
On success the full, updated configuration is returned.
| URL | https://api.telecomx.dk/iptv/brokerconfig/:id | |
|---|---|---|
| Method | POST | |
| Access level | RESELLER admin (with the TV employee feature) ADMIN |
|
| Params | id | [required] ObjectId of the broker configuration to update. |
| Body | name | [optional] Name of the broker configuration. |
| host | [optional] Hostname or IP address of the MQTT broker. |
|
| port | [optional] Port of the MQTT broker. |
|
| topicPrefix | [optional] Prefix applied to MQTT topics. |
|
| protocol | [optional] Connection protocol, one of TCP, SSL or TLS. |
|
Note that values of the wrong type are not rejected: a wrong-typed name, host or port (e.g. a port sent as a string) is silently ignored and the stored value is kept, a wrong-typed or empty protocol is replaced with SSL, and a wrong-typed topicPrefix is replaced with the empty string. Unknown body fields are stripped and never stored.
{ name: "Main broker (updated)", port: 8884 }
| Configuration | ||
|---|---|---|
| _id | ObjectId | Unique id of the broker configuration |
| reseller | ObjectId | The reseller (customer) that owns the configuration (cannot be changed) |
| name | String | Name of the broker configuration |
| host | String | Hostname or IP address of the MQTT broker |
| port | Number | Port of the MQTT broker |
| topicPrefix | String | Prefix applied to MQTT topics (may be an empty string) |
| protocol | String | Connection protocol: TCP, SSL or TLS |
{ _id: "1234567890ABCD1234567890", reseller: "0987654321DCBA0987654321", name: "Main broker (updated)", host: "mqtt.telecomx.dk", port: 8884, topicPrefix: "acme/", protocol: "SSL" }
| Error code | Message | Description |
|---|---|---|
| 404 | id | No broker configuration with the given id exists. Also returned when the id is not a valid ObjectId. |
| 409 | protocol | protocol must be one of TCP, SSL or TLS. |
| 403 | access_denied | Insufficient access level — minimum RESELLER admin required, or the RESELLER admin does not have the TV employee feature. |
| 422 | multiple | More than one field failed validation; the individual errors are returned in the inner array. |
| 500 | internal_error | <Unspecified> |