Querying an IP-Domain Mapping
Function
This API is used to query information about the IP-domain mapping in a specified cluster.
The following parameters are involved in this API: query_string, cursor, next, limit, and order.
| Parameter | Description |
|---|---|
| query_string | IP address or domain name to be queried. Fuzzy match is supported. |
| cursor | Domain name ID. |
| next | Whether to switch to the next page. |
| limit | Number of returned data records. |
| order | Sorting style of the query results. Query results can be sorted in ascending or descending (default) order. |
URI
- URI format
GET /v1.0/{project_id}/reserved_cluster/{cluster_id}/hosts
- Parameter description
Table 2 URI parameter description Parameter
Mandatory
Description
project_id
Yes
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.
cluster_id
Yes
Cluster ID.
Request
None
Response
- Example response
{ "message_id": "CS.22017", "message": "Querying of the host list succeeds.", "payload": { "hosts_info": [{ "id": 3, "info": { "hostname": "test.cs.com", "ip": "10.113.27.139" } }], "total":1 }, "current_time": 1533686888000 } - Parameter description
Table 3 Response parameters Parameter
Mandatory
Type
Description
message_id
No
String
Message type ID.
message
No
String
Message content.
current_time
No
Int
Current time, expressed by milliseconds.
payload
No
None
Information about the IP-domain mapping of the cluster.
hosts_info
No
None
Details about the IP-domain mapping of the cluster.
id
No
Long
Domain name ID.
info
No
None
Information about the IP-domain mapping.
hostname
No
String
Domain name.
ip
No
String
IP address.
total
No
Int
Total number of IP-domain mappings.
Status Code
Table 4 describes the status code.
Error Code
For details, see Error Codes.
Last Article: Updating the IP-Domain Mapping
Next Article: Deleting an IP-Domain Mapping
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.