Common parameters
This document describes the common request and return parameters for the Alibaba Cloud Link WAN API.
Every API call must include common request parameters.
| Name | Type | Required | Description |
| Format | String | Yes | The format of the return value. Supported formats: JSON and XML. |
| Version | String | Yes | The API version number. The format is YYYY-MM-DD. The latest version is 2019-03-01. Each API can have multiple versions. |
| AccessKeyId | String | Yes | The AccessKey ID issued by Alibaba Cloud for service access. |
| Signature | String | Yes | The signature string. |
| SignatureMethod | String | Yes | The signature method. Only HMAC-SHA1 is supported. |
| Timestamp | String | Yes | The timestamp of the request. The date must be in Coordinated Universal Time (UTC) and follow the ISO 8601 standard. The format is YYYY-MM-DDThh:mm:ssZ. For example, 2019-01-20T12:00:00Z corresponds to 20:00:00 on January 20, 2019 in UTC+8. |
| SignatureVersion | String | Yes | The signature algorithm version. The current version is 1.0. |
| SignatureNonce | String | Yes | A unique random number to prevent network replay attacks. Use a different random value for each request. |
| RegionId | String | Yes | The region where the service is located. This corresponds to the Region in the console. Only cn-shanghai is supported. |
| Action | String | Yes | The name of the API method. It specifies the requested operation. |
Example
https://linkwan.cn-shanghai.aliyuncs.com/
?Format=JSON
&Version=2019-01-20
&Signature=Pc5WB8gokVn0xfeu%2FZV%2BiNM1dgI%3D
&SignatureMethod=HMAC-SHA1
&SignatureNonce=15215528852396
&SignatureVersion=1.0
&AccessKeyId=...
&Timestamp=2019-01-20T12:00:00Z
&RegionId=cn-shanghai
&Action=GetGateway
&GwEui=0000000000000000
Common return parameters
API responses use a standard format. An HTTP status code of 4xx or 5xx indicates that the API call to the Alibaba Cloud Link WAN service failed, for reasons such as a signature error. An HTTP status code of 2xx indicates that the service accepted the API call. However, the success of the requested operation depends on the response content. The response can be in JSON or XML format, which you can specify in the request.
Every API call returns a unique request ID (RequestId), regardless of the result.
If an API call returns a 2xx HTTP status code, the requested operation may have succeeded or failed. The following sections provide examples of the response content for both cases.
Successful request example
- JSON format
{
"RequestId": "89EF6CAA-958F-F32C-BE45-FE003C6DE097",
"Success": true,
"Data": "The returned business data. The Data field can be a list, a dictionary, or a simple type. Not all API methods include the Data field in the response."
}
- XML format
<?xml version="1.0" encoding="utf-8"?>
<API method name + Response>
<RequestId>89EF6CAA-958F-F32C-BE45-FE003C6DE097</RequestId>
<Success>true</Success>
<Data>The returned business data. The Data field can be a list, a dictionary, or a simple type. Not all API methods include the Data field in the response.</Data>
</API method name + Response>
Failed request example
- JSON format
{
"RequestId": "89EF6CAA-958F-F32C-BE45-FE003C6DE097",
"Code": "InternalError",
"Message": "The request processing has failed due to some unknown error, exception or failure."
}
- XML format
<?xml version="1.0" encoding="utf-8"?>
<API method name + Response>
<RequestId>89EF6CAA-958F-F32C-BE45-FE003C6DE097</RequestId>
<Code>InternalError</Code>
<Message>The request processing has failed due to some unknown error, exception or failure.</Message>
</API method name + Response>