Skip to main content

Retrieve Sensitive Columns

Use this API to retrieve sensitive column settings in a specified data source. Narrow the query by database, schema, and table to verify recognition results or audit sensitive data configuration.

Request URL: /openapi/v1/sensitiveData/sensitiveColumn/list

Request Method: GET

Request Parameters

ParameterTypeRequiredDescriptionExample
datasourceIdStringYesData source ID. Call Retrieve Data Source List to query the ID.ds-xxxyyy
databaseNameStringNoDatabase name.backup_test
schemaNameStringNoSchema name.public
tableNameStringNoTable name.test_table
currentIntegerNoCurrent page number, starting from 1. Default value: 1.1
pageSizeIntegerNoPage size. Default value: 10.10

Request Example

For request headers, signatures, and GET query construction, see OpenAPI API Documentation.

{
"datasourceId": "ds-xxxyyy",
"databaseName": "backup_test",
"tableName": "test_table",
"current": 1,
"pageSize": 10
}

Response Parameters

ParameterTypeDescription
successBooleanIndicates whether the API call is successful.
requestIdStringRequest ID.
dataArraySensitive column detail list.
currentIntegerCurrent page number.
pageSizeIntegerPage size.
totalIntegerTotal number of records.

The fields of each sensitive column detail are as follows:

ParameterTypeDescription
databaseNameStringDatabase name of the sensitive column.
schemaNameStringSchema name of the sensitive column.
tableNameStringTable name of the sensitive column.
columnNameStringSensitive column name.
dataTypeIdStringData type ID.
algorithmIdIntegerMasking algorithm ID.
sensitiveLevelIntegerSensitive level. Valid values: 0~5. 0 indicates a non-sensitive field.

Successful Response Example

{
"success": true,
"requestId": "Ug9a7WEH-iophcCDnloky9ZNdnql7LPT",
"data": [
{
"databaseName": "backup_test",
"tableName": "test_table",
"columnName": "id",
"sensitiveLevel": 0,
"dataTypeId": "0",
"algorithmId": 1
}
],
"current": 1,
"pageSize": 10,
"total": 1
}

Result

A successful response returns the matching sensitive column records and their assigned data type, masking algorithm, and sensitive level. If no records match the filters, the data array is empty.