Querying Name Servers in a Public Zone¶
Function¶
Query name servers in a public zone.
URI¶
GET /v2/zones/{zone_id}/nameservers
For details, see Table 1.
Parameter | Mandatory | Type | Description |
---|---|---|---|
zone_id | Yes | String | Zone ID You can obtain the value by calling the API in Querying Public Zones. |
Request¶
Request parameters
None
Example request
Query name servers of the zone whose ID is 2c9eb155587194ec01587224c9f90149:
GET https://{DNS_Endpoint}/v2/zones/2c9eb155587194ec01587224c9f90149/nameservers
Response¶
Parameter description
¶ Parameter
Type
Description
hostname
String
Host name of a name server
priority
Integer
Priority of a name server
For example, if the priority of a name server is 1, it is used to resolve domain names in first priority.
Example response
{ "nameservers": [ { "hostname": "ns1.example.com.", "priority": 1 }, { "hostname": "ns2.example.com.", "priority": 2 } ] }
Returned Value¶
If a 2xx status code is returned, for example, 200, 202, or 204, the request is successful.
For details, see Status Code.