Importing a Preset Classification
Function
This API is used to import a preset classification.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/security/data-category/import-builtin-category
|
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. |
|
X-Language |
Yes |
String |
Request language
|
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
rule_secrecy_level_list |
No |
Array of ImportRuleSecrecyLevelDto objects |
Security levels corresponding to the rule. You need to import all built-in rules that have not been imported. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
builtin_rule_id |
No |
String |
ID of the built-in rule template |
|
secrecy_level |
No |
String |
Security level ID. For details about how to obtain it, see Obtaining the Data Security Level. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
result |
Array of ImportDefaultCategoryResultDto objects |
Import result |
|
Parameter |
Type |
Description |
|---|---|---|
|
import_status |
String |
Import Status
|
|
import_error_message |
String |
Import error cause |
|
children |
Array of ImportDefaultCategoryResultDto objects |
Sub-classification import result |
|
rule_result |
Array of ImportDefaultRuleResultDto objects |
Import result of the rule associated with the classification |
|
uuid |
String |
Data classification ID |
|
name |
String |
Data classification name |
|
description |
String |
Data classification description |
|
Parameter |
Type |
Description |
|---|---|---|
|
import_status |
String |
Import Status
|
|
import_error_message |
String |
Import error cause |
|
uuid |
String |
ID of the built-in rule template |
|
import_data_classification_rule |
Imported identification rules |
|
|
rule_name |
String |
Data identification rule name |
|
rule_type |
String |
Data identification rule type.
|
|
rule_desc |
String |
Rule description |
|
rule_name_en |
String |
English name. |
|
rule_desc_en |
String |
Description |
|
country |
String |
Region to which the rule belongs |
|
Parameter |
Type |
Description |
|---|---|---|
|
uuid |
String |
Data identification rule ID |
|
classification_type |
String |
Identification rule type
|
|
secrecy_level |
String |
Data security level ID |
|
name |
String |
Data identification rule name |
|
enable |
Boolean |
Enabled or not. |
|
method |
String |
Identification rule type
|
|
description |
String |
Description. |
|
category_id |
String |
Data classification ID |
|
builtin_rule_id |
String |
ID of the preset rule |
|
updated_by |
String |
Updater |
|
update_at |
Long |
Update time. |
|
created_by |
String |
Creator |
|
create_at |
Long |
Creation time. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
/v1/0833a5737480d53b2f25c010dc1a7b88/security/data-category/import-builtin-category
{
"rule_secrecy_level_list" : [ {
"builtin_rule_id" : "a5adcd6881f011e9a870765a9db3b202",
"secrecy_level" : "8a9480087df0657e017df070a7620000"
} ]
}
Example Responses
Status code: 200
OK
{
"result" : [ {
"name" : "Personal Information",
"children" : [ ],
"description" : null,
"import_error_message" : null,
"import_status" : "success",
"uuid" : "17fc7b0053c246518ade09feca480000",
"rule_result" : [ {
"uuid" : "a5adcb7a81f011e9a870765a9db3b202",
"country" : "China",
"import_data_classification_rule" : {
"builtin_rule_id" : "a5adcb7a81f011e9a870765a9db3b202",
"category_id" : "d4e8d3a67f984bc49907046e8fe37db0",
"classification_type" : "BUILTIN",
"create_at" : 1716773669838,
"created_by" : "user1",
"description" : "Chinese ID card No.",
"enable" : true,
"method" : "DEFAULT",
"name" : "Chinese ID card No.",
"secrecy_level" : "8a9481b68f7a96e7018fb7ae6814021b",
"update_at" : 1716773669838,
"updated_by" : "user1",
"uuid" : "8a9481b68f7a96e7018fb7af4bce0221"
},
"import_error_message" : null,
"import_status" : "success",
"rule_desc" : "Chinese ID card No.",
"rule_desc_en" : "ID card number in (China)",
"rule_name" : "Chinese ID card No.",
"rule_name_en" : "ID_Card_Number_(China)",
"rule_type" : "REGEX"
} ]
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.