跳转至

Authentication

数据统计接口

POST 查询访问监控数据 statistics:access:query

POST /prod-apicdn/layer7/statistic/v2/describeL7Data

Body 请求参数

{
  "interval": "1m",
  "params": {
    "beginTime": "2025-04-09 00:00:00",
    "endTime": "2025-04-09 23:59:59"
  },
  "action": [
    {
      "metricName": "trafficTrend"
    },
    {
      "metricName": "bandwidthTrend"
    },
    {
      "metricName": "requestTrend"
    },
    {
      "metricName": "statusCodeTrend"
    },
    {
      "metricName": "requestTimeTrend"
    },
    {
      "pageSize": 10,
      "pageNo": 1,
      "metricName": "trafficRank"
    },
    {
      "pageSize": 10,
      "pageNo": 1,
      "metricName": "requestRank"
    }
  ],
  "domains": []
}

请求参数

名称 位置 类型 必选 中文名 说明
Authorization header string -
body body object -
» action body [object] -
»» metricName body string 数据名称 metricName:“trafficTrend(流量统计图)”
»» pageNo body integer(int32) 当前页数 -
»» pageSize body integer(int32) 每页显示条目个数 -
» domains body [string] 域名 -
» interval body string 统计粒度 1m:1 分钟 5m:5 分钟 1h:1 小时 1d:1 天
» params body object -
»» beginTime body string 开始时间 -
»» endTime body string 结束时间 -

详细说明

»» metricName: metricName:“trafficTrend(流量统计图)” metricName:“trafficRank(流量数据概览)” metricName:“bandwidthTrend(带宽统计图)” metricName:“requestTrend(请求数统计图)” metricName:“requestRank(请求数据概览)” metricName:“statusCodeTrend(状态码统计图)” metricName:“statusCodeRank(状态码数据概览)” metricName:“requestTimeTrend(请求平均时长统计图)”

返回示例

{
  "msg": "成功",
  "code": 200,
  "data": [
    {
      "metricName": "trafficTrend",
      "objectArrayListMap": {
        "upstreamBytesSent": [],
        "totalBytesSent": [],
        "bytesSent": []
      },
      "totalMap": {
        "upstreamBytesSent": 0,
        "totalBytesSent": 0,
        "bytesSent": 0
      }
    },
    {
      "metricName": "trafficRank",
      "list": [],
      "total": 0
    }
  ]
}
{
  "msg": "成功",
  "code": 200,
  "data": [
    {
      "metricName": "trafficTrend",
      "objectArrayListMap": {
        "upstreamBytesSent": [],
        "totalBytesSent": [],
        "bytesSent": []
      },
      "totalMap": {
        "upstreamBytesSent": 0,
        "totalBytesSent": 0,
        "bytesSent": 0
      }
    },
    {
      "metricName": "bandwidthTrend",
      "objectArrayListMap": {
        "upstreamBytesSent": [],
        "totalBytesSent": [],
        "bytesSent": []
      },
      "maxMap": {
        "upstreamBytesSent": 0,
        "totalBytesSent": 0,
        "bytesSent95Peak": 0,
        "bytesSent": 0,
        "totalBytesSent95Peak": 0,
        "upstreamBytesSent95Peak": 0
      }
    },
    {
      "metricName": "requestTrend",
      "objectArrayListMap": {
        "requestCounter": []
      },
      "totalMap": {
        "requestCounter": 0
      }
    },
    {
      "metricName": "statusCodeTrend",
      "objectArrayListMap": {
        "list5xx": [],
        "list4xx": [],
        "list3xx": [],
        "list2xx": [],
        "list1xx": []
      },
      "totalMap": {
        "1xx": 0,
        "2xx": 0,
        "3xx": 0,
        "4xx": 0,
        "5xx": 0
      }
    },
    {
      "metricName": "requestTimeTrend",
      "objectArrayListMap": {
        "requestTime": []
      }
    },
    {
      "metricName": "trafficRank",
      "list": [],
      "total": 0
    },
    {
      "metricName": "requestRank",
      "list": [],
      "total": 0
    }
  ]
}

201 Response

{}

返回结果

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

返回数据结构

状态码 200

名称 类型 必选 约束 中文名 说明
» msg string true - -
» code integer true - -
» data [object] true - -
»» metricName string true - 数据名称 metricName:“trafficTrend(流量统计图)”
metricName:“trafficRank(流量数据概览)”
metricName:“bandwidthTrend(带宽统计图)”
metricName:“requestTrend(请求数统计图)”
metricName:“requestRank(请求数数据概览)”
metricName:“statusCodeTrend(状态码统计图)”
metricName:“statusCodeRank(状态码数据概览)”
metricName:“requestTimeTrend(请求平均时长统计图)”
»» objectArrayListMap object true - 统计图 -
»»» upstreamBytesSent [string] false - 上行统计图 -
»»» totalBytesSent [string] false - 总统计图 -
»»» bytesSent [string] false - 下行统计图 -
»»» requestCounter [string] false - 总请求数统计图 -
»»» list5xx [string] false - 5xx 统计图 -
»»» list4xx [string] false - 4xx 统计图 -
»»» list3xx [string] false - 3xx 统计图 -
»»» list2xx [string] false - 2xx 统计图 -
»»» list1xx [string] false - 1xx 统计图 -
»»» requestTime [string] true - 请求平均时长统计图 -
»» totalMap object true - 统计数据 -
»»» upstreamBytesSent integer false - 上行数量 -
»»» totalBytesSent integer false - 总数量 -
»»» bytesSent integer false - 下行数量 -
»»» requestCounter integer false - 总请求数 -
»»» 1xx integer true - 1xx -
»»» 2xx integer true - 2xx -
»»» 3xx integer true - 3xx -
»»» 4xx integer true - 4xx -
»»» 5xx integer true - 5xx -
»» maxMap object false - -
»»» upstreamBytesSent integer true - 上行数量 -
»»» totalBytesSent integer true - 总数量 -
»»» bytesSent95Peak integer true - 下行 95 数量 -
»»» bytesSent integer true - 下行数量 -
»»» totalBytesSent95Peak integer true - 总的 95 数量 -
»»» upstreamBytesSent95Peak integer true - 上行 95 数量 -
»» list [string] true - -
»» total integer true - -

数据模型

Action

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

Action

属性

名称 类型 必选 约束 中文名 说明
metricName string false - -
pageNo integer(int32) false - 当前页数 -
pageSize integer(int32) false - 每页显示条目个数 -

StatisticOtherFilterVO

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

StatisticOtherFilterVO

属性

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

L7QueryStatisticV2VO

{
  "action": [
    {
      "metricName": "string",
      "pageNo": 0,
      "pageSize": 0
    }
  ],
  "domains": ["string"],
  "interval": "string",

  "otherFilter": [
    {
      "oneVal": "string",
      "threeVal": ["string"],

      "twoVal": "string"
    }
  ],
  "pageNum": 0,
  "pageSize": 0,
  "params": {
    "beginTime": "string",
    "endTime": "string"
  }
}

L7QueryStatisticV2VO

属性

名称 类型 必选 约束 中文名 说明
action [Action] true - -
domains [string] true - 域名 -
interval string true - 统计粒度 1m:1 分钟 5m:5 分钟 1h:1 小时 1d:1 天
otherFilter [StatisticOtherFilterVO] false - -
pageNum integer(int32) false - -
pageSize integer(int32) false - -
params object true - -
» beginTime string true - 开始时间 -
» endTime string true - 结束时间 -