WAF3.0 API
GET 智能报告详情
GET /prod-api/waf/wafv3/intelligenceReport/detail/{taskId}
根据 taskId 获取智能防护报告的完整详情,供控制台报告页展示与 PDF 导出。
请求示例
GET /prod-api/waf/wafv3/intelligenceReport/detail/b9f7b61235df4bd761f347f10
请求参数
| 名称 |
位置 |
类型 |
必选 |
中文名 |
说明 |
| Authorization |
header |
string |
是 |
鉴权 |
Bearer Token |
taskId |
path |
string |
是 |
任务 ID |
32 位十六进制字符串,无连字符 |
仅能查询 当前登录用户 自己创建的报告;不存在时返回「报告不存在」。
任务状态与可读内容
taskStatus |
说明 |
详情页展示 |
PENDING / RUNNING |
生成中 |
无 result,需轮询历史或稍后重试 |
SUCCESS |
已成功 |
含完整 summary、result(图表与 AI 解读) |
FAILED |
失败 |
见 errorMessage,result 通常为空 |
返回示例
200 Response(SUCCESS,结构节选)
{
"msg": "成功",
"code": 200,
"data": {
"taskId": "b9f7b61235df4bd761f347f10",
"taskStatus": "SUCCESS",
"errorMessage": null,
"createTime": "2026-05-21 10:29:18",
"startTime": "2026-05-21 10:29:18",
"finishTime": "2026-05-21 10:30:00",
"reportStartTime": "2026-05-13 00:00:00",
"reportEndTime": "2026-05-20 00:00:00",
"reportLabel": "2026-05-13 00:00:00 ~ 2026-05-20 00:00:00",
"summary": "在2026年5月13日至5月20日期间,WAF拦截量为0,但检出攻击13次……",
"riskLevel": "medium",
"rawModelOutput": "{ ... 模型原始 JSON 字符串 ... }",
"result": {
"summary": "……",
"riskLevel": "medium",
"patterns": ["路径遍历攻击(如 /.aws/credentials、/.env)", "……"],
"recommendations": [
{
"title": "启用托管规则并优化拦截策略",
"detail": "当前拦截率为0%……",
"suggestedWafActions": "启用基础防护规则组……"
}
],
"reportSections": [
{
"title": "攻击趋势与拦截效果",
"content": "该时段总拦截0次,总检出13次……"
}
],
"reportInsights": {
"trendInsight": "攻击趋势呈集中爆发特点……",
"rulesInsight": "除规则949110外……",
"compareInsight": "拦截与检出差异显著……"
},
"numericEvidence": [
{
"number": "0",
"sourcePath": "$.blockedMetrics.summaryMetrics.totalBlock",
"reason": "该时段拦截量为0……"
}
],
"disclaimer": "本报告中的高危事件列表为按风险排序的查询抽样子集……",
"inputSnapshot": {
"period": {
"startTime": "2026-05-13 00:00:00",
"endTime": "2026-05-20 00:00:00"
},
"compareMetrics": {
"blockedTotal": 0,
"detectedTotal": 13,
"blockedRatio": 0,
"detectedRatio": 1,
"delta": -13
},
"blockedMetrics": { "summaryMetrics": { "totalBlock": 0 }, "topMetrics": {} },
"detectedMetrics": {
"summaryMetrics": { "totalBlock": 13 },
"topMetrics": {
"topCountry": [{ "name": "Canada", "value": 7 }],
"topClientIp": [{ "name": "142.248.80.72", "value": 7 }],
"topUrl": [{ "name": "/dns-query", "value": 2 }],
"topRule": [
{
"ruleId": "930130",
"ruleMessage": "限制文件访问尝试",
"group": "基础防护规则",
"value": 7
}
]
}
}
}
}
}
}
返回结果
| 状态码 |
状态码含义 |
说明 |
| 200 |
OK |
成功 |
| 401 |
Unauthorized |
未授权 |
| 403 |
Forbidden |
无权限 |
返回数据结构
状态码 200
| 名称 |
类型 |
说明 |
code |
integer |
200 表示成功 |
msg |
string |
提示信息 |
data |
object |
报告详情,见下表 |
data 任务基础信息
与 history 列表字段一致,成功时额外带 AI 与统计快照。
| 字段 |
类型 |
说明 |
taskId |
string |
任务 ID |
taskStatus |
string |
SUCCESS / FAILED / RUNNING / PENDING |
errorMessage |
string / null |
失败原因 |
createTime |
string |
任务创建时间 |
startTime |
string |
任务开始执行时间 |
finishTime |
string |
任务结束时间 |
reportStartTime |
string |
报告统计区间起点(与 start 的 startTime 一致) |
reportEndTime |
string |
报告统计区间终点 |
reportLabel |
string |
区间展示,如 2026-05-13 00:00:00 ~ 2026-05-20 00:00:00 |
summary |
string / null |
AI 报告摘要(顶层,与 result.summary 通常一致) |
riskLevel |
string / null |
风险等级:low / medium / high(低/中/高) |
rawModelOutput |
string / null |
大模型返回的 原始 JSON 字符串(调试或二次解析用) |
result |
object / null |
结构化报告正文,控制台主要使用此对象 |
data.result — AI 报告正文
taskStatus === SUCCESS 时存在。控制台详情页直接绑定 detail.result 渲染文案与图表。
概览字段
| 字段 |
类型 |
说明 |
summary |
string |
执行摘要 |
riskLevel |
string |
low / medium / high |
patterns |
string[] |
攻击模式归纳列表 |
disclaimer |
string |
免责声明(如高危事件为抽样子集) |
recommendations[] 防护建议
| 字段 |
类型 |
说明 |
title |
string |
建议标题 |
detail |
string |
详细说明 |
suggestedWafActions |
string |
建议在 WAF 中的具体操作 |
reportSections[] 报告章节
| 字段 |
类型 |
说明 |
title |
string |
章节标题,如「攻击趋势与拦截效果」 |
content |
string |
章节正文 |
reportInsights 分维度解读
控制台各图表/模块下的文字解读,常见键包括:
| 字段 |
说明 |
trendInsight |
攻击趋势 |
rulesInsight |
规则触发 |
timeInsight |
时段分布 |
countryInsight |
来源国家 |
ipDomainInsight |
IP / 域名 |
urlInsight |
URL |
osInsight |
操作系统 |
attackTypeInsight |
攻击类型 |
severityInsight |
严重级别 |
compareInsight |
拦截 vs 检出对比 |
topInsight |
Top 来源概括 |
highSeverityIncidentsInsight |
高危事件抽样说明 |
highSeverityIncidentInsights |
高危事件逐条解读(数组,可为空) |
numericEvidence[] 数据依据
| 字段 |
类型 |
说明 |
number |
string |
报告中引用的数字 |
sourcePath |
string |
对应 inputSnapshot 内 JSON 路径 |
reason |
string |
该数字的含义说明 |
生成报告时从 WAF 日志/统计接口汇总的 固化数据,控制台优先用其画趋势图、Top 榜、地图等;无需再次调用统计 API。
period
| 字段 |
说明 |
startTime |
统计开始 |
endTime |
统计结束 |
compareMetrics 拦截 vs 检出对比
| 字段 |
说明 |
blockedTotal |
拦截量(HTTP 417 等拦截状态) |
detectedTotal |
检出量(命中规则但未拦截等) |
blockedRatio |
拦截占比 |
detectedRatio |
检出占比 |
delta |
差值(实现定义,可为负) |
blockedMetrics / detectedMetrics
结构相同,分别表示 拦截侧 与 检出侧 指标。
| 子对象 |
说明 |
summaryMetrics |
汇总:totalBlock 总量、dailyAverageBlock 日均、rulesProportion(customRule / customLimitRule / custodyRule) |
dailyAggregates |
按日趋势:date、blockCount、ruleTriggerCount、timestamp(毫秒) |
topMetrics |
Top 排行,见下表 |
enrichedMetrics |
扩展:severityDist、attackTypeDist、highSeverityIncidents 等 |
topMetrics 排行项(name + value)
| 字段 |
说明 |
attackTimePeriods |
时段分布,如 04:00-07:59 → 7 |
topCountry |
国家 |
topClientIp |
客户端 IP |
topDomain |
域名 |
topUrl |
URL |
topOs |
操作系统 |
topRule |
规则,项含 ruleId、ruleMessage、group、value |
控制台页面与字段对应(参考)
| 页面区域 |
主要数据来源 |
| 报告头信息 |
taskId、reportLabel、finishTime、taskStatus |
| 执行摘要 |
summary、riskLevel |
| 拦截/检出对比 |
result.inputSnapshot.compareMetrics、blockedMetrics、detectedMetrics |
| 趋势图 |
blockedMetrics.dailyAggregates、detectedMetrics.dailyAggregates |
| Top 榜/地图 |
detectedMetrics.topMetrics(或 blockedMetrics.topMetrics) |
| 攻击类型/严重级别图 |
enrichedMetrics.attackTypeDist、severityDist |
| 分块解读文案 |
reportInsights.* |
| 防护建议列表 |
recommendations |
| 章节正文 |
reportSections |