GetRule
Retrieves basic information about rules.
This API has been deprecated. We recommend migrating to Qualitycheck(2019-01-15) - GetRuleV4 for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Operation description
This operation returns basic rule information such as the id and name. You can use this information with GetRuleDetails.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sca:GetRule |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| JsonStr |
string |
Yes |
A complete JSON string. See the detailed information below. |
{"ruleIds":"123"} |
| BaseMeAgentId |
integer |
No |
Workspace ID |
123456 |
Request parameters in the JsonStr string
| Property | Type | Required | Description |
| ruleIds | List<String> | No | Rule IDs. Separate multiple IDs with commas. |
| businessCategoryName | List<String> | No | Business category names |
| status | Integer | No | Status. Valid values: 0 (pending), 1 (active), 2 (expired), or 3 (all). Default is 1. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The result code. 200 means success. Any other value means failure. Use this field to identify the cause of failure. |
200 |
| Message |
string |
Error details if the request fails. Returns successful if the request succeeds. |
successful |
| RequestId |
string |
The request ID |
F190ADE9-619A-447D-84E3-7E241A5C428E |
| Success |
boolean |
Indicates whether the request succeeded. true means success. false or null means failure. |
true |
| Data |
object |
The response data |
|
| Rules |
object |
||
| RuleInfo |
array<object> |
A list of rule information items |
|
|
array<object> |
A list of rules |
||
| Status |
integer |
Status. Valid values: 0 (pending), 1 (active), or 2 (expired) |
1 |
| Type |
integer |
[Deprecated] Rule type |
1 |
| ScoreSubId |
integer |
The ID of the scoring sub-item |
22 |
| IsOnline |
integer |
[Deprecated] Indicates whether the rule is online. 0 means offline. 1 means online. This value is always 1. |
1 |
| CreateTime |
string |
The time when the rule was created |
2016-08-05 10:37:10 |
| CreateEmpid |
string |
The ID of the user who created the rule |
123 |
| LastUpdateEmpid |
string |
The ID of the user who last updated the rule |
123 |
| IsDelete |
integer |
Indicates whether the rule is deleted. Valid values: 0 (not deleted) or 1 (deleted) |
0 |
| Rid |
string |
The rule ID |
4 |
| RuleScoreType |
integer |
Indicates whether the rule contributes to scoring. Valid values: 1 (no score) or 3 (scored) |
1 |
| EndTime |
string |
The expiration time |
2016-08-05 10:37:10 |
| Weight |
string |
[Deprecated] Rule weight |
1 |
| StartTime |
string |
The start time |
2016-08-05 10:37:10 |
| RuleLambda |
string |
[Deprecated] Logical relationship between rule conditions |
a && b |
| ScoreSubName |
string |
The name of the scoring sub-item. This field appears only when |
评分子项 |
| AutoReview |
integer |
The review option. Valid values: 1 (manual review) or 3 (auto review) |
1 |
| Comments |
string |
Remarks |
测试规则 |
| LastUpdateTime |
string |
The time when the rule was last updated |
2019-10-28 14:23:28 |
| ScoreName |
string |
The name of the scoring main item. This field appears only when |
评分大项 |
| Name |
string |
The rule name |
demo |
| ScoreId |
integer |
The ID of the scoring main item |
123 |
| BusinessCategoryNameList |
object |
||
| BusinessCategoryNameList |
array |
A list of business categories |
|
|
string |
A list of business categories |
["业务A","业务B"] |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "successful",
"RequestId": "F190ADE9-619A-447D-84E3-7E241A5C428E",
"Success": true,
"Data": {
"Rules": {
"RuleInfo": [
{
"Status": 1,
"Type": 1,
"ScoreSubId": 22,
"IsOnline": 1,
"CreateTime": "2016-08-05 10:37:10",
"CreateEmpid": "123",
"LastUpdateEmpid": "123",
"IsDelete": 0,
"Rid": "4",
"RuleScoreType": 1,
"EndTime": "2016-08-05 10:37:10",
"Weight": "1",
"StartTime": "2016-08-05 10:37:10",
"RuleLambda": "a && b",
"ScoreSubName": "评分子项",
"AutoReview": 1,
"Comments": "测试规则",
"LastUpdateTime": "2019-10-28 14:23:28",
"ScoreName": "评分大项",
"Name": "demo",
"ScoreId": 123,
"BusinessCategoryNameList": {
"BusinessCategoryNameList": [
"[\"业务A\",\"业务B\"]"
]
}
}
]
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.