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>
168 lines
12 KiB
HTML
168 lines
12 KiB
HTML
<a name="waf_02_0061"></a><a name="waf_02_0061"></a>
|
|
|
|
<h1 class="topictitle1">Adding a Web Tamper Protection Rule</h1>
|
|
<div id="body17024648"><div class="section" id="waf_02_0061__section54735234"><h4 class="sectiontitle">Function Description</h4><p class="msonormal" id="waf_02_0061__p36819209">This API is used to add a web tamper protection rule.</p>
|
|
</div>
|
|
<div class="section" id="waf_02_0061__section22855062"><h4 class="sectiontitle">URI</h4><ul id="waf_02_0061__ul29565947"><li id="waf_02_0061__li64766933">URI format<p id="waf_02_0061__p46031493"><a name="waf_02_0061__li64766933"></a><a name="li64766933"></a>POST /v1/{project_id}/waf/policy/{policy_id}/antitamper</p>
|
|
</li><li id="waf_02_0061__li11630259">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0061__table37563472" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="waf_02_0061__row739175"><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_0061__p59873195"><strong id="waf_02_0061__b11541183134310">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_0061__p17890620"><strong id="waf_02_0061__b320693334313">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_0061__p39854081"><strong id="waf_02_0061__b783823474313">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_0061__p6955106"><strong id="waf_02_0061__b139843369430">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0061__row26492745"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0061__p65537563">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_0061__p6942402">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_0061__p25463718">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_0061__p49295278">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0061__row41004323"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0061__p33015901">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_0061__p57042352">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_0061__p57027779">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_0061__p55847358">Specifies the policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="waf_02_0061__section4368973"><h4 class="sectiontitle">Request</h4><div class="p" id="waf_02_0061__p14606111611316">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0061__table121998" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0061__row5199287"><th align="left" class="cellrowborder" valign="top" width="25.507449255074494%" id="mcps1.3.3.2.1.2.5.1.1"><p id="waf_02_0061__p18489121"><strong id="waf_02_0061__b183281556164312">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.3.2.1.2.5.1.2"><p id="waf_02_0061__p21223823"><strong id="waf_02_0061__b195810586436">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.3.2.1.2.5.1.3"><p id="waf_02_0061__p41408106"><strong id="waf_02_0061__b9414615441">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.796020397960206%" id="mcps1.3.3.2.1.2.5.1.4"><p id="waf_02_0061__p65722265"><strong id="waf_02_0061__b38981625445">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0061__row21903237"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.2.1.2.5.1.1 "><p id="waf_02_0061__p29331733">hostname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.3.2.1.2.5.1.2 "><p id="waf_02_0061__p27060145">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.3.2.1.2.5.1.3 "><p id="waf_02_0061__p44388162">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.3.2.1.2.5.1.4 "><p id="waf_02_0061__p38671408">Specifies the domain name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0061__row12498357"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.2.1.2.5.1.1 "><p id="waf_02_0061__p5734009">path</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.3.2.1.2.5.1.2 "><p id="waf_02_0061__p61801548">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.3.2.1.2.5.1.3 "><p id="waf_02_0061__p39869529">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.3.2.1.2.5.1.4 "><p id="waf_02_0061__p8206406">Specifies the URL protected by the web tamper protection rule, excluding a domain name.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="waf_02_0061__section39320758"><h4 class="sectiontitle">Response</h4><div class="p" id="waf_02_0061__p18761163513312">Response parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0061__table49584952" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0061__row40541947"><th align="left" class="cellrowborder" valign="top" width="31.736826317368262%" id="mcps1.3.4.2.1.2.4.1.1"><p id="waf_02_0061__p62672288"><strong id="waf_02_0061__b961314219458">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.467153284671525%" id="mcps1.3.4.2.1.2.4.1.2"><p id="waf_02_0061__p43290553"><strong id="waf_02_0061__b8801204434515">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.7960203979602%" id="mcps1.3.4.2.1.2.4.1.3"><p id="waf_02_0061__p16873903"><strong id="waf_02_0061__b16987046204514">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0061__row17647400"><td class="cellrowborder" valign="top" width="31.736826317368262%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0061__p20153267">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.467153284671525%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0061__p21801935">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0061__p21126307">Specifies the ID of a web tamper protection rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0061__row55919042"><td class="cellrowborder" valign="top" width="31.736826317368262%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0061__p33148574">policy_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.467153284671525%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0061__p680007">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0061__p55080612">Specifies the policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0061__row25963466"><td class="cellrowborder" valign="top" width="31.736826317368262%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0061__p22666001">hostname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.467153284671525%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0061__p24006784">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0061__p65501376">Specifies the domain name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0061__row52641478"><td class="cellrowborder" valign="top" width="31.736826317368262%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0061__p36101314">path</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.467153284671525%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0061__p38525282">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0061__p33540110">Specifies the URL protected by the web tamper protection rule, excluding a domain name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0061__row33425541"><td class="cellrowborder" valign="top" width="31.736826317368262%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0061__p23114287">timestamp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.467153284671525%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0061__p60317978">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0061__p12128762">Specifies the time when the cache is refreshed.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="waf_02_0061__section11924143811316"><h4 class="sectiontitle">Examples</h4><p id="waf_02_0061__p293441455616">Domain name <strong id="waf_02_0061__b10763120153711">www.abc.com</strong> is used as an example.</p>
|
|
<ul id="waf_02_0061__ul1193810382037"><li id="waf_02_0061__li1893817381318">Request example<pre class="screen" id="waf_02_0061__screen10938203819314">{
|
|
"hostname": "www.abc.com",
|
|
"path": "/a"
|
|
}</pre>
|
|
</li></ul>
|
|
<ul id="waf_02_0061__ul199386382318"><li id="waf_02_0061__li179385387317">Response example<pre class="screen" id="waf_02_0061__screen1493843818319">{
|
|
"id": "3a9b5c0f96784ec8abd8ba61a98064ef",
|
|
"policy_id": "yuc0e55865544d1f8c95cf71df108c6b",
|
|
"hostname": "www.abc.com",
|
|
"path": "/a",
|
|
"timestamp": 1499817600
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="waf_02_0061__section18342508"><h4 class="sectiontitle">Status Code</h4><div class="p" id="waf_02_0061__waf_02_0012_a652d4922b7df48fca0a65bc1a38ea5f2"><a href="#waf_02_0061__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0">Table 4</a> describes the normal status code returned by the API.
|
|
<div class="tablenoborder"><a name="waf_02_0061__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><a name="waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0061__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_0061__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_0061__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_0061__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_0061__waf_02_0012_ada185614bba24140995b8123b3e9faa8">Meaning</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0061__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_0061__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_0061__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_0061__waf_02_0012_en-us_topic_0144911667_p369874114414">The request has succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="waf_02_0061__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_0059.html">Web Tamper Protection Rules</a></div>
|
|
</div>
|
|
</div>
|
|
|