This topic describes common parameters, including common request parameters and common response parameters. Common parameters are required in all API requests.
Sample common parameters
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, in the format of YYYY-MM-DD. The current version number is 2020-01-01. |
AccessKeyID | String | Yes | The AccessKey ID provided to you by Alibaba Cloud. |
Signature | String | Yes | The signature string of the current request. |
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 in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
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 responses
DTS API uses standard HTTP status codes to indicate whether the call is successful.
- A 2xx status code indicates a successful call.
- A 4xx or 5xx status code indicates a failed call.
Responses can be returned in the JSON or XML format. You can specify the response format in the request. The default response format is XML. For ease of reading, the sample responses are formatted. The actual responses do not include line breaks or indentations.
Sample success responses
- XML format
<? xml version="1.0" 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", /*Return Result Data*/ }
Sample error responses
If you send an HTTP request, the system returns an HTTP status code 4xx or 5xx to indicate an error. 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 request ID and the HostId parameter that indicates the ID of the site that you requested.
- XML format
<? xml version="1.0" encoding="UTF-8"? > <Error> <RequestId>8906582E-6722-409A-A6C4-0E7863B733A5</RequestId> <HostId>dts.aliyuncs.com</HostId> <Code>UnsupportedOperation</Code> <Message>The specified action is not supported. </Message> </Error>
- JSON format
{ "RequestId": "7463B73D-35CC-4D19-A010-6B8D65D242EF", "HostId": "dts.aliyuncs.com", "Code": "UnsupportedOperation", "Message": "The specified action is not supported." }