Skip to main content

7 List Rules

Description: List available rule name, code, and default threshold information, which can be used as a reference when creating optimizations.

7.1. Interface URL

Post http://${server-host}:${server-port}/api/v1/listRules

7.7. Interface Input Parameters

FieldTypeRequiredDescription
userKeyStringYActivation key

Input example

{
"userKey": "CB698418-88B25371-67F15F01-XXXXXXXX",
}

7.3. Interface Output Parameters

Field NameField TypeDescription
codeintStatus code
messageStringDescription information
dataArrayArray of rule information

data data structure

Field NameField TypeDescription
ruleNameCnStringChinese name of the rule
ruleCodeStringRule code
thresholdStringDefault threshold of the rule

Output example

  • Success
{
"code": 200,
"message": "Operation successful",
"data": [
{
"ruleNameCn": "Add ORDER BY condition for GROUP BY display (<MYSQL 5.7))",
"ruleCode": "RuleAddOrderByNullRewrite",
"threshold": null
},
{
"ruleNameCn": "GROUP fields contain expressions that cause index to become ineffective",
"ruleCode": "RuleCalculationOnGroupingExprWarning",
"threshold": null
},
...
]
}
  • Failure
{
"code": 400,
"message": "Query failed",
"data": null
}