To send an Alibaba Cloud Dynamic Route for CDN (DCDN) API request, you must send an HTTP GET request to the Alibaba Cloud DCDN endpoint. You must add the request parameters that correspond to the API operation being called. After you call the API, the system returns a response. The request and response are encoded in UTF-8.
Request syntax
DCDN API operations use the RPC protocol. You can call DCDN API operations by sending HTTP GET requests. DCDN supports both HTTP and HTTPS requests. For data security, we recommend that you send HTTPS requests. All requests and responses are UTF-8 encoded. The request syntax is as follows:
https://Endpoint/?Action=xx&Version=xx&Parameters
- Endpoint: the endpoint of the DCDN API is dcdn.aliyuncs.com.
- Action: the name of the operation being performed. For example, to add an accelerated domain, you must set the Action parameter to AddDcdnDomain.
- Version: the version of the DCDN API. Set the value to 2018-01-15.
- Parameters: the request parameters for the operation. Separate multiple parameters with ampersands
(
&
). Request parameters include both common parameters and operation-specific parameters. Common parameters are used for all DCDN API calls regardless of the operation. For more information, see Common request parameters.
The following example demonstrates how to call the AddDcdnDomain operation in DCDN.
http://dcdn.aliyuncs.com?Action=AddDcdnDomain &DomainName=example.com
&Format=XML
&Sources=[{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}]
&AccessKeyId=xxx
&SignatureMethod=HMAC-SHA1
&SignatureNonce=3ee8c1b8-83d3-44af-a94f-4e0ad82fd6cf
&Version=2018-01-15
&SignatureVersion=1.0
...