跳转至

资源监控接口

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