Queries a list of data masking rules in Data Security Guard.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DsgDesensPlanQueryList | The operation that you want to perform. Set the value to DsgDesensPlanQueryList. |
PageNumber | Integer | Yes | 1 | The page number. |
PageSize | Integer | Yes | 10 | The number of entries per page. The maximum number of entries per page is 100. |
SceneId | Integer | Yes | 123 | The ID of the level-2 data masking scenario. You can call the DsgSceneQuerySceneListByName operation to query the list of IDs. |
RuleName | String | No | phone | The name of the sensitive field. |
Owner | String | No | user1 | The owner of the data masking rule. |
Status | Integer | No | 1 | The status of the data masking rule. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
Success | Boolean | true | Indicates whether the request was successful. Valid values:
|
ErrorCode | String | 1029030003 | The error code. |
ErrorMessage | String | param error | The error message. |
HttpStatusCode | Integer | 400 | The HTTP status code. |
PageData | Object | The pagination information. | |
PageNumber | Integer | 1 | The page number. |
PageSize | Integer | 10 | The number of entries per page. The maximum number of entries per page is 100. |
TotalCount | Integer | 100 | The number of data masking rules. |
Data | Array of Datas | The information about the data masking rule. | |
Id | Long | 123 | The ID of the data masking rule. |
DataType | String | phone | The sensitive field type. |
RuleName | String | phone_hash | The name of the data masking rule. |
DesensPlan | Object | The details of the data masking rule. | |
DesensPlanType | String | hash | The type of the data masking rule. |
ExtParam | Map | The parameters for the data masking rule. For more information about the parameters, see the DsgDesensPlanAddOrUpdate API reference. | |
Any | "extParam": { "algo":"MD5", "salt":"5" } | The details of the data masking rule parameters. | |
Owner | String | user1 | The owner of the data masking rule. |
GmtCreate | String | 2024-05-09 15:46:20 | The time when the data masking rule was created. |
GmtModified | String | 2024-05-09 15:46:20 | The time when the data masking rule was modified. |
Status | Integer | 1 | The status of the data masking rule. Valid values:
|
DesensWay | String | HASH | The data masking method. |
DesenMode | String | HASH | The type of the data masking method. |
DesensRule | String | HASH | The data masking rule. |
SceneCode | String | dataworks_display_desense_code | The code of the level-1 data masking scenario to which the rule belongs. Valid values:
|
CheckWatermark | Boolean | true | Indicates whether a watermark is added. Valid values:
|
SceneName | String | test_scene | The name of the level-2 data masking scenario to which the data masking rule belongs. |
RequestId | String | 102400001 | The request ID. You can use the ID to locate logs and troubleshoot issues. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DsgDesensPlanQueryList
&PageNumber=1
&PageSize=10
&SceneId=123
&RuleName=phone
&Owner=user1
&Status=1
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DsgDesensPlanQueryListResponse>
<Success>true</Success>
<ErrorCode>1029030003</ErrorCode>
<ErrorMessage>param error</ErrorMessage>
<HttpStatusCode>400</HttpStatusCode>
<PageData>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<TotalCount>100</TotalCount>
<Data>
<Id>123</Id>
<DataType>phone</DataType>
<RuleName>phone_hash</RuleName>
<DesensPlan>
<DesensPlanType>hash</DesensPlanType>
<ExtParam>
<key>"extParam": { "algo":"MD5", "salt":"5" }</key>
</ExtParam>
</DesensPlan>
<Owner>user1</Owner>
<GmtCreate>2024-05-09 15:46:20</GmtCreate>
<GmtModified>2024-05-09 15:46:20</GmtModified>
<Status>1</Status>
<DesensWay>HASH</DesensWay>
<DesenMode>HASH</DesenMode>
<DesensRule>HASH</DesensRule>
<SceneCode>dataworks_display_desense_code</SceneCode>
<CheckWatermark>true</CheckWatermark>
<SceneName>test_scene</SceneName>
</Data>
</PageData>
<RequestId>102400001</RequestId>
</DsgDesensPlanQueryListResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Success" : true,
"ErrorCode" : "1029030003",
"ErrorMessage" : "param error",
"HttpStatusCode" : 400,
"PageData" : {
"PageNumber" : 1,
"PageSize" : 10,
"TotalCount" : 100,
"Data" : [ {
"Id" : 123,
"DataType" : "phone",
"RuleName" : "phone_hash",
"DesensPlan" : {
"DesensPlanType" : "hash",
"ExtParam" : {
"key" : "\"extParam\": { \"algo\":\"MD5\", \"salt\":\"5\" }"
}
},
"Owner" : "user1",
"GmtCreate" : "2024-05-09 15:46:20",
"GmtModified" : "2024-05-09 15:46:20",
"Status" : 1,
"DesensWay" : "HASH",
"DesenMode" : "HASH",
"DesensRule" : "HASH",
"SceneCode" : "dataworks_display_desense_code",
"CheckWatermark" : true,
"SceneName" : "test_scene"
} ]
},
"RequestId" : "102400001"
}
Error codes
HttpCode | Error code | Error message | Description |
400 | DESENSPLAN.DATATYPE.ERROR | Sensitive type already has a desensitization rule. | The sensitive field type has been specified in the data masking rule. |
400 | DESENSPLAN.DATATYPENOTEXIST.ERROR | Sensitive type not exist. | The sensitive field type does not exist. |
400 | DESENSPLAN.ID.ERROR | Desensitization rule ID does not exist. | The ID of the data masking rule does not exist. |
400 | DESENSPLAN.PAGESIZE.ERROR | Page size is too large, maximum of 100. | The number of entries per page exceeds the upper limit. The maximum number of entries per page is 100. |
400 | DESENSPLAN.PARAM.ERROR | Desensitization rule parameter error. | The values specified for one or more data masking rule parameters are invalid. |
400 | DESENSPLAN.SCENECODE.ERROR | Scene code does not exist. | The scenario code does not exist. |
400 | DESENSPLAN.SCENEID.ERROR | Scene ID does not exist. | The scenario ID does not exist. |
400 | DESENSPLAN.SCENEIDLEVEL.ERROR | The scene is not a secondary scene. | The data masking scenario is not a level-2 data masking scenario. |
400 | DESENSPLAN.SIZE.ERROR | The number of desens plan exceeds the limit. | The number of data masking rules exceeds the upper limit. |
400 | PARAMS.ERROR | param error. | The values specified for one or more parameters are invalid. |
403 | PERMISSION.DENIED.ERROR | Permission denied | You are not authorized to perform this operation. |
500 | UNKNOWN.ERROR | unknown error. | An unknown error has occurred. |
For a list of error codes, see Service error codes.