Import and Export CSA Custom Rules
Use this endpoint to manage the custom rules for CSA. Custom rules are the rules defined by domain specific language (DSL) specifications. This endpoint enables you to import and export your custom rules to and from the Netskope UI for use in profiles and policies. Whenever you change a rule, be sure to click Apply Changes in the Netskope UI. You can import or export up to 500 custom rules in one API call.
Request Endpoint
https://<tenant-name>.goskope.com/api/v1/public_cloud/rules?token=<token>&<parameters>
Import Custom Rules
Valid parameters include:
Key | Type | Value | Description |
---|---|---|---|
| string |
| Operation performed. |
| JSON array of object | { "rule_name": "<rule_name>", "description": "<description_optional>", "remediation_steps": "<remediation_optional>", "severity": "<Critical|High|Medium|Low>", "code": "<code>", "cloud_provider": "<aws|googlecloud|azure>" } | List of rules to import. |
| string |
| The IaaS platform provider. |
| string | Required | Name of the custom rule. |
| string | Optional | Description of the custom rule. |
| string | Optional | Remediation text for the rule. |
| string |
| Severity of the custom rule. |
| string | Ex: | DSL specification code. |
| string | Ex: | Email address |
Example Import Request
POST 'https://<tenant-name>.goskope.com/api/v1/public_cloud/rules?token=f39866cb86ab84a0208e9e1ee&op=import' --header 'Content-Type: application/json' --data-raw '{
"rules": [
{
"rule_name": "AWS_C3",
"description": "",
"remediation_steps": "",
"severity": "High",
"code": "RedShiftCluster should have LoggingEnabled eq true",
"cloud_provider": "aws"
},
{
"rule_name": "AWS_C4",
"description": "",
"remediation_steps": "",
"severity": "High",
"code": "RedShiftCluster should have LoggingEnabled eq true",
"cloud_provider": "aws"
}
],
"modify_by": "admin@netskope.com"
}'
Export Custom Rules
Valid parameters include:
Key | Type | Value | Description |
---|---|---|---|
| string |
| Operation performed. |
| string |
| The IaaS platform provider. |
| string |
| Severity of the custom rule. |
| string | Ex: | Filter with deployed rules. |
Example Export Request
GET 'https://<tenant-name>.goskope.com/api/v1/public_cloud/rules?token=f39866cb86ab84a0208e9e1ee&op=export&severity=Critical|High&cloud_provider=aws'