Help Center > > Developer Guide> Product Development> Developing an Application> Reference> Using Postman to Test IoT Platform APIs

Using Postman to Test IoT Platform APIs

Updated at: Jun 26, 2019 GMT+08:00

Prerequisites

Before using this method, you need to:
  • 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

  1. Choose Settings.

    Figure 1 Choosing Settings

  2. Disable certificate verification so that Postman does not verify the server certificate.

    Figure 2 Disabling certificate verification

  3. 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

NOTE:

client.crt and client.key are the client certificate and the private key file.

Debugging the Authentication API

  1. Configure the HTTP method, URL, and Headers of the authentication API.

    Figure 4 Configuring the HTTP method, URL, and Headers of the authentication API

  2. Configure Body of the authentication API.

    Figure 5 Configuring Body of the authentication API

  3. 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

  1. 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

  2. Configure Body of the API for registering a directly connected device.

    Figure 8 Configuring Body of the API for registering a directly connected device

  3. 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

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel