Querying the Number of Requests and Attacks on Dashboard
Function
This API is used to query the number of requests and attacks on the dashboard. This API and other APIs related to Dashboard cannot be used to query the number of requests or attacks for a custom time range. You can use them to query statistics for yesterday, today, past 3 days, past 7 days, and past 30 days only.
URI
GET /v1/{project_id}/waf/overviews/statistics
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
ID of the enterprise project. It can be obtained by calling the ListEnterpriseProject API of EPS. |
from |
Yes |
Long |
Start time (13-digit timestamp). This parameter must be used together with to. |
to |
Yes |
Long |
End time (13-digit timestamp). This parameter must be used together with from. |
hosts |
No |
String |
Domain name ID array. In the cloud mode, it can be obtained by calling the ListHost API. In the dedicated mode, it can be obtained by calling the ListPremiumHost API. By default, it is left empty, and statistics on abnormal requests for all domain names is returned. To query abnormal requests for one or more domain names, configure this parameter. |
instances |
No |
String |
List of instances to be queried |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Content-Type |
Yes |
String |
Content type Default: application/json;charset=utf8 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
[items] |
Array of CountItem objects |
Security statistics |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Code |
error_msg |
String |
Error Messages |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Code |
error_msg |
String |
Error Messages |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Code |
error_msg |
String |
Error Messages |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Code |
error_msg |
String |
Error Messages |
Example Requests
GET https://{Endpoint}/v1/{project_id}/waf/overviews/statistics?enterprise_project_id=0&from=1650470400196&to=1650522936196&hosts=1bac09440a814aa98ed08302c580a48b&hosts=5a532f83a2fb476ba51ca1de7b1ebc43
Example Responses
Status code: 200
ok
[ { "key" : "ACCESS", "num" : 1190 }, { "key" : "PRECISE", "num" : 0 }, { "key" : "CRAWLER", "num" : 10 }, { "key" : "WEB_ATTACK", "num" : 22 }, { "key" : "CC", "num" : 0 }, { "key" : "ATTACK", "num" : 32 } ]
Status Codes
Status Code |
Description |
---|---|
200 |
ok |
400 |
Request failed. |
401 |
The token does not have required permissions. |
403 |
Insufficient resource quota. |
500 |
Internal server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot