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 search will work. This parameter is left blank by default. |
region |
No |
String |
Region ID. When you query a public name server, leave this parameter blank. Exact search will work. This parameter is left blank by default. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition The user token. The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. For details about how to obtain a user token, seeObtaining a User Token. Constraints N/A Range N/A Default Value N/A |
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. The value can be public or private. If this parameter is left blank, all types of name servers will be queried. public indicates name servers of public zones. private indicates name servers of private zones. |
region |
String |
The region ID. When you query name servers of public zones, leave this parameter blank. |
ns_records |
Array of ns_records objects |
Name server list |
Parameter |
Type |
Description |
---|---|---|
hostname |
String |
The host name. When you query name servers of private zones, leave this parameter blank. |
address |
String |
The name server address. When you query name servers of public zones, leave this parameter blank. |
priority |
Integer |
The priority of the name server. Example: If the priority of a name server is set to 1, it is used to resolve domain names in the first priority. |
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.