GetOpSensitiveData

更新时间:
复制 MD 格式

Queries sensitive data access records generated on a specified date across all DataWorks workspaces of a tenant.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

Name

string

Yes

The filter conditions for querying access records. Valid values:

  • dbType

  • instanceName

  • databaseName

  • projectName

  • clusterName

Example: query access records of sensitive data in the abc database of the Hologres instance ABC: [ {"dbType":"hologres","instanceName":"ABC","databaseName":"abc"} ]

Configure the parameters based on the compute engine you use.

[ {"dbType":"hologres","instanceName":"ABC","databaseName":"abc"}, {"dbType":"ODPS.ODPS","projectName":"adbc"} ]

PageSize

integer

Yes

The number of entries per page. Minimum value: 1. Maximum value: 1000.

1

PageNo

integer

Yes

The page number. Valid values: 1 to 1000.

100

Date

string

Yes

The date when access records were generated, in yyyyMMdd format.

20210116

OpType

string

No

The type of data operation. Valid values:

  • SQL_SELECT: data access operation, such as executing a SELECT statement to query data.

  • TUNNEL_DOWNLOAD: data download operation, such as running a Tunnel command to download data.

SQL_SELECT

Response elements

Element

Type

Description

Example

object

The returned result.

OpSensitiveData

string

Sensitive data access record details, including totalCount and opRiskDatas. opRiskDatas contains the following fields:

  • sensType: the type of sensitive data.

  • sensLevel: the sensitivity level. A larger value indicates a higher sensitivity level.

  • opType: the operation type.

  • sql: the executed SQL statement.

  • opAccount: the account used to perform the operation.

  • opTime: the time when the operation was performed.

"opSensDatas": [ { "sensLevel": "L4", "opTime": "2021-02-07 00:14:51", "opAccount": "ALIYUN$dsg_test", "sensType": "Mobile phone number", "sql": "select * from dsg_demo.tbl_phonebook where phone_no = '1331111****';" } ], "totalCount": 6

RequestId

string

The request ID.

0000-ABCD-EFG****

Examples

Success response

JSON format

{
  "OpSensitiveData": "\"opSensDatas\": [       {         \"sensLevel\": \"L4\",         \"opTime\": \"2021-02-07 00:14:51\",         \"opAccount\": \"ALIYUN$dsg_test\",         \"sensType\": \"Mobile phone number\",         \"sql\": \"select * from dsg_demo.tbl_phonebook where phone_no = '1331111****';\"       }     ],     \"totalCount\": 6",
  "RequestId": "0000-ABCD-EFG****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 Invalid.Param The request parameter is invalid.
500 InternalError.DQC.BizError An internal error occurred.
403 Forbidden.NoTenant The tenant information cannot be obtained by user ID.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.