智能报告详情¶
1. 接口描述¶
接口请求路径:GET /prod-api/waf/wafv3/intelligenceReport/detail/{taskId}
detail 用于根据 taskId 获取智能防护报告完整详情,供控制台报告页展示与 PDF 导出。仅能查询当前登录用户自己创建的报告。
Token 获取方式见 密钥鉴权。
2. 输入参数¶
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| taskId | 是 | String | Path 参数。任务 ID,32 位十六进制字符串。示例值:b9f7b610d40e4ebc9df4bd761f347f10 |
3. 输出参数¶
| 参数名称 | 类型 | 描述 |
|---|---|---|
| code | Integer | 状态码。示例值:200 |
| msg | String | 提示信息。示例值:成功 |
| data | Object | 报告详情 |
| data.taskId | String | 任务 ID。示例值:b9f7b610d40e4ebc9df4bd761f347f10 |
| data.taskStatus | String | 任务状态。取值:PENDING(待处理)、RUNNING(生成中)、SUCCESS(已成功)、FAILED(失败)。示例值:SUCCESS |
| data.errorMessage | String | 失败原因;非失败时为 null。部分内部错误对外统一为 报告生成失败,请稍后重试 |
| data.createTime | String | 创建时间,格式 yyyy-MM-dd HH:mm:ss |
| data.startTime | String | 开始执行时间;未开始时可能为 null |
| data.finishTime | String | 结束时间;未完成时为 null |
| data.reportStartTime | String | 统计区间起点 |
| data.reportEndTime | String | 统计区间终点 |
| data.reportLabel | String | 区间展示文案。示例值:2026-05-13 00:00:00 ~ 2026-05-20 00:00:00 |
| data.summary | String | 报告摘要;生成完成前多为 null |
| data.riskLevel | String | 风险等级。取值:low、medium、high;完成前多为 null |
| data.rawModelOutput | String | 模型原始 JSON 字符串;未成功时可能为 null |
| data.result | ReportResult | 结构化报告正文;无结果时为空对象 {} |
4. 示例¶
示例1 查询报告详情¶
输入示例¶
代码调用¶
请将 {登录域名}、token 替换为实际值。
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
public class DetailTest {
public static void main(String[] args) throws Exception {
String url = "https://{登录域名}/prod-api/waf/wafv3/intelligenceReport/detail/"
+ "b9f7b610d40e4ebc9df4bd761f347f10";
String token = "eyJhbGciOiJIUzUxMiJ9.xxxxxx";
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
HttpGet httpGet = new HttpGet(url);
httpGet.setHeader("Authorization", "Bearer " + token);
try (CloseableHttpResponse response = httpClient.execute(httpGet)) {
int statusCode = response.getStatusLine().getStatusCode();
String body = EntityUtils.toString(response.getEntity(), "UTF-8");
System.out.println("Status Code: " + statusCode);
System.out.println("Body: " + body);
}
}
}
}
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://{登录域名}/prod-api/waf/wafv3/intelligenceReport/detail/b9f7b610d40e4ebc9df4bd761f347f10"
token := "eyJhbGciOiJIUzUxMiJ9.xxxxxx"
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println("Status Code:", resp.StatusCode)
fmt.Println("Body:", string(body))
}
输出示例¶
{
"msg": "成功",
"code": 200,
"data": {
"taskId": "b9f7b610d40e4ebc9df4bd761f347f10",
"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": "该时段检出攻击 13 次,拦截量为 0……",
"riskLevel": "medium",
"rawModelOutput": "{...}",
"result": {
"summary": "……",
"riskLevel": "medium",
"patterns": ["路径遍历攻击"],
"recommendations": [
{
"title": "启用托管规则并优化拦截策略",
"detail": "当前拦截率偏低……",
"suggestedWafActions": "启用基础防护规则组"
}
],
"reportSections": [
{ "title": "攻击趋势与拦截效果", "content": "……" }
],
"reportInsights": {
"trendInsight": "……",
"rulesInsight": "……",
"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
}
}
}
}
}
5. 错误码¶
| HTTP 状态码 / 业务提示 | 描述 |
|---|---|
| 200 | 成功 |
| 401 | 未鉴权或 Token 无效 |
| 403 | 无权限 |
| taskId不能为空 | 未传或传入空的 taskId |
| 报告不存在 | taskId 不存在或不属于当前用户 |
6. 数据模型¶
ReportResult¶
结构化报告正文(由模型输出解析,并附带生成时的统计快照)。
| 参数名称 | 类型 | 描述 |
|---|---|---|
| summary | String | 执行摘要 |
| riskLevel | String | 风险等级。取值:low、medium、high |
| patterns | Array of String | 攻击模式归纳 |
| recommendations | [ReportRecommendation] | 防护建议列表 |
| reportSections | [ReportSection] | 报告章节列表 |
| reportInsights | ReportInsights | 分维度解读 |
| numericEvidence | [NumericEvidence] | 数据依据列表 |
| disclaimer | String | 免责声明 |
| inputSnapshot | Object | 生成时固化的统计快照(含 period、blockedMetrics、detectedMetrics、compareMetrics 等,用于图表) |
ReportRecommendation¶
单条防护建议。
| 参数名称 | 类型 | 描述 |
|---|---|---|
| title | String | 建议标题 |
| detail | String | 建议说明 |
| suggestedWafActions | String | 建议采取的 WAF 操作 |
ReportSection¶
报告章节。
| 参数名称 | 类型 | 描述 |
|---|---|---|
| title | String | 章节标题 |
| content | String | 章节正文 |
ReportInsights¶
分维度解读文案。
| 参数名称 | 类型 | 描述 |
|---|---|---|
| trendInsight | String | 趋势解读 |
| rulesInsight | String | 规则解读 |
| timeInsight | String | 时间分布解读 |
| countryInsight | String | 国家/地区解读 |
| ipDomainInsight | String | IP/域名解读 |
| urlInsight | String | URL 解读 |
| osInsight | String | 操作系统解读 |
| topInsight | String | Top 汇总解读 |
| attackTypeInsight | String | 攻击类型解读 |
| botnetInsight | String | 僵尸网络解读 |
| compareInsight | String | 拦截与检出对比解读 |
| highSeverityIncidentsInsight | String | 高危事件总体解读 |
| highSeverityIncidentInsights | [HighSeverityIncidentInsight] | 高危事件逐条解读 |
NumericEvidence¶
报告中引用的数值证据。
| 参数名称 | 类型 | 描述 |
|---|---|---|
| number | String | 引用数值。示例值:0 |
| sourcePath | String | 数值来源路径。示例值:$.blockedMetrics.summaryMetrics.totalBlock |
| reason | String | 引用原因说明 |
HighSeverityIncidentInsight¶
单条高危事件解读。
| 参数名称 | 类型 | 描述 |
|---|---|---|
| riskPoints | String | 风险要点 |
| recommendations | String | 处置建议 |
| referencedMatches | String | 关联匹配说明 |