Anti-DDoS Pro or Anti-DDoS Premium allows you to call its API operations by using HTTP and OpenAPI Explorer. To send an Anti-DDoS Pro or Anti-DDoS Premium API request, you must send an HTTP GET request to the Anti-DDoS Pro or Anti-DDoS Premium endpoint. You must add the request parameters that correspond to the API operation being called. After you call the API operation, the system returns a response. The request and response are encoded in UTF-8.

Call API operations by using HTTP

Anti-DDoS Pro or Anti-DDoS Premium API operations use the RPC protocol. You can call Anti-DDoS Pro or Anti-DDoS Premium API operations by sending HTTP GET requests.

The request syntax is as follows:
http://Endpoint/?Action=xx&Parameters
where:
  • Endpoint: the endpoint of the Anti-DDoS Pro or Anti-DDoS Premium API. Valid values:
    • ddoscoo.cn-hangzhou.aliyuncs.com: the endpoint of the Anti-DDoS Pro API
    • ddoscoo.ap-southeast-1.aliyuncs.com: the endpoint of the Anti-DDoS Premium API
  • Action: the name of the operation being performed. For example, to query the IDs of the created Anti-DDoS Pro or Anti-DDoS Premium instances, you must set the Action parameter to DescribeInstanceIds.
  • Version: the version number of the API. Set the value to 2020-01-01.
  • Parameters: the request parameters for the operation. Separate multiple parameters with ampersands (&).

    Request parameters include both common parameters and operation-specific parameters. Common parameters include the API version and authentication information. For more information, see Common parameters.

The following example demonstrates how to call the DescribeInstanceIds operation in Anti-DDoS Pro or Anti-DDoS Premium.
Note The following code has been formatted for ease reading.
https://ddoscoo.cn-hangzhou.aliyuncs.com/?Action=DescribeInstanceIds
&Format=xml
&Version=2020-01-01
&Signature=xxxx%xxxx%3D
&SignatureMethod=HMAC-SHA1
&SignatureNonce=15215528852396
&SignatureVersion=1.0
&AccessKeyId=key-test
&TimeStamp=2020-01-01T12:00:00Z
...

Call API operations by using OpenAPI Explorer

OpenAPI Explorer a visual tool for calling APIs. OpenAPI Explorer allows you to call APIs of Alibaba Cloud services and APIs provided in Alibaba Cloud Marketplace. You can call these APIs on a webpage or command-line interface (CLI). In addition, OpenAPI Explorer allows you to view the request and response of each API call and dynamically generates SDK sample code.

You can visit https://api.aliyun.com/ or click the link in the Debugging section of the topic for each API operation to access OpenAPI Explorer.