doc-exports/docs/dns/api-ref/dns_api_63007.html
Qin Ying, Fan cf1007c84e DNS API 20240223 version
Reviewed-by: Hajba, László Antal <laszlo-antal.hajba@t-systems.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2024-05-16 13:48:49 +00:00

111 lines
8.2 KiB
HTML

<a name="dns_api_63007"></a><a name="dns_api_63007"></a>
<h1 class="topictitle1">Querying Name Servers in a Private Zone</h1>
<div id="body1492858849391"><div class="section" id="dns_api_63007__section55898385"><h4 class="sectiontitle">Function</h4><p id="dns_api_63007__p10983320">Query name servers in a private zone.</p>
</div>
<div class="section" id="dns_api_63007__section33323423"><h4 class="sectiontitle">URI</h4><p id="dns_api_63007__p474934217154">GET /v2/zones/{zone_id}/nameservers</p>
<div class="p" id="dns_api_63007__p92121459102">For details, see <a href="#dns_api_63007__table14024165">Table 1</a>.
<div class="tablenoborder"><a name="dns_api_63007__table14024165"></a><a name="table14024165"></a><table cellpadding="4" cellspacing="0" summary="" id="dns_api_63007__table14024165" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter in the URI</caption><thead align="left"><tr id="dns_api_63007__row26592044"><th align="left" class="cellrowborder" valign="top" width="19.03190319031903%" id="mcps1.3.2.3.2.2.5.1.1"><p id="dns_api_63007__p6471942"><strong id="dns_api_63007__b162774213314533_1">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.781978197819782%" id="mcps1.3.2.3.2.2.5.1.2"><p id="dns_api_63007__p54465313"><strong id="dns_api_63007__b593421527191713">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.651565156515652%" id="mcps1.3.2.3.2.2.5.1.3"><p id="dns_api_63007__p49614245"><strong id="dns_api_63007__b84235270619112_1">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.53455345534553%" id="mcps1.3.2.3.2.2.5.1.4"><p id="dns_api_63007__p59330872"><strong id="dns_api_63007__b842352706112423_1">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_63007__row41071365"><td class="cellrowborder" valign="top" width="19.03190319031903%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dns_api_63007__p38446258">zone_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.781978197819782%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dns_api_63007__p27139175">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.651565156515652%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dns_api_63007__p50789581">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.53455345534553%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dns_api_63007__p20315403">Zone ID</p>
<p id="dns_api_63007__p1669018482183">You can obtain the value by calling the API in <a href="dns_api_63006.html">Querying Private Zones</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="dns_api_63007__section31475357"><h4 class="sectiontitle">Request</h4><ul id="dns_api_63007__ul35351571269"><li id="dns_api_63007__li1053565782615">Request parameters<p id="dns_api_63007__p1815201642711"><a name="dns_api_63007__li1053565782615"></a><a name="li1053565782615"></a>None</p>
</li><li id="dns_api_63007__li4109190182715">Example request<p id="dns_api_63007__p1651121054613"><a name="dns_api_63007__li4109190182715"></a><a name="li4109190182715"></a>Query name servers of the zone whose ID is ff8080825b8fc86c015b94bc6f8712c3:</p>
<pre class="codeblock" id="dns_api_63007__codeblock14192132413502">GET https://{DNS_Endpoint}/v2/zones/ff8080825b8fc86c015b94bc6f8712c3/nameservers</pre>
</li></ul>
</div>
<div class="section" id="dns_api_63007__section14842765"><h4 class="sectiontitle">Response</h4><ul id="dns_api_63007__ul8135151"><li id="dns_api_63007__li6107499">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dns_api_63007__table2534644119347" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter in the response</caption><thead align="left"><tr id="dns_api_63007__row2134485619347"><th align="left" class="cellrowborder" valign="top" width="18.47%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="dns_api_63007__p5121175619347"><strong id="dns_api_63007__b162774213314533_3">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.33%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="dns_api_63007__p5451156519347"><strong id="dns_api_63007__b84235270619112_3">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.2%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="dns_api_63007__p5336061019347"><strong id="dns_api_63007__b842352706112423_3">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_63007__row2724213119347"><td class="cellrowborder" valign="top" width="18.47%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="dns_api_63007__p5912903419347">nameservers</p>
</td>
<td class="cellrowborder" valign="top" width="19.33%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="dns_api_63007__p2472241219347">Array of object</p>
</td>
<td class="cellrowborder" valign="top" width="62.2%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="dns_api_63007__p64387025171923">Name server list object</p>
<p id="dns_api_63007__p60737358161124">For details, see <a href="#dns_api_63007__table3847447219326">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dns_api_63007__table3847447219326"></a><a name="table3847447219326"></a><table cellpadding="4" cellspacing="0" summary="" id="dns_api_63007__table3847447219326" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Description of the <strong id="dns_api_63007__b842352706152641">nameservers</strong> field</caption><thead align="left"><tr id="dns_api_63007__row3833649519326"><th align="left" class="cellrowborder" valign="top" width="18.47%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="dns_api_63007__p3493722219342"><strong id="dns_api_63007__b162774213314533_5">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.33%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="dns_api_63007__p1134272819342"><strong id="dns_api_63007__b84235270619112_5">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.2%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="dns_api_63007__p4634576219342"><strong id="dns_api_63007__b842352706112423_5">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_63007__row3753895719326"><td class="cellrowborder" valign="top" width="18.47%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dns_api_63007__p4303156518517">address</p>
</td>
<td class="cellrowborder" valign="top" width="19.33%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dns_api_63007__p6300470318517">String</p>
</td>
<td class="cellrowborder" valign="top" width="62.2%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dns_api_63007__p310733418517">IP address of a DNS server</p>
</td>
</tr>
<tr id="dns_api_63007__row4963379019326"><td class="cellrowborder" valign="top" width="18.47%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dns_api_63007__p54724792195629">priority</p>
</td>
<td class="cellrowborder" valign="top" width="19.33%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dns_api_63007__p3523206195629">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="62.2%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dns_api_63007__p16944280195629">Priority of a name server</p>
<p id="dns_api_63007__p63758461163042">For example, if the priority of a name server is <strong id="dns_api_63007__b842352706104533">1</strong>, it is used to resolve domain names in first priority.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="dns_api_63007__ul2026335"><li id="dns_api_63007__li18237015">Example response<pre class="screen" id="dns_api_63007__screen6709033920539">{
"nameservers": [
{
"priority": 1,
"address": "100.125.0.81"
},
{
"priority": 2,
"address": "100.125.0.82"
}
]
}
</pre>
</li></ul>
</div>
<div class="section" id="dns_api_63007__section9249181042119"><h4 class="sectiontitle">Returned Value</h4><p id="dns_api_63007__dns_api_61001_p711102924515">If a 2xx status code is returned, for example, 200, 202, or 204, the request is successful.</p>
<p id="dns_api_63007__dns_api_61001_p18506102624518">For details, see <a href="dns_api_80002.html">Status Code</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dns_api_63000.html">Private Zone Management</a></div>
</div>
</div>