Using Postman to Test IoT Platform APIs
Prerequisites
- Obtain the IP address and port number (HTTPS-compliant) provided by the IoT platform for applications.
- Install and run Postman.
NOTE:
The Postman installation package is available at https://www.getpostman.com.
Configuring Postman
- Choose Settings.
Figure 1 Choosing Settings
- Disable certificate verification so that Postman does not verify the server certificate.
Figure 2 Disabling certificate verification
- Configure the client certificate. Specifically, enter the IP address and port number provided by the IoT platform for applications in the Host input box.
Figure 3 Configuring the client certificate
client.crt and client.key are the client certificate and the private key file.
Debugging the Authentication API
- Configure the HTTP method, URL, and Headers of the authentication API.
Figure 4 Configuring the HTTP method, URL, and Headers of the authentication API
- Configure Body of the authentication API.
Figure 5 Configuring Body of the authentication API
- Click Send. The returned code and response are displayed in the lower part of the page.
Keep the access token securely. It will be used when other APIs are called.
Figure 6 Viewing the response of the Auth API
Debugging the API for Registering a Directly Connected Device
- Configure the HTTP method, URL, and Headers of the API for registering a directly connected device.
Figure 7 Configuring the HTTP method, URL, and Headers of the API for registering a directly connected device
- Configure Body of the API for registering a directly connected device.
Figure 8 Configuring Body of the API for registering a directly connected device
- Click Send. The returned code and response are displayed in the lower part of the page.
Keep the returned device ID properly. It will be used when other APIs are called.
Figure 9 Viewing the response of the API for registering a directly connected device
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot