docs
api
Web Application Firewall(UEWAF)
AddAntiCCRule

Add CC Defense Rule - AddAntiCCRule

Overview

Add CC Defense Rule

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is AddAntiCCRule.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, and the sub-account must be filled in. Please refer to the GetProjectList interface.No
DomainstringDomain name to add protection rulesYes
ReqsintThe number of requests within the statistical durationYes
URLstringuri, eg: /index.htmlYes
ModestringMatching mode, equal: exact match; contains: includesYes
DurationintStatistical duration, unit: secondsYes
ActionTypestringActions to be executed after matching, forbidden: intercept request; captcha: verification code; iptables: IP blockingYes
ValidityintAction Validity Period, Unit: MinutesYes

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

Example

Request Example

https://api.surfercloud.com/?Action=AddAntiCCRule
&ProjectId=org-xxx
&Domain=www.test.com
&Reqs=55000
&URL=/index.html
&Mode=equal
&Duration=2800
&ActionType=forbidden
&Validity=5720

Response Example

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