How to enable/access REST API's
By default, the REST API is enabled for Starter, Professional and Enterprise edition cloud accounts. To establish access, you must first create API Access credentials. This can be done by logging into the HiveMQ Cloud WebUI and opening the ‘API Access’ menu for the broker. This will allow you to create credentials for use in authentication when accessing the API.
For a general listing of all connected MQTT clients, one must simply perform a GET request at the following address, replacing {brokerURL} with your specific broker URL for your cloud account. :
{brokerURL}/api/v1/mqtt/clients
This will offer a JSON object response containing a list of connected clients.
Other information, such as specific-client information, is also available. For a specific client’s details, a GET request is to be submitted to the following address, replacing the {brokerURL} with your broker’s URL, and the {clientId} with the unique identifier assigned to the client we are looking to get the details of :
{brokerURL}/api/v1/mqtt/clients/{clientId}
For other features of the API, be sure to check out our specification document which provides all of these endpoints, and sample usages.