Query CC Attack QPS
| Name | Description |
|---|---|
startdateString | |
packageIdString | packageId or acctype should be selected at least one. |
needDetailString | need Detail : 1
no need Detail: 0 default : 1 |
enddateString | |
domainsString | |
customCodeString | custom code |
acctypeString | packageId or acctype should be selected at least one. acctype( Only One can be selected): gess,fsa,app-s,dms-https,wss, dms, wss-https,s-appa, wsa,esa,wsa-https |
| Name | Description |
|---|---|
msgString | response message |
timeString | Time of CC attack |
hitLong | Number of total requests |
hitdenyLong | Number of CC attack |
codeString | status code 200: success |
| Error code(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| 40000 | PARAM_ERROR_CODE | 200 | Parameter error |
| 40001 | CUSTOMER_NOT_EXIST | 200 | Customer does not exist. |
| 40002 | PACKAGE_NOT_EXIST | 200 | Package does not exist. |
| 40012 | TIME_PARAM_FORMATE_RROR | 200 | Format of time is not correct. |
| 40013 | TIME_PARAM_RANGE_ERROR | 200 | Range of time is not correct. |
| 500 | INTERNAL_ERROR_CODE | 200 | System Error |
#!/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://api.cdnetworks.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
}
}