Add Domain Blacklist - AddWafDomainBlackList
Overview
Add Domain Blacklist
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is AddWafDomainBlackList . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface. | No |
FullDomain | string | Domain to be added to the blacklist | Yes |
Source | string | Blacklist source, User-defined(custom)/Machine behavior detection(bot)/ bot-rule/ auto (automatic blocking rules) | Yes |
Type | string | Type: Domestic (internal), Overseas (oversea), Custom (custom) | Yes |
ActionType | string | Execute action: Optional values: Intercept request (forbidden), Verification code (captcha) | Yes |
ExpireTime | int | Expiration time, that is, the effective duration, the unit is seconds, pass 0 for never expire. | Yes |
RecordId | int | Domain Record ID | No |
DestIp | string | Target IP; Pass when Source is bot | No |
CIDRS.N | string | IP, subnet or IP range, pass array; Required when type is custom | No |
Remark | string | Note Information | No |
Name | string | Name | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Id | int | Returned domain blacklist ID after successful addition | No |
Example
Request Example
https://api.dezai.com/?Action=AddWafDomainBlackList
&ProjectId=org-xxx
&FullDomain=www.test.com
&Source=custom
&Type=custom
&ActionType=forbidden
&CIDRS.0=2.2.2.2
&ExpireTime=10
&Remark=test
&Name=DqXFAQfT
Response Example
{
"Action": "AddWafDomainBlackListResponse",
"Id": 6,
"RetCode": 0
}