CDN加速

文档中心 API文档 其他 查询DDoS防护带宽&攻击类型分布

查询DDoS防护带宽&攻击类型分布

更新时间:2020-07-30 11:45:30

适用产品:安全加速、Flood Shield

接口描述

查看客户遭受攻击的类型的分布以及攻击DDoS防护带宽

请求参数

ACCTYPE
ATTACKTYPES
BEGINTIME
CUSTOMER
ENDTIME
PEAKSTAT
PERSTAT
参数名称类型必填描述
产品外部服务类型String产品外部服务类型,只支持传1个:gess,fsa,app-s,dms-https,wss, dms, wss-https,s-appa, wsa,esa,wsa-https

返回参数

AT_BW
AT_BW>>ACCTYPE
AT_BW>>TIME
CODE
MSG
PEAKSTAT
PEAKSTAT>>ATFLOW
PEAKSTAT>>PEAKTIME
PEAKSTAT>>PEAKVALUE
PERSTAT
PERSTAT>>PERCENT
PERSTAT>>TOTALFLOW
PERSTAT>>TYPE
参数名称类型描述
已清洗带宽bps数据Array已清洗带宽bps数据

错误码

错误代码(code)描述(message)HTTP状态码语义
200SUCCESS200成功返回
300NO QUALIFYING DATA200没有数据
40001TIME PARAM FORMAT ERROR200时间格式错误
40002TIME PARAM RANGE ERROR200查询时间超过范围
40003PARAM ERROR200参数错误
500INTERNAL_ERROR_CODE200系统错误

示例

JSON
示例说明
请求示例
复制
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`

curl -i --url "https://open.chinanetcenter.com/wssService/QueryCleanBandwidthService" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H 'Content-Type: application/json' \
-d ' {
"beginTime":"2019-02-11 16:09:00",
"endTime":"2019-02-11 16:10:00",
"customer":"customer",
"accType":"dms-https",
"attackTypes":"1;2;3;4;10",
"peakStat":1,
"perStat":1
} '
返回示例
复制
{
  "result": {
    "peakStat": {
      "atFlow": 22.09,
      "peakTime": "2019-02-11 16:09:00",
      "peakValue": 89638.34,
      "billingValue": 89638.34
    },
    "at_bw": [
      {
        "icmp": 422.35,
        "time": "2019-02-11 16:09:00",
        "other": 0,
        "syn": 89215.99,
        "ack": 0,
        "udp": 0,
        "value": 89638.34
      },
      {
        "icmp": 425.71,
        "time": "2019-02-11 16:10:00",
        "other": 0,
        "syn": 86635.25,
        "ack": 0,
        "udp": 0,
        "value": 87060.96
      }
    ],
    "perStat": [
      {
        "percent": 0,
        "totalFlow": 0,
        "type": "ACK FLOOD"
      },
      {
        "percent": 99.52,
        "totalFlow": 21.98,
        "type": "SYN FLOOD"
      },
      {
        "percent": 0,
        "totalFlow": 0,
        "type": "UDP FLOOD"
      },
      {
        "percent": 0.48,
        "totalFlow": 0.11,
        "type": "ICMP FLOOD"
      },
      {
        "percent": 0,
        "totalFlow": 0,
        "type": "OTHER FLOOD"
      }
    ]
  },
  "code": "200",
  "msg": "成功"
}