Docs
api
Web Application Firewall(UEWAF)
AddWafDomainBlackList

Add Domain Blacklist - AddWafDomainBlackList

Overview

Add Domain Blacklist

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is AddWafDomainBlackList.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
ProjectIdstringProject 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
FullDomainstringDomain to be added to the blacklistYes
SourcestringBlacklist source, User-defined(custom)/Machine behavior detection(bot)/ bot-rule/ auto (automatic blocking rules)Yes
TypestringType: Domestic (internal), Overseas (oversea), Custom (custom)Yes
ActionTypestringExecute action: Optional values: Intercept request (forbidden), Verification code (captcha)Yes
ExpireTimeintExpiration time, that is, the effective duration, the unit is seconds, pass 0 for never expire.Yes
RecordIdintDomain Record IDNo
DestIpstringTarget IP; Pass when Source is botNo
CIDRS.NstringIP, subnet or IP range, pass array; Required when type is customNo
RemarkstringNote InformationNo
NamestringNameNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
IdintReturned domain blacklist ID after successful additionNo

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
}