This topic describes common parameters, including common request parameters and common response parameters. Common parameters must be included in all Database Backup (DBS) API requests.

Common request parameters

Common request parameters are required in all DBS API requests.

Parameter Type Required Description
Format String No The format in which to return the response. Valid values: JSON and XML. Default value: XML.
Version String Yes The version number of the API. The value must be in the YYYY-MM-DD format. Set the value to 2019-03-06.
AccessKeyId String Yes The AccessKey ID provided to you by Alibaba Cloud.
Signature String Yes The signature string of the current request. For information about how to calculate a signature for a request, see Signature method.
SignatureMethod string Yes The encryption method of the signature string. Set the value to HMAC-SHA1.
Timestamp String Yes The timestamp of the request. Specify the time in the ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ. The time must be in UTC. For example, a value of 2013-08-15T12:00:00Z indicates 20:00:00 on August 15, 2013, UTC+8.
SignatureVersion String Yes The version of the signature encryption algorithm. Set the value to 1.0.
SignatureNonce String Yes A unique, random number that is used to prevent replay attacks. You must use different numbers for different requests.

Common response parameters

Every response returns a unique request ID regardless of whether the call is successful.

Sample requests

https://dbs-api.cn-hangzhou.aliyuncs.com/
?Format=xml
&Version=2019-03-06
&Signature=Pc5WB8gokVn0xfeu%2FZV%2BiNM1dgI%3D 
&SignatureMethod=HMAC-SHA1
&SignatureNonce=15215528852396
&SignatureVersion=1.0
&AccessKeyId=key-test
&OwnerId=12345678
&Timestamp=2014-10-10T12:00:00Z

Sample responses

API responses use the HTTP response format:
  • A 2xx HTTP status code indicates a successful call.
  • A 4xx or 5xx status code indicates a failed call.
Responses can be returned in either the XML or JSON format. You can specify the response format in the request. The default response format is XML.
Note The following sample responses are formatted for readability. Actual responses are not formatted with line breaks or indentation.

Sample success responses

XML format

A response in the XML format includes information such as the result of the request and the details of the query result. Example:
<?xml version="1.0" encoding="utf-8"?> 
<!--Endpoint-->
<API operation name+Response>
    <!--Request ID-->
    <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
    <!--Returned data-->
</API operation name+Response>

JSON format

{
    "RequestId": "4C467B38-3910-447D-87BC-AC049166F216",
    /* Return results */
}

Sample error responses

If an error occurs when you call an API operation, no result data is returned. You can identify the cause of the error based on the error code. For more information, see Client error codes.

If the system returns a 4xx or 5xx HTTP status code, the operation failed. The returned response body contains the specific error code and error message. The response body also contains the RequestId parameter that indicates the globally unique ID of the request and the HostId parameter that indicates the ID of the service that you requested to access. If you cannot identify the cause of an error, you can contact Alibaba Cloud technical support and provide the returned values of the HostId and RequestId parameters. Alibaba Cloud technical support can help you troubleshoot the error.

XML format

<?xml version="1.0" encoding="UTF-8"?>
<Error>
   <RequestId>8906582E-6722-409A-A6C4-0E7863B733A5</RequestId>
   <HostId>dbs-api.cn-hangzhou.aliyuncs.com</HostId>
   <Code>UnsupportedOperation</Code>
   <Message>The specified action is not supported.</Message>
</Error>

JSON format

{
    "RequestId": "7463B73D-35CC-4D19-A010-6B8D65D242EF",
    "HostId": "dbs-api.cn-hangzhou.aliyuncs.com",
    "Code": "UnsupportedOperation",
    "Message": "The specified action is not supported."
}