MQTT API and REST API
Automate administration by connecting the Management Center for Mosquitto to the Pro Mosquitto broker via its native MQTT API. Leverage a rich set of REST APIs to further integrate Management Center features into your software environment.
How MQTT and REST APIs work
Pro Mosquitto MQTT APIs
Pro Mosquitto MQTT APIs
Pro Mosquitto provides a set of MQTT APIs available via MQTT and can be used with an MQTT client, including third-party clients or the Management Center (which acts as an MQTT client when connected to Pro Mosquitto).
The API’s main task is to send a complete set of commands, such as create, list, and delete clients, etc., from the Management Center to the MQTT broker.
MQTT APIs functionality
Dynamic Security MQTT API allows creating MQTT clients, adding new Mosquitto users, managing their access rights, grouping them, etc. Moreover, it provides endpoints to return status data and enables active DynSec Plugin management.
High Availability MQTT API handles cluster management, including viewing cluster details, testing its health status, creating and deleting a cluster, adding or removing a node within a cluster, and more.
Inspect MQTT API gives an overview of connected and disconnected MQTT clients, including details like API, timestamps, and an overview of topics to which every MQTT client is subscribed.
MMC REST APIs
MMC REST APIs
The Management Center for Mosquitto connects to different Pro Mosquitto instances via MQTT, acting as an MQTT client. It offers a set of REST APIs that expose the MQTT APIs to HTTP clients.
REST APIs functionality
The Cluster Management REST API provides detailed information about Mosquitto clusters, e.g., which clusters the Management Center is connected to and which Mosquitto nodes belong to which cluster.
The Topic Tree REST API lets you retrieve information about the topic tree and clear its cache. It displays MQTT topics in a hierarchical structure, giving you a clear overview of the topics a broker uses. It also helps monitor which MQTT topics are used and how many messages are sent through each topic, etc.
The User Management REST API allows you to automatically create, read, update and delete Management Center users and groups, and manage their roles. Learn more here.
The Connection REST API provides a capability to manage (create and delete) Pro Mosquitto nodes connections to the Management Center.
The Monitoring REST API provides insights into the health of Pro Mosquitto HA clusters, leveraging data from Pro Mosquitto broker instances. Learn more here.
The Dynamic Security REST API enables you to manage MQTT clients, groups, and ACL access rights. Learn more here.
The Application Tokens REST API securely uses the Management Center’s REST APIs to create application tokens with role-based access and expiration dates. Users can automate actions handled via the UI. For instance, if an IoT platform provider receives a new booking for a service, its ERP system can automatically assign correct access rights for the new customer’s IoT device on Pro Mosquitto broker nodes. Learn more here.