Table of Contents

API : IPTV : MQTT broker : Get

Introduction

This will return a single MQTT broker configuration by its id.

A configuration identifies an MQTT broker (host, port and protocol) together with an optional topic prefix, and belongs to a reseller. The full configuration document is returned.

By default the reseller field holds the reseller's ObjectId. When the extendReseller query parameter is set, it is instead expanded into an object containing the reseller's id and name.

Request

URL https://api.telecomx.dk/iptv/brokerconfig/:id
Method GET
Access level RESELLER admin (with the TV employee feature)
ADMIN
Params id [required] ObjectId of the broker configuration.
Query extendReseller [optional] Boolean, default false. When true, the reseller field is expanded from its ObjectId into an object with _id and name.

Query examples

https://api.telecomx.dk/iptv/brokerconfig/1234567890ABCD1234567890
https://api.telecomx.dk/iptv/brokerconfig/1234567890ABCD1234567890?extendReseller=true

Response

Configuration
_id ObjectId Unique id of the broker configuration
reseller ObjectId/Object The reseller (customer) that owns the configuration. By default the reseller's ObjectId; when extendReseller is true it is expanded to an object with _id and name.
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

Example

{
   _id: "1234567890ABCD1234567890",
   reseller: "0987654321DCBA0987654321",
   name: "Main broker",
   host: "mqtt.telecomx.dk",
   port: 8883,
   topicPrefix: "acme/",
   protocol: "SSL"
}

Example (extendReseller=true)

{
   _id: "1234567890ABCD1234567890",
   reseller: {
     _id: "0987654321DCBA0987654321",
     name: "Acme Reseller A/S"
   },
   name: "Main broker",
   host: "mqtt.telecomx.dk",
   port: 8883,
   topicPrefix: "acme/",
   protocol: "SSL"
}

Errors

Error code Message Description
404 id No broker configuration with the given id exists. Also returned when the id is not a valid ObjectId.
403 access_denied Insufficient access level — minimum RESELLER admin required, or the RESELLER admin does not have the TV employee feature.
500 internal_error <Unspecified>