forked from docs/doc-exports
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>
188 lines
15 KiB
HTML
188 lines
15 KiB
HTML
<a name="waf_02_0036"></a><a name="waf_02_0036"></a>
|
|
|
|
<h1 class="topictitle1">Querying Blacklist and Whitelist Rules</h1>
|
|
<div id="body11702967"><div class="section" id="waf_02_0036__section32792555"><h4 class="sectiontitle">Function Description</h4><p class="msonormal" id="waf_02_0036__p8416265">This API is used to query all blacklist and whitelist rules.</p>
|
|
</div>
|
|
<div class="section" id="waf_02_0036__section26697540"><h4 class="sectiontitle">URI</h4><ul id="waf_02_0036__ul10628851"><li id="waf_02_0036__li28550801">URI format<p id="waf_02_0036__p55630622"><a name="waf_02_0036__li28550801"></a><a name="li28550801"></a>GET /v1/{project_id}/waf/policy/{policy_id}/whiteblackip?offset={offset}&limit={limit}</p>
|
|
</li><li id="waf_02_0036__li30913555">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0036__table9786546" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="waf_02_0036__row45293161"><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_0036__p44867418"><strong id="waf_02_0036__b10123171355118">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="waf_02_0036__p10382207"><strong id="waf_02_0036__b78891413115115">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="waf_02_0036__p35652416"><strong id="waf_02_0036__b1382771412515">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_0036__p2164615"><strong id="waf_02_0036__b135811516512">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0036__row41116089"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0036__p42068928">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0036__p52140036">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0036__p62593388">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_0036__p36899681">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0036__row63661675"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0036__p56322078">policy_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0036__p65794449">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0036__p27750124">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_0036__p33167576">Specifies the policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0036__row30072732"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0036__p19972195">offset</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0036__p7135119">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0036__p41073800">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_0036__p21617533">Specifies the number of returned pages. Its value ranges from <strong id="waf_02_0036__b19630114363320">0</strong> to <strong id="waf_02_0036__b863834393319">65535</strong>. The default value is <strong id="waf_02_0036__b563815436331">0</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0036__row12247267"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0036__p52504570">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0036__p25011769">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0036__p12687433">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_0036__p25357967">Specifies the maximum number of records displayed on each page. Its value ranges from <strong id="waf_02_0036__b1752010453331">0</strong> to <strong id="waf_02_0036__b1528124514337">50</strong>. The default value is <strong id="waf_02_0036__b352854533316">10</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="waf_02_0036__section38951274"><h4 class="sectiontitle">Request</h4><p id="waf_02_0036__p2355343437">Request parameters</p>
|
|
<p class="msonormal" id="waf_02_0036__p27261179">None</p>
|
|
</div>
|
|
<div class="section" id="waf_02_0036__section15017149"><h4 class="sectiontitle">Response</h4><div class="p" id="waf_02_0036__p13110174504313">Response parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0036__table15472974" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0036__row56736167"><th align="left" class="cellrowborder" valign="top" width="42.85571442855714%" id="mcps1.3.4.2.1.2.4.1.1"><p id="waf_02_0036__p32226778"><strong id="waf_02_0036__b369075835211">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.4.2.1.2.4.1.2"><p id="waf_02_0036__p60232263"><strong id="waf_02_0036__b86271959175219">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.796020397960206%" id="mcps1.3.4.2.1.2.4.1.3"><p id="waf_02_0036__p46975124"><strong id="waf_02_0036__b18181503532">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0036__row20122934"><td class="cellrowborder" valign="top" width="42.85571442855714%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0036__p19344951">total</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0036__p23437164">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0036__p19362109">Specifies the total number of rules.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0036__row40041260"><td class="cellrowborder" valign="top" width="42.85571442855714%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0036__p22116660">items</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0036__p46619020"><a href="#waf_02_0036__table16394183011019">Table 3</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0036__p1603648">Specifies the blacklist or whitelist rule objects.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="waf_02_0036__table16394183011019"></a><a name="table16394183011019"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0036__table16394183011019" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="waf_02_0036__b199071589247">items</strong></caption><thead align="left"><tr id="waf_02_0036__row939613301015"><th align="left" class="cellrowborder" valign="top" width="33.08669133086692%" id="mcps1.3.4.3.2.4.1.1"><p id="waf_02_0036__p039873016013"><strong id="waf_02_0036__b83195249445">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="26.577342265773424%" id="mcps1.3.4.3.2.4.1.2"><p id="waf_02_0036__p183997301406"><strong id="waf_02_0036__b792064611">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40.33596640335966%" id="mcps1.3.4.3.2.4.1.3"><p id="waf_02_0036__p839973013010"><strong id="waf_02_0036__b4305123014416">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0036__row6254134620148"><td class="cellrowborder" valign="top" width="33.08669133086692%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0036__p15927154410145">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.577342265773424%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0036__p18929194417149">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.33596640335966%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0036__p8930944171414">Specifies the ID of a blacklist or whitelist rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0036__row9253144691412"><td class="cellrowborder" valign="top" width="33.08669133086692%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0036__p1493184451410">policy_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.577342265773424%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0036__p17933114491410">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.33596640335966%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0036__p15934444201410">Specifies the ID of the policy to which the rule belongs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0036__row325324620149"><td class="cellrowborder" valign="top" width="33.08669133086692%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0036__p189361444161416">addr</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.577342265773424%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0036__p6937144111419">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.33596640335966%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0036__p169381144191419">Specifies the public IP address or range (IP address and subnet mask). For example, <em id="waf_02_0036__i155853570228">X.X.</em><strong id="waf_02_0036__b13507156132214">0.125</strong> or <em id="waf_02_0036__i58821941239">X.X.</em><strong id="waf_02_0036__b13210109182310">6.0/24</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0036__row8253104617149"><td class="cellrowborder" valign="top" width="33.08669133086692%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0036__p139407442141">white</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.577342265773424%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0036__p1494224410148">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.33596640335966%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0036__p131673177539">Specifies the IP address type.</p>
|
|
<ul id="waf_02_0036__ul3374102111535"><li id="waf_02_0036__li1039914614531"><strong id="waf_02_0036__b484418521202">1</strong>: <strong id="waf_02_0036__b1844135213206">Whitelist</strong></li><li id="waf_02_0036__li113741219533"><strong id="waf_02_0036__b432165415203">0</strong>: <strong id="waf_02_0036__b632110546209">Blacklist</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0036__row2025284612149"><td class="cellrowborder" valign="top" width="33.08669133086692%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0036__p17943164411414">timestamp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.577342265773424%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0036__p169441144111414">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.33596640335966%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0036__p199461944101413">Specifies the time when a blacklist or whitelist rule is added.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="waf_02_0036__section1014014529435"><h4 class="sectiontitle">Example</h4><p id="waf_02_0036__p131114469537"><strong id="waf_02_0036__b1712311514451">total</strong> with a value of <strong id="waf_02_0036__b141241655453">2</strong> is used as an example.</p>
|
|
<div class="p" id="waf_02_0036__p2097713194413">Response example<pre class="screen" id="waf_02_0036__screen1915819528435">{
|
|
"total": 2,
|
|
"items": [{
|
|
"id": "3a9b5c0f96784ec8abd8ba61a98064ef",
|
|
"policy_id": "ertr45c0f96784ec8abd8ba61a98064ef",
|
|
"addr": "X.X.0.125",
|
|
"white": 1,
|
|
"timestamp": 1499817600
|
|
}, {
|
|
"id": "44d887434169475794b2717438f7fa78",
|
|
"policy_id": "ertr45c0f96784ec8abd8ba61a98064ef",
|
|
"addr": "X.X.0.125",
|
|
"white": 0,
|
|
"timestamp": 1499817601
|
|
}
|
|
]
|
|
}
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="waf_02_0036__section936614"><h4 class="sectiontitle">Status Code</h4><div class="p" id="waf_02_0036__waf_02_0012_a652d4922b7df48fca0a65bc1a38ea5f2"><a href="#waf_02_0036__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0">Table 4</a> describes the normal status code returned by the API.
|
|
<div class="tablenoborder"><a name="waf_02_0036__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><a name="waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0036__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_0036__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_0036__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_0036__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_0036__waf_02_0012_ada185614bba24140995b8123b3e9faa8">Meaning</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0036__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_0036__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_0036__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_0036__waf_02_0012_en-us_topic_0144911667_p369874114414">The request has succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="waf_02_0036__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_0035.html">Blacklist and Whitelist Rules</a></div>
|
|
</div>
|
|
</div>
|
|
|