查看流量统计信息
更新时间 2026-07-31 15:54:10
最近更新时间: 2026-07-31 15:54:10
接口功能介绍
查看流量统计信息。
接口约束
请订购waf之后访问,用户需要对访问的接口具备相关操作权限(IAM),header中的accountid,userid从https://iam.ctyun.cn/overview/index 概览页面中账号信息栏获取,“当前身份”对应header中的accountid,“当前用户”对应header中的userid。
URI
GET /openapi/v1/summary/request/times/chart
路径参数 无
Query参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| startTime | 是 | Integer | 查询起始时间(unix时间戳,精确到秒,例:1678086293) | 1695058503 | |
| endTime | 是 | Integer | 查询结束时间(unix时间戳,精确到秒,例:1678086800) | 1695303298 | |
| domain | 否 | String | 访问的域名(无端口部分)。选择所有域名时,不传。后续废弃该字段,推荐使用accessRuleId,保留为兼容openapi,筛选防护对象时,domain和accessRuleId二选一 | baidu.com | |
| accessRuleId | 否 | String | 防护对象的ruleId,accessRule的ruleId或elbAccessRule的ruleId,选择所有防护对象时,不传。筛选防护对象时,domain和accessRuleId二选一 | ||
| instanceId | 否 | String | 独享型实例ID,当查询独享型实例的防护对象时必传,不传则默认查询saas型的防护对象 | ||
| interval | 是 | Integer | 聚合的时间间隔,单位秒 | 300 |
请求参数
请求头header参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| tenantId | 是 | String | 注册天翼云账号的accountId,也叫tenantId。从https://iam.ctyun.cn/overview/index 概览页面中账号信息栏获取,“当前身份”对应tenantId。 | e974b0438b814fc08ec8e499643e530f | |
| userid | 是 | String | 注册天翼云账号的userid,也叫assumeUserId。从https://iam.ctyun.cn/overview/index 概览页面中账号信息栏获取,“当前用户”对应userid。 | 60b0d272307d408dacda2b16060962c8 |
请求体body参数 无
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 返回码 取值范围:800 成功 900失败 | 800 | |
| error | String | 接口访问失败的错误码,CTWAF_0001表示参数错误,CTWAF_0002表示业务错误 | CTWAF_0001 | |
| message | String | 接口访问成功或失败的描述信息 | 成功! | |
| returnObj | Object | 返回对象 | returnObj |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| blackWhiteListProtect | Array of Objects | 黑白名单防护 | blackWhiteListProtect | |
| botProtect | Array of Objects | Bot防护 | botProtect | |
| ccProtect | Array of Objects | CC安全防护 | ccProtect | |
| geoProtect | Array of Objects | 地域防护 | geoProtect | |
| preciseProtect | Array of Objects | 精准防护 | preciseProtect | |
| totalAttackTimes | Array of Objects | 攻击总量 | totalAttackTimes | |
| totalRequests | Array of Objects | 请求总量 | totalRequests | |
| webProtect | Array of Objects | web入侵防护 | webProtect |
表 blackWhiteListProtect
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| cnt | Integer | 次数,曲线的纵坐标 | 11 | |
| time | Integer | unix时间戳,精确到秒,曲线的横坐标 | 1678090541 |
表 botProtect
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| cnt | Integer | 次数,曲线的纵坐标 | 11 | |
| time | Integer | unix时间戳,精确到秒,曲线的横坐标 | 1678090541 |
表 ccProtect
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| cnt | Integer | 次数,曲线的纵坐标 | 11 | |
| time | Integer | unix时间戳,精确到秒,曲线的横坐标 | 1678090541 |
表 geoProtect
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| cnt | Integer | 次数,曲线的纵坐标 | 11 | |
| time | Integer | unix时间戳,精确到秒,曲线的横坐标 | 1678090541 |
表 preciseProtect
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| cnt | Integer | 次数,曲线的纵坐标 | 11 | |
| time | Integer | unix时间戳,精确到秒,曲线的横坐标 | 1678090541 |
表 totalAttackTimes
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| cnt | Integer | 次数,曲线的纵坐标 | 11 | |
| time | Integer | unix时间戳,精确到秒,曲线的横坐标 | 1678090541 |
表 totalRequests
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| cnt | Integer | 次数,曲线的纵坐标 | 11 | |
| time | Integer | unix时间戳,精确到秒,曲线的横坐标 | 1678090541 |
表 webProtect
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| cnt | Integer | 次数,曲线的纵坐标 | 11 | |
| time | Integer | unix时间戳,精确到秒,曲线的横坐标 | 1678090541 |
枚举参数
无
请求示例
请求url
无
请求头header
{
"tenantId": "562b89493b1a40e1b97ea05e50dd8170",
"userid": "60b0d272307d408dacda2b16060962c8"
}
请求体body
无
响应示例
{
"statusCode": 800,
"message": "成功!",
"returnObj": {
"totalRequests": [
{
"time": 1695093600,
"cnt": 1
},
{
"time": 1695105600,
"cnt": 2
},
{
"time": 1695107700,
"cnt": 1
},
{
"time": 1695111900,
"cnt": 1
},
{
"time": 1695192300,
"cnt": 2
},
{
"time": 1695192600,
"cnt": 1
},
{
"time": 1695192900,
"cnt": 1
},
{
"time": 1695193200,
"cnt": 1
},
{
"time": 1695195300,
"cnt": 2
},
{
"time": 1695201600,
"cnt": 1
},
{
"time": 1695279300,
"cnt": 2
},
{
"time": 1695284100,
"cnt": 1
},
{
"time": 1695284400,
"cnt": 1
},
{
"time": 1695284700,
"cnt": 1
},
{
"time": 1695285600,
"cnt": 1
},
{
"time": 1695285900,
"cnt": 2
},
{
"time": 1695286200,
"cnt": 3
}
],
"totalAttackTimes": [
{
"time": 1695093600,
"cnt": 1
},
{
"time": 1695105600,
"cnt": 0
},
{
"time": 1695107700,
"cnt": 1
},
{
"time": 1695111900,
"cnt": 0
},
{
"time": 1695192300,
"cnt": 1
},
{
"time": 1695192600,
"cnt": 0
},
{
"time": 1695192900,
"cnt": 0
},
{
"time": 1695193200,
"cnt": 0
},
{
"time": 1695195300,
"cnt": 0
},
{
"time": 1695201600,
"cnt": 0
},
{
"time": 1695279300,
"cnt": 1
},
{
"time": 1695284100,
"cnt": 1
},
{
"time": 1695284400,
"cnt": 2
},
{
"time": 1695284700,
"cnt": 1
},
{
"time": 1695285600,
"cnt": 1
},
{
"time": 1695285900,
"cnt": 2
},
{
"time": 1695286200,
"cnt": 2
}
],
"webProtect": [],
"ccProtect": [],
"preciseProtect": [],
"geoProtect": [],
"botProtect": [],
"blackWhiteListProtect": []
}
}
状态码
请参考 状态码
错误码
请参考 错误码