doc-exports/docs/waf/api-ref/waf_02_0012.html
Li, Qiao 914011d51b waf_api_1109
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Li, Qiao <qiaoli@huawei.com>
Co-committed-by: Li, Qiao <qiaoli@huawei.com>
2022-11-16 15:31:27 +00:00

245 lines
19 KiB
HTML

<a name="waf_02_0012"></a><a name="waf_02_0012"></a>
<h1 class="topictitle1">Querying the List of Domain Names</h1>
<div id="body13716777"><div class="section" id="waf_02_0012__section60785565"><h4 class="sectiontitle">Function Description</h4><p class="msonormal" id="waf_02_0012__p37317134">This API is used to query the list of domain names.</p>
</div>
<div class="section" id="waf_02_0012__section10199180"><h4 class="sectiontitle">URI</h4><ul id="waf_02_0012__ul2789028"><li id="waf_02_0012__li25101257">URI format<p id="waf_02_0012__p24584722"><a name="waf_02_0012__li25101257"></a><a name="li25101257"></a>GET /v1/{project_id}/waf/instance?offset={offset}&amp;limit={limit}&amp;hostname={hostname}&amp;policyname={policyname}</p>
</li><li id="waf_02_0012__li45205505">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0012__table4196369" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="waf_02_0012__row49735522"><th align="left" class="cellrowborder" valign="top" width="25.507449255074494%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="waf_02_0012__p2045483"><strong id="waf_02_0012__b5335940165013">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.77852214778522%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="waf_02_0012__p31466469"><strong id="waf_02_0012__b1397574125013">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.918008199180083%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="waf_02_0012__p65756088"><strong id="waf_02_0012__b9819114475017">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="39.796020397960206%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="waf_02_0012__p24642891"><strong id="waf_02_0012__b93061509508">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0012__row49917126"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0012__p16755410">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.77852214778522%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0012__p15010966">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.918008199180083%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0012__p7928763">String</p>
</td>
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="waf_02_0012__p38250089">Specifies the project ID.</p>
</td>
</tr>
<tr id="waf_02_0012__row8706482"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0012__p16851416219">offset</p>
</td>
<td class="cellrowborder" valign="top" width="14.77852214778522%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0012__p13588841">No</p>
</td>
<td class="cellrowborder" valign="top" width="19.918008199180083%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0012__p26954327">Long</p>
</td>
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="waf_02_0012__p21617533">Specifies the number of returned pages. Its value ranges from <strong id="waf_02_0012__b2584046145217">0</strong> to <strong id="waf_02_0012__b195841146155214">65535</strong>. The default value is <strong id="waf_02_0012__b158412465528">0</strong>.</p>
</td>
</tr>
<tr id="waf_02_0012__row53916483"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0012__p5159020">limit</p>
</td>
<td class="cellrowborder" valign="top" width="14.77852214778522%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0012__p15227445">No</p>
</td>
<td class="cellrowborder" valign="top" width="19.918008199180083%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0012__p25463494">Long</p>
</td>
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="waf_02_0012__p25357967">Specifies the maximum number of records displayed on each page. Its value ranges from <strong id="waf_02_0012__b153401042123216">0</strong> to <strong id="waf_02_0012__b163495425326">50</strong>. The default value is <strong id="waf_02_0012__b15349134253217">10</strong>. If <strong id="waf_02_0012__b1768216012454">limit</strong> is <strong id="waf_02_0012__b1868290194520">-1</strong>, one page with 65535 records is displayed.</p>
</td>
</tr>
<tr id="waf_02_0012__row40840970"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0012__p19784312">hostname</p>
</td>
<td class="cellrowborder" valign="top" width="14.77852214778522%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0012__p59025450">No</p>
</td>
<td class="cellrowborder" valign="top" width="19.918008199180083%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0012__p16332169">String</p>
</td>
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="waf_02_0012__p47837308">Specifies the domain name.</p>
</td>
</tr>
<tr id="waf_02_0012__row27882593"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0012__p43897550">policyname</p>
</td>
<td class="cellrowborder" valign="top" width="14.77852214778522%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0012__p66040643">No</p>
</td>
<td class="cellrowborder" valign="top" width="19.918008199180083%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0012__p47691881">String</p>
</td>
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="waf_02_0012__p37837159">Specifies the policy name.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="waf_02_0012__section24683756"><h4 class="sectiontitle">Request</h4><p id="waf_02_0012__p13106143152310">Request parameters</p>
<p class="msonormal" id="waf_02_0012__p44911078">None</p>
</div>
<div class="section" id="waf_02_0012__section20827215"><h4 class="sectiontitle">Response</h4><div class="p" id="waf_02_0012__p18589162692910">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0012__table53675654" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0012__row15396832"><th align="left" class="cellrowborder" valign="top" width="24.490000000000002%" id="mcps1.3.4.2.1.2.4.1.1"><p id="waf_02_0012__p39183914"><strong id="waf_02_0012__b8187243135212">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.4.2.1.2.4.1.2"><p id="waf_02_0012__p19780493"><strong id="waf_02_0012__b2398114455216">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="58.160000000000004%" id="mcps1.3.4.2.1.2.4.1.3"><p id="waf_02_0012__p58716080"><strong id="waf_02_0012__b10233134514526">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0012__row58682673"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0012__p55676055">total</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0012__p13466643">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0012__p17056266">Specifies the total number of domain names.</p>
</td>
</tr>
<tr id="waf_02_0012__row19288672"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0012__p18878622">items</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0012__p52773388"><a href="#waf_02_0012__table1272813819259">Table 3</a></p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0012__p46786002">Specifies the domain objects.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><a name="waf_02_0012__table1272813819259"></a><a name="table1272813819259"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0012__table1272813819259" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="waf_02_0012__b2269164913389">items</strong></caption><thead align="left"><tr id="waf_02_0012__row14733082258"><th align="left" class="cellrowborder" valign="top" width="25.247475252474754%" id="mcps1.3.4.3.2.4.1.1"><p id="waf_02_0012__p873817812512"><strong id="waf_02_0012__b178810741311">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.797420257974203%" id="mcps1.3.4.3.2.4.1.2"><p id="waf_02_0012__p137404817256"><strong id="waf_02_0012__b1437977387">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.95510448955104%" id="mcps1.3.4.3.2.4.1.3"><p id="waf_02_0012__p6742198152512"><strong id="waf_02_0012__b0452310191317">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0012__row1426410531637"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p1369552737">id</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p0711152337">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p2751752432">Specifies the domain ID.</p>
</td>
</tr>
<tr id="waf_02_0012__row8264105312312"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p147919521435">hostname</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p7815521638">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p38415210312">Specifies the returned domain name.</p>
</td>
</tr>
<tr id="waf_02_0012__row3264115315318"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p1796052839">cname</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p0999524315">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p510119526315">Specifies the CNAME value.</p>
<p id="waf_02_0012__p91023521538">For example, <strong id="waf_02_0012__b3437134725611">efec1196267b41c399f2980ea4048517.waf.cloud.com</strong>.</p>
</td>
</tr>
<tr id="waf_02_0012__row52643531035"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p31074525318">txt_code</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p1410914520313">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p111112529312">Specifies the TXT record. This parameter is returned only when <strong id="waf_02_0012__b3466131411515">proxy</strong> is set to <strong id="waf_02_0012__b746681491519">true</strong>.</p>
</td>
</tr>
<tr id="waf_02_0012__row62649531339"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p1111825213310">sub_domain</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p161201552938">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p16122145214312">Specifies the subdomain name. This parameter is returned only when <strong id="waf_02_0012__b837213240155">proxy</strong> is set to <strong id="waf_02_0012__b7372102421512">true</strong>.</p>
</td>
</tr>
<tr id="waf_02_0012__row226214539310"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p2012895215320">policy_id</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p13130752838">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p513210521431">Specifies the policy ID.</p>
</td>
</tr>
<tr id="waf_02_0012__row626216532033"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p413555219313">protect_status</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p81381552331">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p114014521439">Specifies the WAF mode.</p>
<ul id="waf_02_0012__ul121411752134"><li id="waf_02_0012__li12953202113019"><span class="parmvalue" id="waf_02_0012__parmvalue6295174817531"><b>-1</b></span>: bypassed.</li><li id="waf_02_0012__li2142185211320"><strong id="waf_02_0012__b1439174121611">0</strong>: disabled.</li><li id="waf_02_0012__li7145652833"><strong id="waf_02_0012__b86264128168">1</strong>: enabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0012__row15262105318311"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p14150452034">access_status</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p01506521136">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p171523521737">Specifies whether a domain name is connected to WAF.</p>
<ul id="waf_02_0012__ul111531252836"><li id="waf_02_0012__li7154155217316"><strong id="waf_02_0012__b7397116062">0</strong>: The domain name is not connected to WAF.</li><li id="waf_02_0012__li815615210315"><strong id="waf_02_0012__b1181119914610">1</strong>: The domain name is connected to WAF.</li></ul>
</td>
</tr>
<tr id="waf_02_0012__row726215531833"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p1021910521839">proxy</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p16221155210314">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p4222185216320">Specifies whether a proxy is configured.</p>
<ul id="waf_02_0012__ul1222313528312"><li id="waf_02_0012__li22256521633"><strong id="waf_02_0012__b41261645151720">true</strong>: A proxy is configured.</li><li id="waf_02_0012__li922719523317"><strong id="waf_02_0012__b181681101818">false</strong>: No proxy is configured.</li></ul>
</td>
</tr>
<tr id="waf_02_0012__row6262353438"><td class="cellrowborder" valign="top" width="25.247475252474754%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0012__p1423216523317">timestamp</p>
</td>
<td class="cellrowborder" valign="top" width="25.797420257974203%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0012__p123411522313">Long</p>
</td>
<td class="cellrowborder" valign="top" width="48.95510448955104%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0012__p17235165213314">Specifies the time when a domain name is created.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="waf_02_0012__section1677820363290"><h4 class="sectiontitle">Example</h4><p id="waf_02_0012__p2203822111314"><strong id="waf_02_0012__b53671046959">total</strong> with a value of <strong id="waf_02_0012__b183671246550">2</strong> is used as an example.</p>
<div class="p" id="waf_02_0012__p1099411439299">Response example<pre class="screen" id="waf_02_0012__screen18801153611298">{
"total": 2,
"items": [
{
"id": "388a7789d55b41d1918b3088a8f1e7f3",
"hostname": "www.a.com",
"cname": "3249d21e5eb34d21be12fdc817fcb67d.waf.cloud.com",
"txt_code": "3249d21e5eb34d21be12fdc817fcb67d",
"sub_domain": "3249d21e5eb34d21be12fdc817fcb67d.www.a.com",
"policy_id": "xxxxxxxxxxxxxx",
"protect_status": 0,
"access_status": 0,
"proxy": true,
"timestamp": 1499817600
},
{
"id": "296a7710d55b41d1918b3036a8f1e7e5",
"hostname": "www.b.com",
"cname": "efec1196267b41c399f2980ea4048517.waf.cloud.com",
"policy_id": "xxxxxxxxxxxxxx",
"protect_status": 1,
"access_status": 1,
"proxy": false,
"timestamp": 1499817612
}
]
}
</pre>
</div>
</div>
<div class="section" id="waf_02_0012__section53227215"><h4 class="sectiontitle">Status Code</h4><div class="p" id="waf_02_0012__a652d4922b7df48fca0a65bc1a38ea5f2"><a href="#waf_02_0012__t82c3440f3efb42a38b9d4dc4011a33d0">Table 4</a> describes the normal status code returned by the API.
<div class="tablenoborder"><a name="waf_02_0012__t82c3440f3efb42a38b9d4dc4011a33d0"></a><a name="t82c3440f3efb42a38b9d4dc4011a33d0"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0012__t82c3440f3efb42a38b9d4dc4011a33d0" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status code</caption><thead align="left"><tr id="waf_02_0012__r3d6e2f205c444705bdbb9daaac74e575"><th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.6.2.2.2.4.1.1"><p id="waf_02_0012__af3c4073076f24eca88d94e3fa1effdc6">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.41%" id="mcps1.3.6.2.2.2.4.1.2"><p id="waf_02_0012__en-us_topic_0144911667_p4531342288">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="58.589999999999996%" id="mcps1.3.6.2.2.2.4.1.3"><p id="waf_02_0012__ada185614bba24140995b8123b3e9faa8">Meaning</p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0012__rc7b2adc390904a1ba79e303017797786"><td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.6.2.2.2.4.1.1 "><p id="waf_02_0012__a93f3895d44bb4226934cc626ac50e37b">200</p>
</td>
<td class="cellrowborder" valign="top" width="19.41%" headers="mcps1.3.6.2.2.2.4.1.2 "><p id="waf_02_0012__en-us_topic_0144911667_p7538425819">OK</p>
</td>
<td class="cellrowborder" valign="top" width="58.589999999999996%" headers="mcps1.3.6.2.2.2.4.1.3 "><p id="waf_02_0012__en-us_topic_0144911667_p369874114414">The request has succeeded.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="waf_02_0012__en-us_topic_0144911667_p482819399522">For details about error status codes, see <a href="waf_02_0085.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="waf_02_0011.html">Domain Names</a></div>
</div>
</div>