Obtains the information about a 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 Required GetQualityRule

The operation that you want to perform.

ProjectName String Required autotest

The name of the database engine or data source.

RegionId String Required cn-shanghai

The region ID of the instance.

RuleId Long Yes 1234

The ID of the rule.

Response parameters

Parameter Type Example Description
Data Struct

The rule information.

BlockType Integer 1

Severity: 0 indicates weak rules and 1 indicates strong rules.

Checker Integer 9

Checker. This field corresponds to the front-end ID and must be converted by pkId.

CheckerName String compared with a fixed value

The name of the Checker.

Comment String Verify the uniqueness of a primary key

The description of the rule.

CriticalThreshold String 20

Warning threshold.

EntityId Long 165523

The ID of the partition filter expression.

ExpectValue String 30

The expected value of the checker.

FixCheck Boolean true

Static field verification.

Id Long 123232

The ID of the rule.

MethodId Integer 8

The ID of the collection method.

MethodName String table_count

The name of the collection method.

OnDuty String 1822931****

Rule configuration person.

Operator String >=

Operator.

PredictType Integer 0

Dynamic threshold: 0 indicates a non-dynamic threshold, and 1 indicates a dynamic threshold rule.

Property String id

The field of the DQC rule to change.

RuleName String View table fluctuations

The name of the rule.

RuleType Integer 0

The type of the rule.

TemplateId Integer 7

The ID of the launch template.

TemplateName String SQL task table rows, 1,7, 30 days fluctuation test

The name of the parameter template.

Trend String abs

The trend of the expected value.

WarningThreshold String 10

The warning threshold.

WhereCondition String id>10

The filtering condition. Write an SQL SELECT statement to specify the filtering condition.

ErrorCode String 401

The error code.

ErrorMessage String You have no permission.

The returned message.

HttpStatusCode Integer 200

The HTTP status code.

RequestId String 576b9457-2cf5-4****

The ID of the request.

Success Boolean true

Indicates whether the call is successful.

Examples

Sample requests

http(s)://[Endpoint]/? Action=GetQualityRule
&ProjectName=autotest
&RegionId=cn-shanghai
&RuleId=1234
&<Common request parameters>

Sample success responses

XML format

<RequestId>576b9457-2cf5-4***</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
    <Operator>>&gt;=</Operator>
    <Comment> verify primary key uniqueness </Comment>
    <Checker>9</Checker>
    <CriticalThreshold>20</CriticalThreshold>
    <CheckerName>compared with a fixed value</CheckerName>
    <ExpectValue>30</ExpectValue>
    <WarningThreshold>10</WarningThreshold>
    <OnDuty>1822931****</OnDuty>
    <Trend>abs</Trend>
    <WhereCondition>id&gt;10</WhereCondition>
    <RuleType>0</RuleType>
    <EntityId>165523</EntityId>
    <MethodId>8</MethodId>
    <FixCheck>true</FixCheck>
    <BlockType>1</BlockType>
    <TemplateName>SQL task table rows, 1,7, 30 days fluctuation test</TemplateName>
    <PredictType>0</PredictType>
    <Id>123232</Id>
    <MethodName>table_count</MethodName>
    <Property>id</Property>
    <TemplateId>7</TemplateId>
    <RuleName> view table fluctuations </RuleName>
</Data>
<ErrorCode>401</ErrorCode>
<ErrorMessage>You have no permission. </ErrorMessage>
<Success>true</Success>

JSON format

{
    "RequestId": "576b9457-2cf5-4***",
    "HttpStatusCode": 200,
    "Data": {
        "Operator": ">>=",
        "Comment": "verify primary key unique",
        "Checker": 9,
        "CriticalThreshold": 20,
        "CheckerName": "compared with a fixed value",
        "ExpectValue": 30,
        "WarningThreshold": 10,
        "OnDuty": "1822931****",
        "Trend": "abs",
        "WhereCondition": "id>10",
        "RuleType": 0,
        "EntityId": 165523,
        "MethodId": 8,
        "FixCheck": true,
        "BlockType": 1,
        "TemplateName": "SQL task table rows, 1,7, 30 days fluctuation test",
        "PredictType": 0,
        "Id": 123232,
        "MethodName": "table_count",
        "Property": "id",
        "TemplateId": 7,
        "RuleName": "View table fluctuations"
    },
    "ErrorCode": 401,
    "ErrorMessage": "You have no permission.",
    "Success": true
}

Error code

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