Queries the records that are generated on a specified date for access to the sensitive data in all the DataWorks workspaces of a tenant.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetOpSensitiveData

The operation that you want to perform.

Date String Yes 20210116

The date on which access records were generated. Specify the value in the yyyyMMdd format.

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

The parameters that you can specify to query the access records. Valid values:

  • dbType: the data type
  • instanceName: the name of the instance
  • databaseName: the name of the database
  • projectName: the name of the workspace
  • clusterName: the name of the cluster

The following example shows the parameters configured to query the access records of the sensitive data in the abc database of the ABC Hologres instance:


You must specify the parameters based on the compute engine that you use in your business.

PageNo Integer Yes 100

The page number of the page to return. Minimum value:1. Maximum value: 1000.

PageSize Integer Yes 1

The number of entries to return on each page. Minimum value: 1. Maximum value: 1000.

RegionId String Yes cn-shenzhen

The region ID. For example, the ID of the China (Shanghai) region is cn-shanghai, and the ID of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation.

OpType String No SELECT

The operation that is performed on the data. Valid values:

  • SQL_SELECT: indicates that the data is accessed. For example, the SELECT statement is executed to query the data.
  • TUNNEL_DOWNLOAD: indicates that the data is downloaded. For example, a Tunnel command is run to download the data.

Response parameters

Parameter Type Example Description
OpSensitiveData String "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

The information of the access records returned for the sensitive data. The information includes totalCount and opRiskDatas.

opRiskDatas includes the following parameters:

  • sensType: the type of the sensitive data
  • sensLevel: the sensitivity level of the sensitive data
  • opType: the type of the operation
  • sql: the SQL statement that is executed
  • opAccount: the account that is used to perform the operation
  • opTime: the time when the operation was performed
RequestId String 0000-ABCD-EFG****

The ID of the request.


Sample requests

&Name=[  {"dbType":"hologres","instanceName":"ABC","databaseName":"abc"},  {"dbType":"ODPS.ODPS","projectName":"adbc"}  ]
&<Common request parameters>

Sample success responses

XML 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 = &amp;#39;1331111****&amp;#39;;"       }     ],     "totalCount": 6</OpSensitiveData>

JSON format

    "RequestId": "0000-ABCD-EFG****",
    "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 = &amp;#39;1331111****&amp;#39;;\"       }     ],     \"totalCount\": 6"

Error codes

HTTP status code Error code Error message Description
403 Forbidden.NoTenant The tenant information cannot be obtained using user ID. The error message returned because the tenant information cannot be obtained.
400 Invalid.Param The request parameter is invalid. The error message returned because the specified parameter is invalid.
500 InternalError.DQC.BizError An internal error occurred. The error message returned because an internal server error has occurred.

For a list of error codes, visit the API Error Center.