Modify CC Defense Rules - ModifyAntiCCRule
Overview
Modify CC Defense Rules
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is ModifyAntiCCRule . | 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 |
ID | int | The rule ID to be modified | Yes |
Reqs | int | Number of requests within the statistical duration | Yes |
URL | string | Requested URI | Yes |
Mode | string | URI matching patterns, equal: exact match;, contains: includes; | Yes |
Duration | int | Duration statistics, unit: seconds | Yes |
ActionType | string | Actions to be executed after the trigger condition, forbidden: Block request; captcha: Verification code; iptables: IP blocking | Yes |
Validity | int | Action Validity Period, Unit: Minutes | Yes |
Domain | string | Add domain for CC protection rules | Yes |
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 |
Example
Request Example
https://api.dezai.com/?Action=ModifyAntiCCRule
&ProjectId=org-xxx
&ID=44451
&Domain=www.test.com
&Reqs=100
&URL=/index.html
&Mode=equal
&Duration=60
&ActionType=forbidden
&Validity=60
Response Example
{
"Action": "ModifyAntiCCRuleResponse",
"RetCode": 0
}