QueryExactRuleListByDomain(Access Control)

更新時間: 2023-04-28 18:15:59

Query rule list based on domain name(Advanced Access Control)

  • 単一ユーザーの使用頻度: 300/5min
  • 使用できるプロダクト: API Shield,Application Shield,Flood Shield,Bot Shield,Web Application Firewall

リクエストパラメータ

Body パラメータ

パラメータ名説明
*serviceTypeString
Service name. WAF:Web Application Firewall BOT:Bot Shield API:API Shield DDoS:DDoS Protection
*domainListList
Related domain.

レスポンスパラメータ

Body パラメータ

パラメータ名説明
codeString
Status code, success is '200'.
messageString
Return message, success is 'Success'.
dataResp
Data returned
ruleIdString
Rule id.
ruleNameString
Rule Name.
ruleDescriptionString
Rule Description.
actionString
Action. 0:Bypass 1:Block 2:Log
deployContentList
Match Condition.
matchConditionString
Matching condition type. 0:IP 1:IP Segment 2:URI 3:User-Agent 4:Cookie 5:Referer 6:HTTP Header 7:Area 8:HTTP Method 9:Path
operatorString
Matching condition operation. 0:= 1:!= 2:Empty or doesn't exist 3:=(Regex) 4:!=(Regex)
firstConditionString
First Condition.
secondConditionString
Second Condition.

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
22994001CUSTOMER_NOT_EXIST200customer not exist
22995000INTERNAL_ERROR_CODE200internal error
22994000 PARAM_ERROR_CODE200param error
22994100ACCESS_ERROR_NOT_OPEN200The Account is not open service

入力例

QUERYEXACTRULELISTBYDOMAIN
QUERYEXACTRULELISTBYDOMAIN
リクエスト例
コピー コピー完了
#!/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/api/bot/exact/query-exact-rulelist-by-domain
-X "POST"  \
-u "$username:$password"  \
-H "Date: $date"   \
-H "Accept: application/json"  \
-H "Content-Type: application/json" \
-d '{
"serviceType":"BOT",
"domainList":["xxx.com"]
}'
レスポンス例
コピー コピー完了
{
    "message": "Success",
    "code": "200",
    "data": {
        "totalNum": 13,
        "list": [
            {
                "ruleId": 20619,
                "ruleName": "20230209guoguo3",
                "ruleDescription": "",
                "ruleAction": "0",
                "deployContent": [
                    {
                        "matchCondition": "0",
                        "operator": "0",
                        "firstCondition": [
                            "1.1.1.1",
                            "2.2.2.2",
                            "3.3.3.3"
                        ],
                        "secondCondition": []
                    }
                ]
            }
        ]
    }
}