Testing a Combined Identification Rule
Function
This API is used to test a combined identification rule.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/security/data-classification/rule/check
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
workspace |
Yes |
String |
Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID. |
|
X-Auth-Token |
Yes |
String |
IAM token, which is obtained by calling the IAM API for obtaining a user token (value of X-Subject-Token in the response header). This parameter is mandatory for token authentication. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
expression |
No |
String |
Condition expression |
|
combine_input_data |
No |
combine_input_data object |
Simulated data |
|
combine |
No |
Boolean |
Classification ID |
|
single_rule_check_list |
No |
Array of DataClassificationSingleRuleDTO objects |
Single rule list |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
column_content |
No |
String |
Simulated field content |
|
column_name |
No |
String |
Simulated column name |
|
column_comment |
No |
String |
Simulated column comment |
|
table_comment |
No |
String |
Simulated table comment |
|
table_name |
No |
String |
Simulated table name |
|
database_name |
No |
String |
Simulated database name |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
rule_code |
Yes |
String |
Rule No., in uppercase letters |
|
algorithm_type |
Yes |
String |
Algorithm type, which can be REGEX, REGEX_INSENSITIVE, GROOVY, LENGTH_EQ, LENGTH_GT, LENGTH_LT, or BUILTIN |
|
match_type |
Yes |
String |
Matching type, which can be CONTENT, COLUMN, COMMIT, TABLE_NAME, TABLE_COMMENT, or DATABASE_NAME |
|
expression |
Yes |
String |
expression |
|
builtin_rule_id |
No |
String |
Built-in rule ID |
Response Parameters
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
/v1/0833a5737480d53b2f25c010dc1a7b88/security/data-classification/rule/{id}
{
"expression" : "A&&B",
"combine" : true,
"combine_input_data" : {
"column_content" : "1367777xxxx",
"table_comment" : "TEL",
"column_name" : "MOL_TEL"
},
"single_rule_check_list" : [ {
"rule_code" : "A",
"algorithm_type" : "REGEX",
"match_type" : "CONTENT",
"expression" : "a*"
}, {
"rule_code" : "B",
"algorithm_type" : "LENGTH_EQ",
"match_type" : "TABLE_COMMENT",
"expression" : 11
} ]
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
204 |
No Content |
|
400 |
Bad Request |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.