Common parameters
更新时间:
复制 MD 格式
This topic describes the request and response parameters that are included in every API call.
Common request parameters
| Name | Type | Required | Description |
| Format | String | No | The format of the returned message. Valid values: JSON (default) | XML |
| Version | String | Yes | The API version number. Use the YYYY-MM-DD date format. Valid value: 2020-04-29 |
| AccessKeyId | String | Yes | The AccessKey ID used to access the service. |
| Signature | String | Yes | The signature string. |
| SignatureMethod | String | Yes | The signature method. Valid value: HMAC-SHA1 |
| Timestamp | String | Yes | The timestamp of the request. Use UTC time in the ISO 8601 standard 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 used to prevent network replay attacks. Use a different random value for each request. |
| ResourceOwnerAccount | String | No | The account of the resource owner accessed by the API request. This is the logon username. |
Example
http://cloudgame.cn-shanghai.aliyuncs.com/?Action=ListGames
&TimeStamp=2014-05-19T10%3A33%3A56Z
&Format=xml
&AccessKeyId=testid
&SignatureMethod=Hmac-SHA1
&SignatureNonce=NwDAxvLU6tFE0DVb
&Version=2014-05-15
&SignatureVersion=1.0
&Signature=SignatureCommon response parameters
API responses use a unified format. For successful calls, the response data is in XML or JSON format. You can specify the data format when you send a request. The default format is XML. A unique identifier, RequestId, is returned for every API call, regardless of whether the call is successful.
- A
2xxHTTP status code indicates a successful call. - A
4xxor5xxHTTP status code indicates a failed call.
The following examples show common responses:
- XML format
<?xml version="1.0" encoding="utf-8"?> <!--The root node of the result--> <APIName+Response> <!--The request ID tag--> <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId> <!--The response data--> </APIName+Response> - JSON format
{ "RequestId":"4C467B38-3910-447D-87BC-AC049166F216", /*The response data*/ }
该文章对您有帮助吗?