DescribeBandwidthClusterTraffic

1. 接口描述

调用本接口用于查询带宽组指定时间段内的流量信息。

注意事项

  • 开始时间和结束时间的跨度不能超过一天。

  • 只能查询30天内的流量数据。

2. 请求参数

以下请求参数列表仅列出了接口中需要的请求参数

3. 响应结果

4. 代码示例

  1. 查询实例一天内的流量数据。

POST /api/v2/traffic HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeBandwidthClusterTraffic
<Common Request Params>

Request:
{
  "bandwidthClusterId": "bandwidthClusterId",
  "startTime": "2024-01-01T00:00:00Z",
  "endTime": "2024-01-01T23:59:59Z"
}

Response:
{
  "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
  "response": {
    "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
    "dataList": [
      {
        "internetRX": 873034,
        "internetTX": 11971,
        "time": "2024-01-01T00:00:00Z"
      },
      {
        "internetRX": 873034,
        "internetTX": 11971,
        "time": "2024-01-01T00:05:00Z"
      },
      {
        "internetRX": 635218,
        "internetTX": 9028,
        "time": "2024-01-01T00:10:00Z"
      }
    ],
    "in95": 873034,
    "in95Time": "2024-01-01T00:00:00Z",
    "inAvg": 793762,
    "inMax": 873034,
    "inMin": 635218,
    "inTotal": 89298270,
    "maxBandwidth95ValueMbps": 0.88,
    "out95": 11971,
    "out95Time": "2024-01-01T00:00:00Z",
    "outAvg": 10990,
    "outMax": 11971,
    "outMin": 9028,
    "outTotal": 1236457,
    "totalUnit": "B",
    "unit": "bps"
  }
}

5. 开发者工具

Zenlayer Cloud API 2.0 提供了配套的开发工具集(SDK),未来会陆续支持更多开发语言,方便快速接入和使用Zenlayer的产品和服务。

6. 错误码

下面包含业务逻辑中遇到的错误码,其他错误码见公共错误码

最后更新于