Updated on 2025-11-17 GMT+08:00

Querying the Data Classification List

Function

This API is used to query the data classification list.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/security/data-category

Table 1 Path Parameters

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.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of items displayed on each page

offset

No

Integer

Offset, which is the position where the query starts. The value must be greater than or equal to 0.

Request Parameters

Table 3 Request header 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.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Total number of data classifications

category_groups

Array of DataCategoryDTO objects

Classification groups

Table 5 DataCategoryDTO

Parameter

Type

Description

category_id

String

Classification ID

category_name

String

Classification name

description

String

Classification description

category_level

Integer

Classification level

rule_list

Array of DataClassificationRuleQueryDTO objects

Identification rule list

root_id

String

Root node of the classification tree

parent_id

String

Parent classification ID

category_path

String

Classification path

create_by

String

Creator

create_time

Integer

Creation time

update_by

String

User who updated the classification

update_time

Integer

Update time

project_id

String

Project ID

instance_id

String

Instance ID

synchronize

Boolean

Synchronization (By default, all assets are synchronized.)

children

Array of DataCategoryDTO objects

Subclassification

Table 6 DataClassificationRuleQueryDTO

Parameter

Type

Description

uuid

String

Rule ID.

rule_type

String

Rule type. The options are CUSTOM and BUILTIN.

secrecy_level

String

Security level name.

secrecy_level_num

Long

Confidentiality level.

name

String

Indicates the rule name.

guid

String

guid.

enable

Boolean

Indicates whether the rule is enabled.

method

String

Rule method. The value can be REGULAR, NONE, DEFAULT, or COMBINE.

content_expression

String

Content expression.

column_expression

String

Column expression.

commit_expression

String

Remarks expression.

combine_expression

String

Condition expression

project_id

String

Project ID.

description

String

Specifies the assignment description.

created_by

String

Policy creator.

created_at

Long

Time when a policy is created.

updated_by

String

Person who updates the policy.

updated_at

Long

Time when a policy is updated.

builtin_rule_id

String

ID of a built-in rule.

category_id

String

Category ID.

instance_id

String

Instance ID.

match_type

String

Match type.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

/v1/0833a5737480d53b2f25c010dc1a7b88/security/data-category

Example Responses

Status code: 200

OK

{
  "category_groups" : [ {
    "category_id" : "555fb01bfcf04fed8623f6cfe81ef9b8",
    "category_level" : 0,
    "category_name" : "Test classification name",
    "category_path" : "Test classification name",
    "children" : [ ],
    "create_by" : "chenxiaoyu",
    "create_time" : 1717055180592,
    "description" : "this is a example catagory",
    "instance_id" : "dd97167b873d4a79b2aad54d4370a3bc",
    "parent_id" : "-1,",
    "project_id" : "0833a5737480d53b2f25c010dc1a7b88",
    "root_id" : "555fb01bfcf04fed8623f6cfe81ef9b8",
    "rule_list" : null,
    "synchronize" : false,
    "update_by" : null,
    "update_time" : null
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

OK

400

Bad Request