文档首页/ 边缘安全 EdgeSec/ API参考/ API/ Http统计/ 查询HTTP攻击分布数据
更新时间:2026-01-07 GMT+08:00

查询HTTP攻击分布数据

功能介绍

查询HTTP攻击分布数据

URI

GET /v1/edgesec/stat/http-attack-distribution

表1 Query参数

参数

是否必选

参数类型

描述

enterprise_project_id

String

您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id,默认为0

domain_name

String

域名

stat_type

String

安全统计指标类型。目前支持req_num

group_by

String

统计指标分组类型。目前支持action(防护动作), attack_type(攻击类型)

start_time

Long

起始时间,使用秒级时间戳

end_time

Long

结束时间,使用秒级时间戳

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

租户token

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

stat_type

String

安全统计指标类型。

group_by

String

分组统计维度

stat_num

Long

统计数量

values

Array of CommonStatItem objects

统计数组

start_time

Long

开始时间

end_time

Long

结束时间

表4 CommonStatItem

参数

参数类型

描述

key

String

对应请求参数group_by的子类别。例如在Http攻击分布统计接口中,group_by为action时,key可为:log、block、captcha、js_challenge;在Http攻击Top接口中,group_by为url时,key可为请求的URL,例:/abc。

value

Long

攻击请求数

状态码:400

表5 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码:401

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码:500

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

请求示例

  • 查询HTTP攻击防护动作分布数据

    GET https://esa.cn-north-4.myhuaweicloud.com/v1/edgesec/stat/http-attack-distribution?enterprise_project_id=0&start_time=1731427200000&end_time=1731427500000&stat_type=req_num&group_by=action&domain_name=www.test.com
  • 查询HTTP攻击类型分布数据

    GET https://esa.cn-north-4.myhuaweicloud.com/v1/edgesec/stat/http-attack-distribution?enterprise_project_id=0&start_time=1731427200000&end_time=1731427500000&stat_type=req_num&group_by=attack_type&domain_name=www.test.com

响应示例

状态码:200

请求成功

  • 查询HTTP攻击防护动作分布数据

    [ {
      "stat_type" : "req_num",
      "group_by" : "action",
      "stat_num" : 200,
      "start_time" : 1731427200000,
      "end_time" : 1731427500000,
      "values" : [ {
        "key" : "log",
        "value" : 100
      }, {
        "key" : "block",
        "value" : 100
      } ]
    } ]
  • 查询HTTP攻击类型分布数据

    [ {
      "stat_type" : "req_num",
      "group_by" : "attack_type",
      "stat_num" : 200,
      "start_time" : 1731427200000,
      "end_time" : 1731427500000,
      "values" : [ {
        "key" : "sqli",
        "value" : 100
      }, {
        "key" : "cc",
        "value" : 100
      } ]
    } ]

状态码

状态码

描述

200

请求成功

400

请求失败

401

token权限不足

500

服务器内部错误

错误码

请参见错误码