Querying an IP Address for Domain Name Resolution
Function
This API is used to check the validity of a domain name.
URI
GET /v1/{project_id}/domain/parse/{domain_name}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. |
| domain_name | Yes | String | Domain name, for example, www.test.com. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to Obtaining an Enterprise Project ID. If the enterprise project function is not enabled, the value is 0. |
| fw_instance_id | No | String | Firewall ID, which can be obtained by referring to Obtaining a Firewall ID. |
| address_type | No | Integer | Internet protocol type of an address: 0 (IPv4), 1 (IPv6). |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. You can obtain the token by referring to Obtaining a User Token. |
| Content-Type | Yes | String | Content type. It can only be set to application/json. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| data | Array of strings | IP address list for domain name resolution. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Example Requests
Check whether the domain name ceshi.com of project 5c69cf330cda42369cbd726ee1bc5e76 is valid.
https://{Endpoint}/v1/5c69cf330cda42369cbd726ee1bc5e76/domain/parse/ceshi.com Example Responses
Status code: 200
Return value for querying domain name validity.
{
"data" : [ "192.168.88.85", "192.168.88.50", "192.168.88.22", "192.168.88.87", "192.168.88.86", "192.168.5.1", "192.168.88.88", "192.168.88.90", "192.168.88.83", "192.168.88.84" ]
} Status code: 400
Bad Request
{
"error_code" : "CFW.00109004",
"error_msg" : "HTTP request error."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Return value for querying domain name validity. |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot