Request structure

You can call the API provided by IoT Platform by sending HTTP or HTTPS requests.

The request structure is as follows:


In the request,

  • Endpoint: address where you can access IoT Platform. The following addresses are available:
    • China (Shanghai):
    • Singapore:
    • US (Silicon Valley):
    • Japan (Tokyo):
    • Germany (Frankfurt):
  • Action: operation to be performed. For example, call the Pub operation to publish messages.
  • Parameters: request parameters. Separate each parameter with an ampersand (&).

    Request parameters are comprised of common request parameters and parameters customized for the API. Common parameters include the API version number, authentication information, and other information.

The following example describes how to call Pub to publish a message to a specified topic.
Note In the following example, the service region is China (Shanghai). To assist reading, examples provided in this document are formatted.

Online debug for APIs

Alibaba Cloud provides OpenAPI Explorer for you to debug APIs online. On OpenAPI Explorer, you can query the APIs that you want to debug and enter parameters to call the APIs. The system will generate SDK demos according to the parameters that you have entered. You can view SDK demos under Example Code on the left side of the page. Select Debugging Result, you can view the real URL of the request and the response in JSON format.

API authorization

To ensure the security of your Alibaba Cloud account, we recommend that you call the APIs using a RAM user account. Before calling APIs as a RAM user, you need to create and attach specific authorization policies to the RAM user to allow access to the APIs.

For more information about API permissions that can be granted to RAM users, see API permissions.