Skip to content

资源监控

GET 获取参数

GET /prod-api/cdn/layer7/attackStatistic/initData

请求参数

名称 位置 类型 必选 说明
Authorization header string none

返回示例

{
  "msg": "操作成功",
  "code": 200,
  "data": {
    "params": {},
    "pageNum": null,
    "pageSize": null,
    "userId": null,
    "packageList": [
      {
        "name": "测试WAF",
        "alias": "11123",
        "oid": "2022123456808922"
      },
      {
        "name": "waf测试套餐",
        "alias": "1111122",
        "oid": "2023123456"
      }
    ],
    "domains": [
      {
        "label": "hrs.demo.cn",
        "value": "hrs.demo.cn"
      },
      {
        "label": "zb.demo.com",
        "value": "zb.demo.com"
      }
    ],
    "beginTimeDate": null,
    "endTimeDate": null
  }
}

401 Response

{}

返回结果

状态码 状态码含义 说明 数据模型
200 OK none Inline
401 Unauthorized none Inline
403 Forbidden none Inline
404 Not Found none Inline

返回数据结构

状态码 200

名称 类型 必选 约束 中文名 说明
» msg string true none none
» code integer true none none
» data object true none none
»» params object true none none
»» pageNum null true none none
»» pageSize null true none none
»» userId null true none none
»» packageList [object] true none 套餐列表 none
»»» name string true none none
»»» alias string true none none
»»» oid string true none none
»» domains [object] true none 域名列表 none
»»» label string true none none
»»» value string true none none
»» endTimeDate null true none none
»» beginTimeDate null true none none

微服务/安全加速/七层 数据统计接口

POST 查询访问监控数据

POST /prod-api/cdn/layer7/statistic/describeL7Data

Body 请求参数

{
  "interval": "1m",
  "domains": [],
  "terminal": "cdn",
  "params": {
    "beginTime": "2023-12-26 00:00:00",
    "endTime": "2024-01-25 23:59:59"
  },
  "action": [
    {
      "metricName": "trafficTrend"
    }
  ]
}

请求参数

名称 位置 类型 必选 中文名 说明
Authorization header string none
body body object none
» action body [Action] metricName:“trafficTrend(流量统计图)”
»» Action body Action Action none
»»» metricName body string none
»»» pageNo body integer(int32) none
»»» pageSize body integer(int32) none
» domains body [string] none
» interval body string 统计粒度 1m:1分钟
» mostDimension body string none
» otherFilter body [StatisticOtherFilterVO] none
»» StatisticOtherFilterVO body StatisticOtherFilterVO StatisticOtherFilterVO none
»»» oneVal body string none
»»» threeVal body [string] none
»»» threeVals body [string] none
»»» twoVal body string none
» pageNum body integer(int32) 当前页数 none
» pageSize body integer(int32) 每页显示条目个数 none
» params body object none
»» beginTime body string 开始时间 none
»» endTime body string 结束时间 none
» userId body integer(int64) none
» terminal body string cdn:访问数据

详细说明

» action: metricName:“trafficTrend(流量统计图)” metricName:“trafficRank(流量数据展示)” metricName:“totalTraffic(流量数据概览)” metricName:“bandwidthTrend(带宽统计图)” metricName:“bandwidthRank(带宽数据展示)” metricName:“totalRequest(总请求数)” metricName:“requestTrend(请求数统计图)” metricName:“requestRank(请求数数据展示)”

» interval: 1m:1分钟 5m:5分钟 1h:1小时 1d:1天

» terminal: cdn:访问数据 source:回源数据

返回示例

{
  "msg": "操作成功",
  "code": 200,
  "data": [
    {
      "metricName": "trafficTrend",
      "data": {
        "trend": [
          [
            1703520060000,
            4073165.8
          ],
          [
            1703520120000,
            1942074.2
          ]
        ]
      }
    }
  ]
}

201 Response

{}

返回结果

状态码 状态码含义 说明 数据模型
200 OK none Inline
201 Created none Inline
401 Unauthorized none Inline
403 Forbidden none Inline
404 Not Found none Inline

返回数据结构

状态码 200

名称 类型 必选 约束 中文名 说明
» msg string true none none
» code integer true none none
» data object true none none
»» cnd object true none none
»»» totalTraffic object true none none
»»»» value string true none 访问流量 none
»» source object true none none
»»» totalTraffic object true none none
»»»» value string true none 回源流量 none
» bandwidth95Peak string true none 95峰值带宽 none
» totalRequest object true none none
»» value string true none 总请求数 none
» topBandwidth object true none none
»» value string true none 带宽峰值 none
»» date string true none 带宽峰值时间 none

POST 查询高级监控数据

POST /prod-api/cdn/layer7/statistic/describeL7MostData

Body 请求参数

{
  "mostDimension": "trafficSum",
  "interval": "1m",
  "params": {
    "beginTime": "2024-01-24 00:00:00",
    "endTime": "2024-01-24 23:59:59"
  },
  "action": [
    {
      "pageSize": 10,
      "pageNo": 1,
      "metricName": "url"
    }
  ],
  "domains": [],
  "otherFilter": []
}

请求参数

名称 位置 类型 必选 中文名 说明
Authorization header string none
body body object none
» action body [Action] metricName:“ip(来源IP)”
»» Action body Action Action none
»»» metricName body string none
»»» pageNo body integer(int32) none
»»» pageSize body integer(int32) none
» domains body [string] none
» interval body string 统计粒度 1m:1分钟
» pageNum body integer(int32) 当前页数 none
» pageSize body integer(int32) 每页显示条目个数 none
» params body object none
»» beginTime body string 开始时间 none
»» endTime body string 结束时间 none
» terminal body string cnd:访问数据
» userId body integer(int64) none
» mostDimension body string requestCount:请求数
» otherFilter body [string] none

详细说明

» action: metricName:“ip(来源IP)” metricName:“http_user_agent(客户端)” metricName:“domain(域名)” metricName:“url(URL)” metricName:“status(状态码)” metricName:“request_method(请求方法)” metricName:“referer(referer)” metricName:“protocol(协议)” metricName:“server_port(端口)” metricName:“ua_os_name(操作系统)” metricName:“hostname(检测节点)” metricName:“country_name(国家/地区)” metricName:“city_name(城市)” metricName:“timezone(时区)” metricName:“scheme(场景)”

» interval: 1m:1分钟 5m:5分钟 1h:1小时 1d:1天

» terminal: cnd:访问数据 source:回源数据

» mostDimension: requestCount:请求数 trafficSum:流量

返回示例

{
  "msg": "操作成功",
  "code": 200,
  "data": [
    {
      "metricName": "url",
      "data": {
        "total": 1592915833.2,
        "list": [
          {
            "name": "/",
            "value": 4125457504.9
          }
        ],
        "termsCount": 73673
      }
    }
  ]
}

201 Response

{}

返回结果

状态码 状态码含义 说明 数据模型
200 OK none Inline
201 Created none Inline
401 Unauthorized none Inline
403 Forbidden none Inline
404 Not Found none Inline

返回数据结构

状态码 200

名称 类型 必选 约束 中文名 说明
» msg string true none none
» code integer true none none
» data object true none none

数据模型

Action

{
  "metricName": "string",
  "pageNo": 0,
  "pageSize": 0
}

Action

属性

名称 类型 必选 约束 中文名 说明
metricName string false none none
pageNo integer(int32) false none none
pageSize integer(int32) false none none

L7QueryStatisticVO

{
  "action": [
    {
      "metricName": "string",
      "pageNo": 0,
      "pageSize": 0
    }
  ],
  "domains": [
    "string"
  ],
  "interval": "string",
  "mostDimension": "string",
  "otherFilter": [
    {
      "oneVal": "string",
      "threeVal": [
        "string"
      ],
      "threeVals": [
        "string"
      ],
      "twoVal": "string"
    }
  ],
  "pageNum": 0,
  "pageSize": 0,
  "params": {
    "beginTime": "string",
    "endTime": "string"
  },
  "terminal": "string",
  "userId": 0
}

L7QueryStatisticVO

属性

名称 类型 必选 约束 中文名 说明
action [Action] true none none
domains [string] false none none
interval string true none 统计粒度 1m:1分钟
5m:5分钟
1h:1小时
1d:1天
mostDimension string true none none
otherFilter [StatisticOtherFilterVO] false none none
pageNum integer(int32) true none 当前页数 none
pageSize integer(int32) true none 每页显示条目个数 none
params object false none none
» beginTime string true none 开始时间 none
» endTime string true none 结束时间 none
terminal string false none cnd:访问数据
source:回源数据
userId integer(int64) false none none

StatisticOtherFilterVO

{
  "oneVal": "string",
  "threeVal": [
    "string"
  ],
  "threeVals": [
    "string"
  ],
  "twoVal": "string"
}

StatisticOtherFilterVO

属性

名称 类型 必选 约束 中文名 说明
oneVal string false none none
threeVal [string] false none none
threeVals [string] false none none
twoVal string false none none