Querying Top Security Statistics by Category
Function
This API is used to query statistics by category, including the attacked domain name, attack source IP address, attacked URL, attack source region, and attack event distribution.
URI
GET /v1/{project_id}/waf/overviews/classification
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. To obtain it, go to Cloud management console and hover the cursor over your username. On the displayed window, choose My Credentials.Then, in the Projects area, view Project ID of the corresponding project. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
You can obtain the ID by calling the ListEnterpriseProject API of EPS. |
from |
Yes |
Long |
Start time (13-digit timestamp in millisecond). This parameter must be used together with to. |
to |
Yes |
Long |
End time (13-digit timestamp in millisecond). This parameter must be used together with from. |
top |
No |
Integer |
The first several results you want to query. Maximum value: 10. Default value: 5. |
hosts |
No |
String |
Domain name IDs. In the cloud mode, domain name IDs can be obtained by calling the ListHost API. In the dedicated mode, domain name IDs can be obtained by calling the ListPremiumHost API. By default, this parameter is not required, and the statistics data of all protected domain names in the project is queried. To query data about several specified domain names, refer to the request example. |
instances |
No |
String |
Instance IDs you want to query. This parameter is required only for dedicated WAF instances and load-balancing instances (ELB mode). |
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 |
X-Language |
No |
String |
Language. The default value is en-us. zh-cn (Chinese)/en-us (English) |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
domain |
DomainClassificationItem object |
Attacked domain name |
attack_type |
AttackTypeClassificationItem object |
Attack event distribution |
ip |
IpClassificationItem object |
Attacking source IP address |
url |
UrlClassificationItem object |
Attacking URL |
geo |
GeoClassificationItem object |
Source region |
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of DomainItem |
items |
Array of DomainItem objects |
DomainItem details |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Domain name |
num |
Integer |
Quantity. |
web_tag |
String |
Website name, which is the same as the website name in the domain name details on the WAF console. |
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of AttackTypeItem |
items |
Array of AttackTypeItem objects |
AttackTypeItem details |
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of IpItem |
items |
Array of IpItem objects |
IpItem Details |
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of UrlItem |
items |
Array of UrlItem objects |
UrlItem Details |
Parameter |
Type |
Description |
---|---|---|
key |
String |
URL path. |
num |
Integer |
Quantity. |
host |
String |
Domain name |
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of GeoItem |
items |
Array of GeoItem objects |
GeoItem details |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Example Requests
The following example shows how to query the top 10 security overview statistics in a project. The project ID is specified by project_id. The time is from 2022-05-19 00:00:00 to 2022-06-17 11:14:41. The domain name ID is 1bac09440a814aa98ed08302c580a48b, and engine instance ID is 5a532f83a2fb476ba51ca1de7b1ebc43.
GET https://{Endpoint}/v1/{project_id}/waf/overviews/classification?enterprise_project_id=0&from=1652889600354&to=1655435681354&top=10&hosts=1bac09440a814aa98ed08302c580a48b&instances=5a532f83a2fb476ba51ca1de7b1ebc43
Example Responses
Status code: 200
ok
{ "attack_type" : { "total" : 1, "items" : [ { "key" : "custom_custom", "num" : 2 } ] }, "domain" : { "total" : 2, "items" : [ { "key" : "www.whitelist.com", "num" : 2, "web_tag" : "www.whitelist.com" }, { "key" : "zbx002.apayaduo.cn", "num" : 2, "web_tag" : "" } ] }, "geo" : { "total" : 1, "items" : [ { "key" : "Shanghai", "num" : 2 } ] }, "ip" : { "total" : 1, "items" : [ { "key" : "10.142.4.15", "num" : 2 } ] }, "url" : { "total" : 1, "items" : [ { "key" : "/attack", "num" : 2, "host" : "www.whitelist.com" } ] } }
Status Codes
Status Code |
Description |
---|---|
200 |
ok |
400 |
Request failed. |
401 |
The token does not have required permissions. |
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.