doc-exports/docs/waf/api-ref/waf_02_0074.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

121 lines
9.5 KiB
HTML

<a name="waf_02_0074"></a><a name="waf_02_0074"></a>
<h1 class="topictitle1">Querying the Total Number of Attacks</h1>
<div id="body1548658932452"><div class="section" id="waf_02_0074__section56466498"><h4 class="sectiontitle">Function Description</h4><p class="msonormal" id="waf_02_0074__p23902165">This API is used to query the total number of attacks.</p>
</div>
<div class="section" id="waf_02_0074__section10383651"><h4 class="sectiontitle">URI</h4><ul id="waf_02_0074__ul55802169"><li id="waf_02_0074__li32457476">URI format<p id="waf_02_0074__p23681834"><a name="waf_02_0074__li32457476"></a><a name="li32457476"></a>GET /v1/{project_id}/waf/event/attack/num?from={from}&amp;to={to}&amp;hosts={hostids}</p>
<div class="note" id="waf_02_0074__note63241148751"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="waf_02_0074__p23244481054">An example of a URI is as follows:</p>
<p id="waf_02_0074__p774833712618">GET /v1/3ac26c59e15a4a11bb680a103a29ddb6/waf/event/attack/type?from=1543976973635&amp;to=1563976973635&amp;hosts=3211757cafa3437aae24d760022e79ba&amp;hosts=93029844064b43739b51ca63036fbc4b&amp;hosts=34fe5f5c60ef4e43a9975296765d1217</p>
</div></div>
</li><li id="waf_02_0074__li11809914">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0074__table9130325" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="waf_02_0074__row45600051"><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_0074__p2616641"><strong id="waf_02_0074__b1042915822318">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_0074__p10621372"><strong id="waf_02_0074__b135079911232">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_0074__p55024779"><strong id="waf_02_0074__b186741010235">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_0074__p27822103"><strong id="waf_02_0074__b1782126231">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0074__row38997831"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0074__p4707715">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_0074__p45780660">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_0074__p17246018">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_0074__p54750228">Specifies the project ID.</p>
</td>
</tr>
<tr id="waf_02_0074__row58661649201613"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0074__p486764911617">from</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_0074__p1886724914163">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_0074__p686754917166">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_0074__p18857034">Specifies the start time (UTC) in milliseconds. For example, <strong id="waf_02_0074__b1079913117504">1548172800000</strong>.</p>
</td>
</tr>
<tr id="waf_02_0074__row148151171179"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0074__p208161977178">to</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_0074__p78168719177">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_0074__p681627131712">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_0074__p676211156578">Specifies the end time (UTC) in milliseconds. For example, <strong id="waf_02_0074__b98939475011">1548431999000</strong>.</p>
</td>
</tr>
<tr id="waf_02_0074__row15463147"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0074__p44555360">hosts</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_0074__p52214385">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_0074__p1506824">Array</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_0074__p54943882">Specifies the domain IDs.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="waf_02_0074__section25084896"><h4 class="sectiontitle">Request</h4><p id="waf_02_0074__p1939714162146">Request parameters</p>
<p class="msonormal" id="waf_02_0074__p21269473">None</p>
</div>
<div class="section" id="waf_02_0074__section24437477"><h4 class="sectiontitle">Response</h4><p id="waf_02_0074__p1523552281420">Response parameters</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0074__table17379311124" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0074__row123773119126"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.3.2.4.1.1"><p id="waf_02_0074__p62178935"><strong id="waf_02_0074__b263515429232">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.3.2.4.1.2"><p id="waf_02_0074__p3371131171212"><strong id="waf_02_0074__b26747439230">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.3.2.4.1.3"><p id="waf_02_0074__p33710314125"><strong id="waf_02_0074__b137911144162319">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0074__row11374310121"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0074__p237731191211">attack_num</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0074__p437193151210">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0074__p737331201219">Specifies the total number of attacks.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="waf_02_0074__section1880600111519"><h4 class="sectiontitle">Example</h4><p id="waf_02_0074__p69411822204519"></p>
<div class="p" id="waf_02_0074__p191152510155">Response example<pre class="screen" id="waf_02_0074__screen881219061511">{
"attack_num": 150
}</pre>
</div>
</div>
<div class="section" id="waf_02_0074__section53489518"><h4 class="sectiontitle">Status Code</h4><div class="p" id="waf_02_0074__waf_02_0012_a652d4922b7df48fca0a65bc1a38ea5f2"><a href="#waf_02_0074__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0">Table 3</a> describes the normal status code returned by the API.
<div class="tablenoborder"><a name="waf_02_0074__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><a name="waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0074__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Status code</caption><thead align="left"><tr id="waf_02_0074__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_0074__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_0074__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_0074__waf_02_0012_ada185614bba24140995b8123b3e9faa8">Meaning</p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0074__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_0074__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_0074__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_0074__waf_02_0012_en-us_topic_0144911667_p369874114414">The request has succeeded.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="waf_02_0074__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_0069.html">Event Logs</a></div>
</div>
</div>