Querying Name Servers
Function
This API is used to query name servers.
Calling Method
For details, see Calling APIs.
URI
GET /v2/nameservers
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
No |
String |
Type of the name server. Value options:
Exact matching will work. It is left blank by default. |
region |
No |
String |
Region ID. When you query a public name server, leave this parameter blank. Exact matching will work. It is left blank by default. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
nameservers |
Array of NameServersResp objects |
Name server list |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Type of the name server.Value options: - public indicates a public name server.- private indicates a private name server. |
region |
String |
Region ID. When you query a public name server, leave this parameter blank. |
ns_records |
Array of ns_records objects |
Name server list |
Parameter |
Type |
Description |
---|---|---|
hostname |
String |
Host name. This parameter is left blank when a private name server is used. |
address |
String |
Address of the name server. When the server is a public name server, this parameter is left blank. |
priority |
Integer |
Priority. If the value of priority is 1, the DNS server is the first one to resolve domain names. |
Example Requests
None
Example Responses
Status code: 200
Response to the request for querying the name server list
{ "nameservers" : [ { "region" : null, "type" : "public", "ns_records" : [ { "hostname" : "ns1.huawei.com.", "priority" : 1 }, { "hostname" : "ns2.huawei.com.", "priority" : 2 } ] }, { "region" : "xxx", "type" : "private", "ns_records" : [ { "priority" : 1, "address" : "100.125.1.0" }, { "priority" : 2, "address" : "100.125.1.1" } ] } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Response to the request for querying the name server list |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.