ApsaraMQ for MQTT You can call the API by using HTTP, SDK, or OpenAPI Explorer.
Call API operations by using HTTP
ApsaraMQ for MQTT The API for RPC is in RPC style. You can call ApsaraMQ for MQTT API.
The request structure is as follows:
http://Endpoint/?Action=xx&Parameters
Where
Endpoint: ApsaraMQ for MQTT the service access address of [******] is onsmqtt.[regionId].aliyuncs.com.[ regionId], see Endpoint.
Action: the name of the operation being performed. For example, to apply for a token, you must set the Action parameter to ApplyToken.
Version: The version of the API to use, ApsaraMQ for MQTT the API version of IS 2020-04-20.
Parameters: the request parameters for the operation. Separate multiple parameters with ampersands (&).
Request parameters include both common parameters and operation-specific parameters. Common request parameters include the API version and authentication-related parameters. For more information, see Common parameters.
Call API operations by using SDKs
The ApsaraMQ for MQTT API supports SDKs for multiple programming languages. The SDKs automatically sign requests for you. For more information, see Obtain SDKs for the ApsaraMQ forMQTT API.
Call API operations by using OpenAPI Explorer
OpenAPI Explorer is a visual tool for calling APIs. OpenAPI Explorer allows you to call APIs of Alibaba Cloud services and APIs provided in Alibaba Cloud Marketplace. You can call these APIs on a webpage or command-line interface (CLI). In addition, OpenAPI Explorer allows you to view the request and response of each API call and dynamically generate SDK sample code.
You can call API operations by directly accessing OpenAPI Explorer or using debugging features in the API documentation.
Endpoint
ApsaraMQ for MQTT The API access address for is as follows: onsmqtt.[regionId].aliyuncs.com
. [regionId] is the ID of the region where the ApsaraMQ for MQTT instance is located.
ApsaraMQ for MQTT Supported OpenAPI regions, and the corresponding regionId and domain as shown in the following table.
Region | Region ID | Domain |
Internet | mq-internet-access | onsmqtt.mq-internet-access.aliyuncs.com |
China (Chengdu) | cn-chengdu | onsmqtt.cn-chengdu.aliyuncs.com |
China (Hangzhou) | cn-hangzhou | onsmqtt.cn-hangzhou.aliyuncs.com |
China (Shanghai) | cn-shanghai | onsmqtt.cn-shanghai.aliyuncs.com |
China (Qingdao) | cn-qingdao | onsmqtt.cn-qingdao.aliyuncs.com |
China (Beijing) | cn-beijing | onsmqtt.cn-beijing.aliyuncs.com |
China (Zhangjiakou) | cn-zhangjiakou | onsmqtt.cn-zhangjiakou.aliyuncs.com |
China (Hohhot) | cn-huhehaote | onsmqtt.cn-huhehaote.aliyuncs.com |
China (Shenzhen) | cn-shenzhen | onsmqtt.cn-shenzhen.aliyuncs.com |
China (Hong Kong) | cn-hongkong | onsmqtt.cn-hongkong.aliyuncs.com |
Singapore | ap-southeast-1 | onsmqtt.ap-southeast-1.aliyuncs.com |
Malaysia (Kuala Lumpur) | ap-southeast-3 | onsmqtt.ap-southeast-3.aliyuncs.com |
Indonesia (Jakarta) | ap-southeast-5 | onsmqtt.ap-southeast-5.aliyuncs.com |
Japan (Tokyo) | ap-northeast-1 | onsmqtt.ap-northeast-1.aliyuncs.com |
Germany (Frankfurt) | eu-central-1 | onsmqtt.eu-central-1.aliyuncs.com |
US (Silicon Valley) | us-west-1 | onsmqtt.us-west-1.aliyuncs.com |
US (Virginia) | us-east-1 | onsmqtt.us-east-1.aliyuncs.com |
East China 1 Finance | cn-hangzhou-finance | onsmqtt.cn-hangzhou-finance.aliyuncs.com |
South China 1 Finance | cn-shenzhen-finance-1 | onsmqtt.cn-shenzhen-finance-1.aliyuncs.com |
China East 2 Finance | cn-shanghai-finance-1 | onsmqtt.cn-shanghai-finance-1.aliyuncs.com |
China North 2 Ali Gov | cn-north-2-gov-1 | onsmqtt.cn-north-2-gov-1.aliyuncs.com |