Queries the identification results of sensitive data in Data Security Guard.
The query capability of the API operation is similar to the query feature in Data Security Guard in the DataWorks console. The API operation can be used to query the identification results of sensitive data of a tenant based on the association with the tenant ID.
You can search for a specific identification result based on filter conditions such as data source type and workspace.
You can sort the identification results of sensitive data of a tenant based on the values of a field in ascending or descending order.
This operation supports paged query.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DsgQuerySensResult | The operation that you want to perform. Set the value to DsgQuerySensResult. |
TenantId | String | Yes | 10241024 | The tenant ID. To obtain the tenant ID, perform the following steps: Log on to the DataWorks console. Find your workspace and go to the DataStudio page. On the DataStudio page, click the logon username in the upper-right corner and click User Info in the Menu section. |
DbType | String | No | ODPS.ODPS | The type of the database. Valid values:
|
ProjectName | String | No | project | The name of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace page to obtain the workspace name. |
SchemaName | String | No | schema | The name of the schema. |
Table | String | No | table | The name of the table. |
Col | String | No | col | The name of the field. |
NodeName | String | No | Personal information | The name of a data category. |
Level | String | No | 3 | The sensitivity level of the field. |
SensStatus | String | No | 1 | The sensitivity status of the field.
|
SensitiveId | String | No | 10241024 | The ID of the sensitive field. |
SensitiveName | String | No | Name | The name of the sensitive field. |
Order | String | No | DESC | The sorting method.
|
OrderField | String | No | gmt_create | The field used for sorting.
|
PageNo | Integer | No | 1 | The page number. Pages start from page 1. |
PageSize | Integer | No | 10 | The number of entries per page. Valid values: 1 to 20. Default value: 10. |
Response parameters
Parameter | Type | Example | Description |
Success | Boolean | true | Indicates whether the request was successful.
|
ErrorCode | String | 400 | The error code. |
ErrorMessage | String | A required parameter is not specified. | The error message. |
HttpStatusCode | Integer | 400 | The HTTP status code. |
Data | Any | 1234 | The returned data. |
RequestId | String | 900000001 | The request ID. |
DynamicErrorCode | String | 400 | The error code. The value is the same as that of ErrorCode. |
DynamicErrorMessage | String | A required parameter is not specified. | The error message. The value is the same as that of ErrorMessage. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DsgQuerySensResult
&TenantId=10241024
&DbType=ODPS.ODPS
&ProjectName=project
&SchemaName=schema
&Table=table
&Col=col
&NodeName=Personal information
&Level=3
&SensStatus=1
&SensitiveId=10241024
&SensitiveName=Name
&Order=DESC
&OrderField=gmt_create
&PageNo=1
&PageSize=10
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DsgQuerySensResultResponse>
<Success>true</Success>
<ErrorCode>400</ErrorCode>
<ErrorMessage>A required parameter is not specified.</ErrorMessage>
<HttpStatusCode>400</HttpStatusCode>
<Data>1234</Data>
<RequestId>900000001</RequestId>
<DynamicErrorCode>400</DynamicErrorCode>
<DynamicErrorMessage>A required parameter is not specified.</DynamicErrorMessage>
</DsgQuerySensResultResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Success" : true,
"ErrorCode" : "400",
"ErrorMessage": "A required parameter is not specified.",
"HttpStatusCode" : 400,
"Data" : "1234",
"RequestId" : "900000001",
"DynamicErrorCode" : "400",
"DynamicErrorMessage": "A required parameter is not specified."
}
Error codes
HttpCode | Error code | Error message | Description |
400 | BADPARAMETERS | Parameters are missing or in the wrong format. | A required parameter is not specified. |
For a list of error codes, see Service error codes.