CDN加速

文档中心 API文档 其他 查看客户遭受CC攻击的QPS

查看客户遭受CC攻击的QPS

更新时间:2020-09-23 10:47:17
适用产品:安全加速、Flood Shield

接口描述

查看客户遭受CC攻击的QPS

请求参数

参数名称类型必填描述
acctypestringpackageId和acctype不能同时传且至少传一个;产品外部服务类型,只支持传1个:gess,fsa,app-s,dms-https,wss, dms, wss-https,s-appa, wsa,esa,wsa-https

返回参数

参数名称类型描述
codestring状态码,成功为200;失败见“错误码”信息

错误码

错误代码(code)描述(message)HTTP状态码语义
40000PARAM_ERROR_CODE200参数错误
40001CUSTOMER_NOT_EXIST200客户不存在
40002PACKAGE_NOT_EXIST200套餐不存在
40012TIME_PARAM_FORMATE_RROR200时间格式错误
40013TIME_PARAM_RANGE_ERROR200时间区间错误
500INTERNAL_ERROR_CODE200系统错误

示例

示例说明
请求示例
复制
#!/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/soc/api/report/QueryCCAttackQPS" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H 'Content-Type: application/json' \
-d '{
"customCode": "sectest2018",
"acctype": "dms",
"startdate": "2018-08-01 00:00:00",
"enddate": "2018-08-31 00:00:00"
}'
返回示例
复制
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "time": "2018-08-27 01:05:00",
      "hit": 45,
      "hitdeny": 10
    },
    {
      "time": "2018-08-27 02:15:00",
      "hit": 55,
      "hitdeny": 20
    }
  ],
  "peakStat": {
    "peakTime": "2018-08-27 02:00:00",
    "peakValue": 315
  }
}