This API is used to create an information leakage protection rule.
POST /v1/{project_id}/waf/policy/{policy_id}/antileakage
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
project_id |
policy_id |
Yes |
String |
Policy ID. It can be obtained by calling the ListPolicy API. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
auth token |
Content-Type |
Yes |
String |
Content type. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
url |
Yes |
String |
URL to which the rule applies. |
category |
Yes |
String |
Sensitive information type in the information leakage prevention rule. |
contents |
Yes |
Array of strings |
Content corresponding to the sensitive information type. Multiple options can be set. |
action |
Yes |
action object |
Protective action of the Antileakage rule |
description |
No |
String |
Rule description |
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
id |
String |
Rule ID |
url |
String |
URL to which the rule applies. |
category |
String |
Sensitive information type in the information leakage prevention rule. |
contents |
Array of strings |
Content corresponding to the sensitive information type. Multiple options can be set. |
timestamp |
Long |
Timestamp when the rule was created. |
description |
String |
Rule description. |
status |
Integer |
Rule status. The value can be: |
Status code: 400
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 401
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
POST https://{Endpoint}/v1/{project_id}/waf/policy/{policy_id}/antileakage?
{
"url" : "/attack",
"category" : "sensitive",
"contents" : [ "id_card" ],
"action" : {
"category" : "block"
}
}
Status code: 200
Request succeeded.
{
"id" : "82c4f04f84fd4b2b9ba4b4ea0df8ee82",
"policyid" : "2fcbcb23ef0d48d99d24d7dcff00307d",
"timestamp" : 1668152426471,
"description" : "demo",
"status" : 1,
"url" : "/attack",
"category" : "sensitive",
"action" : {
"category" : "block"
},
"contents" : [ "id_card" ]
}
Status Code |
Description |
|---|---|
200 |
Request succeeded. |
400 |
Request failed. |
401 |
The token does not have required permissions. |
500 |
Internal server error. |
See Error Codes.