This topic describes the request and response parameters that are required for all Alibaba Cloud DNS API operations.

Common request parameters

Table 1. Common request parameters
Parameter Type Required Description
Format  String  No The format in which to return the response. Valid value (default):

JSON and XML.

Version String Yes The version number of the API. The value is in the YYYY-MM-DD format. Set the value to

2020-04-20

AccessKeyId String Yes The AccessKey ID provided to you by Alibaba Cloud.
Signature String Yes The signature string in the API request.
SignatureMethod String Yes The encryption method of the signature string. Valid value:

HMAC-SHA1.

Timestamp String Yes The timestamp of the request. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

For example, 2013-01-10T12:00:00Z indicates 20:00:00 on January 10, 2013 Beijing time.

SignatureVersion String Yes The version of the signature encryption algorithm. Valid value:

1.0.

SignatureNonce String Yes A unique, random number used to prevent replay attacks.

You must use different numbers for multiple requests.

ResourceOwnerAccount  String  No The owner account (the logon username) of the resource to be accessed through this API request.
Examples 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

Responses can be returned in either the JSON or XML data format. You can specify the response data format in the request. The default response format is XML. Each time the interface is called, whether successful or not, the system returns a unique identifier RequestId.
  • Return 2xx HTTP status code indicates that the call is successful.
  • Return 4xx or 5xx HTTP status code indicates that the call has failed.
  • Example of common normal response parameters

    After the operation is called, it returns the response parameters, including the request ID. HTTP status code is 2xx.

    • XML format
      <? xml version="1.0" encoding="utf-8"? encoding="utf-8"?> 
          <!--Result Root Node-->
          <Operation Name+Response>
              <!--Return Request Tag-->
              <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
              <!--Return Result Data-->
          </Operation Name+Response>
                                  
    • JSON format
      {
          "RequestId":"4C467B38-3910-447D-87BC-AC049166F216",
          /*The returned result*/
          }
  • Sample returned exceptions in XML format

    If the operation encounters an error, the following information is returned: an error code, error message, and request ID. API responses use the HTTP response format where a 4xx or 5xx status code indicates a failed call. You can obtain the error code based on your needs. For more information, see Error codestroubleshoot. When you cannot find out the specific problem, please submit a ticket contact Us and indicate it in the work order. RequestId.

    • XML format
      <? xml version="1.0" encoding="UTF-8"? ><! --Result Root Node-->
      <Error>
          <RequestId>540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx</RequestId> <! --Request ID-->
          <Code>MissingParameter.CommandId</Code> <! -- Error code -->
          <Message>The input parameter "CommandId" that is mandatory for processing this request is not supplied. </Message> <! --Error message-->
      </Error>
    • JSON format
      {
          "RequestId": "540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx", /* Request ID */
          "Code": "MissingParameter.CommandId",/* Error code */
          "Message": "The input parameter "CommandId" that is mandatory for processing this request is not supplied." /* Error message */
      }