Skip to main content
Skip table of contents

Use Postman to Simulate a Reconnection from the ZeroKey MQTT Client to the Broker

Using ZeroKey’s API and Postman you can simulate an automatic reconnection from the ZeroKey MQTT client to the MQTT Broker at intervals of your choosing.

The ZeroKey API

The ZeroKey API enables modules, applications and tools to interact with ZeroKey’s Spatial Intelligence Platform (SIP). Core functions of the Quantum RTLS hardware are accessible through the API, giving you direct control of system operation.

Obtain a Bearer Token in Postman

Begin by reading our help article Establishing an API Connection and Obtaining a Bearer Token using Postman. Once you’re connected, be sure to copy the token before continuing.

Postman MQTT Module: GET

  1. In Postman, click the Standard Modules folder and access the MQTT Module folder. Click Get MQTT Settings.

image-20241029-225335.png

 

  1. Click on the Authorization tab at the top of the screen. In the Auth Type dropdown menu, select Bearer Token.

  1. Paste the Bearer Token you generated earlier in the Token field, then click the Send button.

image-20241029-225415.png

  1. In the Body tab on the bottom of the page, the MQTT setting will be reported. Copy the full ConnectionID, which will look similar to the following:

 

"ConnectionID" :  "256aec98-4027-4c0f-9be9-167cd227ddc0",

Postman MQTT Module: PUT

  1. Navigate to the PUT Update MQTT Connection Settings menu in the MQTT Module folder:

image-20241029-225713.png

  • Click on the Authorization tab and under Auth Type select Bearer Token.

  • Under the Token field paste the Bearer Token that you generated.

  • Next, navigate to the Body tab and copy and paste the following:

{

    "host": "10.20.0.1",

    "port": 8883,

    "TLS": true,

    "username": "string",

    "password": "string",

    "topics": [

        {

            "topic": "ifield/location/test",

            "FilterChain": [

                {"FilterTemplate": "dashboard"}

            ]

        }

    ]

}

Change the Host IP Address

  1. Change the “host” IP address to your MQTT IP address and enter the port number that the MQTT Broker is using.

  • If TLS is not required, set it to false as shown in the sample image below:

image-20241029-230022.png

Modify the URL

  1. Use the following sample URL:

{{baseUrl}}/{{version}}/modules/mqtt/{ConnectionID}

  • Replace {ConnectionID} with the ConnectionID that you generated in the Get MQTT Settings. Refer to the sample image:

image-20241029-230341.png
  1. Click the Send button. Postman will report the following information:

image-20241029-230439.png

Schedule the Run Frequency

  1. Click the Runner button located at the bottom of the page.

image-20241029-230807.png
  • Under Choose how to run your collection select the Scheduled Runs option.

  • Under Schedule Configuration set the Schedule name and then edit the Run Frequency based on your requirements.

image-20241029-230858.png

10.   On the left side of the screen, drag and drop the collection that you want to run and automate.

image-20241029-230948.png

Schedule Run

11.   Click the Schedule Run button at the bottom of the Schedule Configuration page.

image-20241029-231121.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.