This interface is used to query the domain names that are using the IP address. The user enters the IP address to obtain the list of domain names associated with the IP. The information returned by the interface includes the current usage status of the IP and the list of domain names that use the IP. In actual applications, this interface can help users detect the domain name usage of a specific IP, which is suitable for network monitoring and management.
| パラメータ名 | 説明 |
|---|---|
*ipList | IP |
| パラメータ名 | 説明 |
|---|---|
codeString | request result status code |
messageString | Request result information |
dataList | Detailed data on the results of the request |
ipString | ip |
statusString | Whether to use: idle --IP not used yet; runing -- IP in use; out of range -- IP is not in a queryable range |
domainListList | List of domain using this IP.The domain list of the IP that was idle or out of range was empty |
| エラーコード(code) | 説明(message) | HTTPステータスコード | 意味 |
|---|---|---|---|
| INVALID_HTTP_REQUEST | There was an error in the body of your HTTP request. | 400 | There was an error in the body of your HTTP request. |
| SYSTEM_ERROR | We encountered an system error. Please try again. | 500 | We encountered an system error. Please try again. |
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/api/tools/ip/domain-list" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
"ip": ["1.1.1.1","2.2.2.2"]
}'{
"code": "0",
"message": "success",
"data": [
{
"ip": "1.1.1.1",
"status": "idle"
},
{
"ip": "2.2.2.2",
"status": "running",
"domainList": [
"a.net",
"b.net",
"c.net",
"d.com"
]
}
]
}