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>
316 lines
26 KiB
HTML
316 lines
26 KiB
HTML
<a name="waf_02_0048"></a><a name="waf_02_0048"></a>
|
|
|
|
<h1 class="topictitle1">Querying Precise Protection Rules</h1>
|
|
<div id="body57734509"><div class="section" id="waf_02_0048__section25506372"><h4 class="sectiontitle">Function Description</h4><p class="msonormal" id="waf_02_0048__p45983684">This API is used to query all precise protection rules in a policy.</p>
|
|
</div>
|
|
<div class="section" id="waf_02_0048__section28230758"><h4 class="sectiontitle">URI</h4><ul id="waf_02_0048__ul33690886"><li id="waf_02_0048__li34782524">URI format<p id="waf_02_0048__p44607261"><a name="waf_02_0048__li34782524"></a><a name="li34782524"></a>GET /v1/{project_id}/waf/policy/{policy_id}/custom?offset={offset}&limit={limit}</p>
|
|
</li><li id="waf_02_0048__li65921036">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0048__table56418417" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="waf_02_0048__row48333475"><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_0048__p22697382"><strong id="waf_02_0048__b84235270616223">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_0048__p26548625"><strong id="waf_02_0048__b7811258121310">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_0048__p2955021"><strong id="waf_02_0048__b48520201417">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_0048__p38030145"><strong id="waf_02_0048__b77904482571">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0048__row60542934"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0048__p5030644">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_0048__p4828994">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_0048__p55604200">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_0048__p7646351">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row1708298"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0048__p4154453">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_0048__p966388">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_0048__p11168592">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_0048__p32240720">Specifies the policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row21731025"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0048__p15382595">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_0048__p38030669">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_0048__p60585368">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_0048__p21617533">Specifies the number of returned pages. Its value ranges from <strong id="waf_02_0048__b14761918203419">0</strong> to <strong id="waf_02_0048__b07661813419">65535</strong>. The default value is <strong id="waf_02_0048__b476151811346">0</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row9101228"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0048__p16861445171214">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_0048__p53379695">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_0048__p28788019">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_0048__p25357967">Specifies the maximum number of records displayed on each page. Its value ranges from <strong id="waf_02_0048__b877941915344">0</strong> to <strong id="waf_02_0048__b57797196346">50</strong>. The default value is <strong id="waf_02_0048__b2779111913349">10</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="waf_02_0048__section52750233"><h4 class="sectiontitle">Request</h4><p id="waf_02_0048__p512181255215">Request parameters</p>
|
|
<p class="msonormal" id="waf_02_0048__p33852041">None</p>
|
|
</div>
|
|
<div class="section" id="waf_02_0048__section4990055"><h4 class="sectiontitle">Response</h4><div class="p" id="waf_02_0048__p1541172212525">Response parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0048__table40011473" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0048__row25246382"><th align="left" class="cellrowborder" valign="top" width="31.716828317168282%" id="mcps1.3.4.2.1.2.4.1.1"><p id="waf_02_0048__p31691062"><strong id="waf_02_0048__b1311836676">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.48715128487151%" id="mcps1.3.4.2.1.2.4.1.2"><p id="waf_02_0048__p16839243"><strong id="waf_02_0048__b527702053">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_0048__p21801428"><strong id="waf_02_0048__b106721609814">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0048__row61995128"><td class="cellrowborder" valign="top" width="31.716828317168282%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0048__p55549451">total</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.48715128487151%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0048__p3211654">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_0048__p58817426">Specifies the total number of precise protection rules in a policy.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row59594790"><td class="cellrowborder" valign="top" width="31.716828317168282%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0048__p62448653">items</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.48715128487151%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0048__p25176153"><a href="#waf_02_0048__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_0048__p460610183342">Specifies the precise protection rule objects.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="waf_02_0048__table16394183011019"></a><a name="table16394183011019"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0048__table16394183011019" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="waf_02_0048__b48272039112719">items</strong></caption><thead align="left"><tr id="waf_02_0048__row939613301015"><th align="left" class="cellrowborder" valign="top" width="32.10678932106789%" id="mcps1.3.4.3.2.4.1.1"><p id="waf_02_0048__p039873016013"><strong id="waf_02_0048__b3190817104913">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.077192280771925%" id="mcps1.3.4.3.2.4.1.2"><p id="waf_02_0048__p183997301406"><strong id="waf_02_0048__b485480205">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.81601839816019%" id="mcps1.3.4.3.2.4.1.3"><p id="waf_02_0048__p839973013010"><strong id="waf_02_0048__b31351819144920">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0048__row3339122013205"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p12178171962012">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p15179151917207">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p8182191922017">Specifies the ID of a precise protection rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row333932072017"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p1118414196209">policy_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p10186101915204">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p10189419102012">Specifies the policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row033712020207"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p1119011197203">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p1019361992020">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p719431917209">Specifies the rule name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row13337182016202"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p18196101962013">conditions</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p119921992020"><a href="#waf_02_0048__table8999745192019">Table 4</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p1220171902013">Specifies the condition parameters. If there are multiple conditions, the conditions must be met at the same time.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row833511201202"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p0235419162012">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p20237919182015"><a href="#waf_02_0048__table10607112511329">Table 5</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p132401219102013">Specifies the protective action after the precise protection rule is matched.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row183331720132014"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p18257131942020">time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p4259181962019">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p126191914204">Specifies the effect time of the precise protection rule.</p>
|
|
<ul id="waf_02_0048__ul52563885311"><li id="waf_02_0048__li1525183805313"><span class="parmvalue" id="waf_02_0048__parmvalue156102348544"><b>false</b></span>: The rule takes effect immediately.</li><li id="waf_02_0048__li179493215549"><span class="parmvalue" id="waf_02_0048__parmvalue166311294112"><b>true</b></span>: The rule takes effect at the scheduled time.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row10333192022014"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p10263101910202">start</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p326581912203">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p326741952016">Specifies the time when the precise protection rule takes effect. This parameter is returned only when <strong id="waf_02_0048__b3373854154410">time</strong> is <strong id="waf_02_0048__b1976115117445">true</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row833216201209"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p19271131911205">end</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p1727411190203">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p15276919192012">Specifies the time when the precise protection rule expires. This parameter is returned only when <strong id="waf_02_0048__b1848913513454">time</strong> is <strong id="waf_02_0048__b3646181216454">true</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row9332820112017"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p4278201912015">priority</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p1228061972020">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p5282171915206">Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority. The value ranges from <strong id="waf_02_0048__b13239114610197">0</strong> to <strong id="waf_02_0048__b5340155031918">65535</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row123328208209"><td class="cellrowborder" valign="top" width="32.10678932106789%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0048__p02879196207">timestamp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.077192280771925%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0048__p8288131922016">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.81601839816019%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0048__p162921619162012">Specifies the time when a precise protection rule is added.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="waf_02_0048__table8999745192019"></a><a name="table8999745192019"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0048__table8999745192019" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="waf_02_0048__b58902160557">conditions</strong></caption><thead align="left"><tr id="waf_02_0048__row187946192018"><th align="left" class="cellrowborder" valign="top" width="33.086691330866906%" id="mcps1.3.4.4.2.4.1.1"><p id="waf_02_0048__p1810114618208"><strong id="waf_02_0048__b1673845245220">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="27.117288271172878%" id="mcps1.3.4.4.2.4.1.2"><p id="waf_02_0048__p15129469208"><strong id="waf_02_0048__b935830591">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.7960203979602%" id="mcps1.3.4.4.2.4.1.3"><p id="waf_02_0048__p1151846112017"><strong id="waf_02_0048__b9991156185212">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0048__row18193192042114"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.4.2.4.1.1 "><p id="waf_02_0048__p17915121882118">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.4.2.4.1.2 "><p id="waf_02_0048__p13919121810219">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.4.2.4.1.3 "><p id="waf_02_0048__p6922118172114">Specifies the condition type. The value can be <strong id="waf_02_0048__b17337318533">path</strong>, <strong id="waf_02_0048__b103377125315">user-agent</strong>, <strong id="waf_02_0048__b533901135320">ip</strong>, <strong id="waf_02_0048__b143405155315">params</strong>, <strong id="waf_02_0048__b12340151165311">cookie</strong>, <strong id="waf_02_0048__b13401011538">referer</strong>, or <strong id="waf_02_0048__b934214195317">header</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row2191142014219"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.4.2.4.1.1 "><p id="waf_02_0048__p17927121862115">index</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.4.2.4.1.2 "><p id="waf_02_0048__p1793021892114">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.4.2.4.1.3 "><ul id="waf_02_0048__ul67311349013"><li id="waf_02_0048__li197312341707">If <strong id="waf_02_0048__b11315124992016">category</strong> is set to <strong id="waf_02_0048__b2031594922019">cookie</strong>, <strong id="waf_02_0048__b7370125617226">index</strong> indicates cookie name.</li><li id="waf_02_0048__li57411623217">If <strong id="waf_02_0048__b1594016470209">category</strong> is set to <strong id="waf_02_0048__b0948104713200">params</strong>, <strong id="waf_02_0048__b131051603234">index</strong> indicates param name.</li><li id="waf_02_0048__li1773214349019">If <strong id="waf_02_0048__b2642113472">category </strong>is set to <strong id="waf_02_0048__b271611476">header</strong>, <strong id="waf_02_0048__b207110154715">index</strong> indicates an option in the header.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row1191112015214"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.4.2.4.1.1 "><p id="waf_02_0048__p1893714188211">logic</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.4.2.4.1.2 "><p id="waf_02_0048__p994051832118">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.4.2.4.1.3 "><p id="waf_02_0048__p14612173720406"><span class="parmvalue" id="waf_02_0048__parmvalue56551145789"><b>contain</b></span>, <span class="parmvalue" id="waf_02_0048__parmvalue1963614566816"><b>not_contain</b></span>, <span class="parmvalue" id="waf_02_0048__parmvalue1781534796"><b>equal</b></span>, <span class="parmvalue" id="waf_02_0048__parmvalue13673644894"><b>not_equal</b></span>, <span class="parmvalue" id="waf_02_0048__parmvalue692017531911"><b>prefix</b></span>, <span class="parmvalue" id="waf_02_0048__parmvalue16743111641014"><b>not_prefix</b></span>, <span class="parmvalue" id="waf_02_0048__parmvalue082243751013"><b>suffix</b></span>, and <span class="parmvalue" id="waf_02_0048__parmvalue15701195091011"><b>not_suffix</b></span> indicate <strong id="waf_02_0048__b6464789519">Include</strong>, <strong id="waf_02_0048__b74646825118">Exclude</strong>, <strong id="waf_02_0048__b184651087519">Equal to</strong>, <strong id="waf_02_0048__b946514845120">Not equal to</strong>, <strong id="waf_02_0048__b1446578115115">Prefix is</strong>, <strong id="waf_02_0048__b746638175111">Prefix is not</strong>, <strong id="waf_02_0048__b11466108165110">Suffix is</strong>, and <strong id="waf_02_0048__b4466884515">Suffix is not</strong> respectively.</p>
|
|
<p id="waf_02_0048__p18942141814214">If <span class="parmname" id="waf_02_0048__parmname1982002772915"><b>category</b></span> is set to <strong id="waf_02_0048__b17820112732911">ip</strong>, <span class="parmname" id="waf_02_0048__parmname1682072714299"><b>logic</b></span> can only be <span class="parmvalue" id="waf_02_0048__parmvalue682012274292"><b>equal</b></span> or <span class="parmvalue" id="waf_02_0048__parmvalue168201427112919"><b>not_equal</b></span>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0048__row17189620192110"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.4.2.4.1.1 "><p id="waf_02_0048__p139511118132116">contents</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.4.2.4.1.2 "><p id="waf_02_0048__p14953818172112">List</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.4.2.4.1.3 "><p id="waf_02_0048__p39551318112111">Specifies content matching the condition.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="waf_02_0048__table10607112511329"></a><a name="table10607112511329"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0048__table10607112511329" frame="border" border="1" rules="all"><caption><b>Table 5 </b><strong id="waf_02_0048__b610024872714">action</strong></caption><thead align="left"><tr id="waf_02_0048__row186151525163218"><th align="left" class="cellrowborder" valign="top" width="33.086691330866906%" id="mcps1.3.4.5.2.4.1.1"><p id="waf_02_0048__p1461816256324"><strong id="waf_02_0048__b11242172011547">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="27.117288271172878%" id="mcps1.3.4.5.2.4.1.2"><p id="waf_02_0048__p116201025143210"><strong id="waf_02_0048__b1249073219">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.7960203979602%" id="mcps1.3.4.5.2.4.1.3"><p id="waf_02_0048__p17625142533210"><strong id="waf_02_0048__b799692313549">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0048__row34449423322"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.5.2.4.1.1 "><p id="waf_02_0048__p173849415321">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.5.2.4.1.2 "><p id="waf_02_0048__p13387241113219">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.5.2.4.1.3 "><p id="waf_02_0048__p94858282213">Specifies the protective action.</p>
|
|
<ul id="waf_02_0048__ul1491712301523"><li id="waf_02_0048__li169619511124"><span class="parmvalue" id="waf_02_0048__parmvalue522312429540"><b>block</b></span>: block.</li><li id="waf_02_0048__li1091753013216"><span class="parmvalue" id="waf_02_0048__parmvalue1755775815212"><b>pass</b></span>: allow.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="waf_02_0048__section1177017287527"><h4 class="sectiontitle">Example</h4><p id="waf_02_0048__p12107164312418"><strong id="waf_02_0048__b2825215172711">total</strong> with a value of <strong id="waf_02_0048__b18489281005">2</strong> is used as an example.</p>
|
|
<div class="p" id="waf_02_0048__p42531437145211">Response example<pre class="screen" id="waf_02_0048__screen1794162805215">{
|
|
"total": 2,
|
|
"items": [{
|
|
"id": "7374ad99c6c448e9a9ca35cb46660a39",
|
|
"policy_id": "9tre832yf96784ec8abd8ba61a98064ef",
|
|
"name": "rule1",
|
|
"time": true,
|
|
"start": 1499817600,
|
|
"end": 1567817600,
|
|
"conditions": [{
|
|
"category": "path",
|
|
"contents": ["/login"],
|
|
"logic": "containi"
|
|
},{
|
|
"category": "ip",
|
|
"logic": "equal",
|
|
"contents": ["X.X.1.1"]
|
|
}
|
|
],
|
|
"action": {
|
|
"category": "block"
|
|
},
|
|
|
|
"priority": 1,
|
|
"timestamp": 1499817600
|
|
}, {
|
|
"id": "7374ad99c6c448e9a9ca35cb46660a39",
|
|
"policy_id": "9tre832yf96784ec8abd8ba61a98064ef",
|
|
"name": "rule2",
|
|
"time": false,
|
|
"conditions": [{
|
|
"category": "path",
|
|
"contents": ["/login"],
|
|
"logic": "contain"
|
|
},{
|
|
"category": "ip",
|
|
"logic": "equal",
|
|
"contents": ["X.X.1.1"]
|
|
}
|
|
],
|
|
"action": {
|
|
"category": "block"
|
|
},
|
|
|
|
"priority": 1,
|
|
"timestamp": 1499817600
|
|
}
|
|
]
|
|
}
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="waf_02_0048__section44910495"><h4 class="sectiontitle">Status Code</h4><div class="p" id="waf_02_0048__waf_02_0012_a652d4922b7df48fca0a65bc1a38ea5f2"><a href="#waf_02_0048__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0">Table 6</a> describes the normal status code returned by the API.
|
|
<div class="tablenoborder"><a name="waf_02_0048__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><a name="waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0048__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Status code</caption><thead align="left"><tr id="waf_02_0048__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_0048__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_0048__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_0048__waf_02_0012_ada185614bba24140995b8123b3e9faa8">Meaning</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0048__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_0048__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_0048__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_0048__waf_02_0012_en-us_topic_0144911667_p369874114414">The request has succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="waf_02_0048__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_0047.html">Precise Protection Rules</a></div>
|
|
</div>
|
|
</div>
|
|
|