All Products
Search
Document Center

ApsaraMQ for MQTT:Common parameters

Last Updated:Jun 16, 2026

Each API operation uses common request and response parameters in addition to operation-specific parameters.

Common request parameters

Table 1. Common request parameters
Name Type Required Description
Format String No The format of the response. Valid values:

JSON (default) | XML

Version String Yes The API version in the YYYY-MM-DD format. Valid value:

2020-04-20

AccessKeyId String Yes The AccessKey ID that you use to access the service.
Signature String Yes The request signature string.
SignatureMethod String Yes The signature algorithm. Valid value:

HMAC-SHA1

Timestamp String Yes The timestamp of the request in UTC, using the ISO 8601 format: YYYY-MM-DDThh:mm:ssZ.

For example, 20:00:00 on January 10, 2013 (UTC+8) is represented as 2013-01-10T12:00:00Z.

SignatureVersion String Yes The signature algorithm version. Valid value:

1.0

SignatureNonce String Yes A unique random number that prevents replay attacks.

Use a different random number for each request.

ResourceOwnerAccount String No The logon username of the resource owner.
Example of common request parameters
http://onsmqtt.[regionId].aliyuncs.com/?Action=[ApiName]
&TimeStamp=2020-05-19T10%3A33%3A56Z
&Format=xml
&AccessKeyId=testid
&SignatureMethod=Hmac-SHA1
&SignatureNonce=NwDAxvLU6tFE0DVb
&Version=2020-04-20
&SignatureVersion=1.0
&Signature=[Signature]

Common response parameters

API responses use a standard format. Successful calls return data in XML or JSON format. You can specify the format in your request. The default format is XML. Every API call returns a unique RequestId, regardless of whether the call succeeds.
  • An HTTP status code of 2xx indicates a successful call.
  • An HTTP status code of 4xx or 5xx indicates a failed call.
  • Example of a successful response

    If an API call succeeds, the response includes the response parameters and the request ID. The HTTP status code is 2xx.

    • XML format
      <?xml version="1.0" encoding="utf-8"?> 
          <!--The root node of the result-->
          <APIName+Response>
              <!--The request ID-->
              <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
              <!--The response data-->
          </APIName+Response>
                                  
    • JSON format
      {
          "RequestId":"4C467B38-3910-447D-87BC-AC049166F216",
          /* Response data */
          }
  • Example of an error response

    If an API call fails, the response includes an error code, an error message, and the request ID. The HTTP status code is 4xx or 5xx. Troubleshoot the issue based on the error code. For more information, see Error codes. If you cannot resolve the issue, contact ApsaraMQ for MQTT technical support in DingTalk group 116015007918.

    • XML example
      <?xml version="1.0" encoding="UTF-8"?><!--The root node of the result-->
      <Error>
          <RequestId>540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx</RequestId> <!--The request ID-->
          <Code>MissingParameter.CommandId</Code> <!--The error code-->
          <Message>The input parameter“CommandId”that is mandatory for processing this request is not supplied.</Message> <!--The error message-->
      </Error>
    • JSON example