docs
api
Web Application Firewall(UEWAF)
AddAutoWafDomainBlackList

Create Automatic Interception Strategy Interface - AddAutoWafDomainBlackList

Overview

When an attack is detected, the source IP of the access is automatically added to the blacklist.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is AddAutoWafDomainBlackList.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
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, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
FullDomainstringThe domain name for defense can only be selected from the added domain names.Yes
AttackTypestringAttack statistics type, all selected by default; Parameter options: protocol: Protocol violation, xss: XSS attack, sql: SQL injection, loopholes: Vulnerability attack, exec: Command execution, webshell: WebShell upload, eaa: Unauthorized access, infoleak: Information leakage, scan: Malicious scanning, cc: CC attack, other: OthersNo
ActionTypestringAction after detecting an attack, default is forbidden, captcha is supportedNo
ExpireTimeintSet the expiration time for adding to the blacklist, in minutes. 0 means it is always valid, default is 60 minutes.No
AttackCountintAttack threshold, default is 10No
IntervalintAttack statistics interval, in seconds, default is 60 secondsNo

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
IdintThe returned policy ID after successful additionNo

Example

Request Example

https://api.surfercloud.com/?Action=AddAutoWafDomainBlackList
&ProjectId=org-xxx
&FullDomain=www.test.com
&ActionType=forbidden
&State=Enable
&ExpireTime=60
&AttackCount=10
&Interval=60

Response Example

{
  "Action": "AddAutoWafDomainBlackListResponse",
  "Id": 8,
  "RetCode": 0
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved