跳到主要内容

获取数据源敏感列

分页查询指定数据源中的敏感列列表,支持按数据库名、Schema 名称和表名过滤。

请求地址:/openapi/v1/sensitiveData/sensitiveColumn/list

请求方法:GET

请求参数

参数类型是否必选描述示例
datasourceIdString数据源 ID。您可以通过获取数据源列表接口查询。ds-xxxyyy
databaseNameString数据库名称。backup_test
schemaNameStringSchema 名称。public
tableNameString表名称。test_table
currentInteger当前页,从 1 开始,默认 1。1
pageSizeInteger分页大小,默认 10。10

请求示例

请求头、签名和 GET 请求参数拼接方法,请参见 OpenAPI 接口文档

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

返回参数

参数类型描述
successBoolean接口调用是否成功。
requestIdString请求 ID。
dataArray敏感列详情列表。
currentInteger当前页。
pageSizeInteger页大小。
totalInteger总数。

敏感列详情字段如下:

参数类型描述
databaseNameString敏感数据库名称。
schemaNameString敏感 Schema 名称。
tableNameString敏感表名称。
columnNameString敏感列名称。
dataTypeIdString数据类型 ID。
algorithmIdInteger脱敏算法 ID。
sensitiveLevelInteger敏感等级,取值范围为 0~50 表示非敏感字段。

调用成功示例

{
"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
}