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
Field | Type | Required | Description |
---|---|---|---|
userKey | String | Y | Activation key |
Input example
{
"userKey": "CB698418-88B25371-67F15F01-XXXXXXXX",
}
7.3. Interface Output Parameters
Field Name | Field Type | Description |
---|---|---|
code | int | Status code |
message | String | Description information |
data | Array | Array of rule information |
data data structure
Field Name | Field Type | Description |
---|---|---|
ruleNameCn | String | Chinese name of the rule |
ruleCode | String | Rule code |
threshold | String | Default 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
}