# Batch Copy WAF Rules - CopyWafDomainRules

## Overview

Batch copy of WAF rules, currently supports the copying of protection rules, CC rules, malicious IP punishment rules, blacklist and whitelist, and return code protection rules.






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `CopyWafDomainRules`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.genesissai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the [GetProjectList interface](/docs/api/summary/get_project_list). |No|
| **FullDomain** | string | Source Domain |**Yes**|
| **DestDomain.N** | string | Destination Domain Name |**Yes**|
| **RuleType** | string | Rule Type, CCRule: CC Rule; ProtectionRule: Protection Rule; AutoBlacklistRule: Automatic Blocking Rule; HTTPDisguiseRule: Information Protection Rule; RegionBlockRule: Regional Blocking Rule; WhiteList: Whitelist Rule; BlackList: Blacklist Rule. |**Yes**|
| **RuleID.N** | string | Source rule ID to be copied |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|




## Example

### Request Example
    
```
https://api.genesissai.com/?Action=CopyWafDomainRules
&ProjectId=org-xxx
&FullDomain=www.test.com
&DestDomain.0=www.test1.com
&DestDomain.1=www.test2.com
&RuleType=CCRule
&Append=false
&RuleID.n=mxfzhHpS
```

### Response Example
    
```json
{
  "Action": "CopyWafDomainRulesResponse",
  "RetCode": 0
}
```





