You need to enable JavaScript to run this app.
导航

查询拨测统计数据

最近更新时间2024.03.15 18:08:32

首次发布时间2023.10.13 14:33:20

API 说明

  • API 名称:GetOlapData
  • API 域名:cloud-detect.volcengineapi.com
  • API 描述:获取多维分析数据。

使用限制

节流限制:您每秒最多可以提交 5 个 API 请求。

请求方法

POST

请求鉴权

每个请求中必须包含鉴权信息。该鉴权信息用以验证请求者的身份。参见请求鉴权

公共参数

公共参数包含在查询字符串中。

参数名称
数据类型
是否必选
参数说明
Action
String
表示 API 的名称。该参数的取值是 GetOlapData
Version
String
表示 API 的版本。该参数的取值是 2023-08-31

请求参数

表格中参数的类型是请求正文参数。

参数名称
数据类型
是否必选
参数说明
示例
start_time
Long
查询开始时间。格式为 Unix 时间戳(秒)。
1695040266
end_time
Long
查询结束时间。格式为 Unix 时间戳(秒)。
1695299466
granularity
String

时间分组粒度:

  • second:一秒
  • ten_minute:十分钟
  • five_minute:五分钟
  • minute:一分钟
  • hour:一小时
  • day:一天
  • week:一周
"second"
filters
Object[]
筛选条件。
groups
Object[]
分组条件。
measures
Object[]
查询指标。
timezone
String
时区。格式参见 Time Zone Database
"Asia/Shanghai"
prev
String
同环比参数。格式为 "{n}_{day/hour}",其中 n 为数值。
"1_day"
topn
Object
TopN 参数。

返回参数

参数名称
数据类型
参数说明
示例值
groups
Object[]
分组数据。
measures
Object[]
指标数据。
prev_measures
Object[]
同环比指标数据。

示例

请求示例

POST https://cloud-detect.volcengineapi.com?Action=GetOlapData&Version=2023-08-31
{
    "timezone": "Asia/Shanghai",
    "granularity": "hour",
    "filters": [
        {
            "key": "target.addr",
            "type": "in",
            "values": [
                "[fdbd:dc01:16::90]",
                "[fdbd:dc01:fe:100a::1]",
                "10.15.63.90"
            ]
        }
    ],
    "groups": [
        {
            "key": "client.province.name"
        }
    ],
    "measures": [
        {
            "key": "success.proportion"
        }
    ],
    "start_time": 1695040266,
    "end_time": 1695299466
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "20230921203134511034E384BB822811ED",
    "Action": "GetOlapData",
    "Version": "2023-08-31",
    "Service": "cloud_detect",
    "Region": "cn-north-1"
  },
  "Result": [
    {
      "groups": [
        {
          "key": "client.province.name",
          "value": "\"山西\""
        }
      ],
      "measures": [
        {
          "key": "success.proportion",
          "value": "1.0425431069446676"
        }
      ]
    },
    {
      "groups": [
        {
          "key": "client.province.name",
          "value": "\"河北\""
        }
      ],
      "measures": [
        {
          "key": "success.proportion",
          "value": "23.14745390518418"
        }
      ]
    },
    {
      "groups": [
        {
          "key": "client.province.name",
          "value": "\"河南\""
        }
      ],
      "measures": [
        {
          "key": "success.proportion",
          "value": "58.575512148642204"
        }
      ]
    }
  ]
}