All Products
Search
Document Center

:QueryRecognizeDataByRuleType

Last Updated:May 06, 2024

Queries the type of a sensitive data identification rule.

Debugging

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 QueryRecognizeDataByRuleType

The operation that you want to perform. Set the value to QueryRecognizeDataByRuleType.

RecognizeRulesType String Yes 2

The type of a sensitive data identification rule. You can call the QueryRecognizeRulesType operation to obtain the type of the rule.

  • 1: regular expression
  • 2: built-in rule
  • 3: sample library
  • 4: self-generated data identification model
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.

Response parameters

Parameter

Type

Example

Description

ErrorCode String 9990030003

The error code.

ErrorMessage String A required parameter is not specified.

The error message.

Success Boolean true

Indicates whether the request was successful.

  • true
  • false
Data Any [{"custom": false, "name": "EducationDegree", "localeName": "EducationDegree", "templateJsonStr": "{"_clazz":"com.alipay.dsgclient.sdk.dsg.fastscan.engine.cond.EducationDegreeCond"}", "desc": ""}]

The returned result in the JSON format.

HttpStatusCode Integer 200

The HTTP status code.

RequestId String 10000001

The request ID. You can locate logs and troubleshoot issues based on the ID.

Examples

Sample requests

http(s)://[Endpoint]/?Action=QueryRecognizeDataByRuleType
&RecognizeRulesType=2
&TenantId=10241024
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<QueryRecognizeDataByRuleTypeResponse>
    <ErrorCode>9990030003</ErrorCode>
    <ErrorMessage>A required parameter is not specified.</ErrorMessage>
    <Success>true</Success>
    <Data>[{"custom": false,       "name": "EducationDegree",       "localeName": "EducationDegree",       "templateJsonStr": "{&amp;quot;_clazz&amp;quot;:&amp;quot;com.alipay.dsgclient.sdk.dsg.fastscan.engine.cond.EducationDegreeCond&amp;quot;}",       "desc": ""}]</Data>
    <HttpStatusCode>200</HttpStatusCode>
    <RequestId>10000001</RequestId>
</QueryRecognizeDataByRuleTypeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "ErrorCode" : "9990030003",
  "ErrorMessage": "A required parameter is not specified.",
  "Success" : true,
  "Data" : "[{\"custom\": false,       \"name\": \"EducationDegree\",       \"localeName\": \"EducationDegree\",       \"templateJsonStr\": \"{&quot;_clazz&quot;:&quot;com.alipay.dsgclient.sdk.dsg.fastscan.engine.cond.EducationDegreeCond&quot;}\",       \"desc\": \"\"}]",
  "HttpStatusCode" : 200,
  "RequestId" : "10000001"
}

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.