43.132.55.55
for HTTP request as an example.43.132.55.55
). HTTPS and AES encryption methods are not available.43.132.55.55
for HTTP and 43.132.55.56
for HTTPS.http://43.132.55.55/d? + {request parameters}
, you need to use the following configuration information, which can be obtained on the Development Configuration page in the HTTPDNS console:http://43.132.55.55
of HTTPDNS.http://43.132.55.55
of HTTPDNS with DES encryption used.http://43.132.55.55
of HTTPDNS with AES encryption used.http://43.132.55.55/d? + {request parameters}
.Parameter | Description | Required | Value | Encryption | Description |
dn | Queried domain | Yes | The length of a single domain before encryption is 253 | Yes | It must be a domain added in the HTTPDNS console in the form of encrypted string for transfer. |
id | User ID | Yes | 1–10000 | No | If you use AES or DES encryption, you must pass in the ID but don't need to encrypt it. |
alg | Algorithm | Yes | [aes/des] | No | The DES algorithm is used by default. Different algorithms have different keys. |
ip | ECS (EDNS-Client-Subnet) value of the DNS request | No | IPv4/IPv6 address value | Yes | By default, the HTTPDNS server will query the client's egress IP in order to query the IP for the DNS split zone. You can use the `ip=xxx` parameter to specify the split zone's IP address. You can pass in IPv4/IPv6 addresses, which will be automatically identified by the API. For more information on encryption, see AES/DES Encryption/Decryption. |
query | Queried domain returned in the result | No | 1 | No | For single-domain queries, this parameter requires the returned result to carry the queried domain. |
timeout | Timeout period | No | 1000–5000 ms | No | It is the query timeout period, which is 5 seconds by default. Value range: [1000, 5000] ms |
ttl | Specifies whether to return the TTL value in the query result | No | 1 | No | If this parameter is not carried, the TTL value will not be passed by default. Valid value: 1 |
type | Query type | No | [aaaa/AAAA/addrs/ADDRS] | No | Valid values: [aaaa,AAAA,addrs,ADDRS]. The A record will be queried by default. If AAAA/aaaa is set, the AAAA record will be queried; if addrs/ADDRS is set, both the A and AAAA records will be queried. |
clientip | Client IP address returned in the query result | No | 1 | No | Valid value: 1. If this parameter is not carried, the clientip value will not be passed by default. If a value is assigned to this parameter, the address value will be after the | symbol in the returned result. If the ip parameter is carried, the value of the ip parameter will be returned; otherwise, the client IP address will be returned. |
xxx
is used as an example below.cloud.tencent.com
needs to be encrypted, while the authorization ID doesn't.curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com}&id=xxx"
2.3.3.4;2.3.3.5;2.3.3.6
curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com}&id=xxx&ttl=1"
2.3.3.4;2.3.3.5;2.3.3.6,120
curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com}&id=xxx&clientip=1&ip={encrypted string of the ECS value of the DNS request}&ttl=1"
12.3.3.4;2.3.3.5;2.3.3.6,120|1.2.3.4
ip
parameter will be returned.curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com}&id=xxx&clientip=1&ip={encrypted string of the ECS value of the DNS request}&type=addrs&ttl=1"
2.3.3.4;2.3.3.5;2.3.3.6,120-2402:4e00:0123:4567:0::2345;2403:4e00:0123:4567:0::2346,120|1.2.3.4
curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com}&id=xxx&clientip=1&ip={encrypted string of the ECS value of the DNS request}&query=1&ttl=1"
cloud.tencent.com.:2.3.3.4;2.3.3.5;2.3.3.6,120|1.2.3.4
curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com, www.qq.com, and www.dnspod.cn}&id=xxx&clientip=1&ip={encrypted string of the ECS value of the DNS request}&ttl=1"
cloud.tencent.com.:2.3.3.4;2.3.3.5;2.3.3.6,120www.qq.com.:3.3.3.4;3.3.3.5;3.3.3.6,180www.dnspod.cn.:4.3.3.4;4.3.3.5;4.3.3.6,60|1.2.3.4
cloud.tencent.com
needs to be encrypted, while the authorization ID doesn't.43.132.55.56
and pass in the token.curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com}&id=xxx"
curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com}&id=xxx&type=addrs&query=1&ip={encrypted string of the ECS value of the DNS request}"
cloud.tencent.com|1.2.3.4
curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com}&id=xxx&type=addrs&query=1&ip={encrypted string of the ECS value of the DNS request}"
cloud.tencent.com.:0-0|1.2.3.4
cloud.tencent.com.:2.3.4.5;3.3.3.3-0|1.2.3.4
indicates that no AAAA records can be found.curl "http://43.132.55.55/d?dn={encrypted string of cloud.tencent.com, www.qq.com, and www.dnspod.cn}&id=xxx&clientip=1&ip={encrypted string of the ECS value of the DNS request}&ttl=1"
cloud.tencent.com.:0www.qq.com.:3.3.3.4;3.3.3.5;3.3.3.6,180www.dnspod.cn.:4.3.3.4;4.3.3.5;4.3.3.6,60|1.2.3.4
Status Code | Description |
200 OK | If the API is called correctly, a 200 status code will be returned regardless of whether the query is successful. |
404 Not Found | The API does not exist, or the URL actually accesses a resource that does not exist. |
429 Too Many Requests | The access requests are too frequent and exceed the limit. |
501 Not Implemented | A request method other than "GET" or "POST" is used. |