GetRuleDetail
Retrieves the detailed information of a rule.
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 is used in conjunction with Get basic rule information. First, call the GetRule operation to obtain the rule ID. Then, use the rule ID as a parameter to call the GetRuleDetail operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sca:GetRuleDetail |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| JsonStr |
string |
Yes |
A complete JSON string. See the details below for the exact format. |
{"ruleIds":"123"} |
| BaseMeAgentId |
integer |
No |
The workspace ID. |
123456 |
Request parameters in JSON string format
| Property | Type | Required | Description |
| ruleIds | List<String> | No | The rule ID. If you specify this parameter, all other parameters are ignored. |
| businessCategoryName | List<String> | No | The business category name. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response 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 |
The error message if the request fails. If the request succeeds, the value is successful. |
successful |
| RequestId |
string |
The request ID. |
4987D326-83D9-4A42-B9A5-0B27F9B40539 |
| Success |
boolean |
Indicates whether the request succeeded. Use this field to check the result:
|
true |
| Data |
object |
The response data. |
|
| PageSize |
integer |
The number of items per page. |
10 |
| PageNumber |
integer |
The current page number. |
1 |
| Count |
integer |
The total number of items. |
10 |
| Conditions |
object |
||
| ConditionBasicInfo |
array<object> |
The configuration for all conditions. |
|
|
array<object> |
The condition information. |
||
| ConditionInfoCid |
string |
The condition ID. |
7 |
| OperLambda |
string |
The logical relationship between operators in the condition. |
7 |
| Operators |
object |
||
| OperatorBasicInfo |
array<object> |
The operators included in the condition. |
|
|
array<object> |
An operator. |
||
| Type |
string |
The operator type. |
REGULAR_EXPRESSION |
| Oid |
string |
The operator ID. |
8 |
| OperName |
string |
The operator name and description. |
operator demo |
| Param |
object |
The specific expression for the operator. |
|
| DifferentRole |
boolean |
Used only for time-interval operators. If true, sentences spoken by the same role as the current sentence are excluded from the calculation. |
true |
| Regex |
string |
The regular expression used for regular-expression operators. |
.*修改密码.* |
| TargetRole |
string |
Used only for duplicate-sentence operators. If the current sentence matches this regular expression, the matched part is searched for in the sentence before the current one, specified by the target_role value. |
客户 |
| VelocityInMint |
integer |
The words-per-minute threshold used for speech-rate checks. The system compares the current sentence's rate against this value. |
280 |
| Average |
boolean |
The speech-rate check mode. Possible values: true checks the average rate across the entire conversation. false checks the rate of the current sentence only. |
true |
| KeywordExtension |
boolean |
For keyword-check operators, enables synonym expansion. |
true |
| Score |
integer |
The similarity score used for text-similarity operators. |
80 |
| NotRegex |
string |
The regular expression to exclude in regex checks. |
发一下|告诉我 |
| CompareOperator |
string |
The comparison operator. Possible values: gt (greater than) and lt (less than). Default is gt. |
gt |
| DelayTime |
integer |
The delay time used for interruption checks. For example, if set to 1000, an overlap is considered an interruption only if it occurs more than 1000 milliseconds after the other speaker starts. Unit: milliseconds. |
1000 |
| KeywordMatchSize |
integer |
The number of keywords to match for keyword-check operators. The meaning depends on the detection type: 1 means match any one keyword. -1 means match all keywords. A positive integer N means match any N keywords. 0 means match none. The default value depends on the keyword detection type (type): HIT_ANY_KEYWORDS uses 1. INCLUDE_KEYWORDS uses -1. |
3 |
| HitTime |
integer |
For context-duplicate operators, the number of times a sentence must repeat before it counts as a violation. Default is 1. |
1 |
| BeginType |
string |
Used only for abnormal-hangup operators. Always pass DIALOGUE. |
DIALOGUE |
| Target |
integer |
The number of previous sentences to check. If 0, the time interval equals the current sentence's end time minus its start time. |
1 |
| MaxEmotionChangeValue |
integer |
The energy value used for energy-detection operators. Valid range: 1–10. |
8 |
| Threshold |
number |
The threshold used for edit-distance and matching-score operators. |
4 |
| From |
integer |
For context-duplicate operators, the maximum number of sentences between duplicates before it counts as a violation. Default is 2, meaning a duplicate within the last two sentences (inclusive) triggers a violation. |
3 |
| FromEnd |
boolean |
For time-interval operators, determines whether the interval is calculated as the current sentence's end time minus the target sentence's end time. |
true |
| MinWordSize |
integer |
The minimum number of words in a sentence before speech-rate checking begins. |
4 |
| InSentence |
boolean |
Specifies whether to check the full sentence or just part of it. |
true |
| Phrase |
string |
The reference sentence used for minimum-edit-distance operators. |
示例句子 |
| Similarity_threshold |
number |
This field is deprecated. Ignore it. |
90 |
| CheckType |
integer |
The detection method used for energy checks. Possible values: 1 (energy fluctuation between adjacent sentences), 2 (maximum energy span), and 3 (energy range detection). Default is 3. |
1 |
| Interval |
integer |
The time interval used for time-interval operators. |
5000 |
| ContextChatMatch |
boolean |
For keyword-check operators, enables multi-sentence analysis. Possible values: true for multi-sentence analysis. false for single-sentence analysis. Default is false. See the detailed explanation below. |
true |
| Excludes |
object |
||
| Excludes |
array |
The list of exception sentences for context-duplicate operators. |
|
|
string |
The list of exception sentences for context-duplicate operators. Repeats of these sentences do not count as violations. Default is empty. |
[“好的”] |
|
| AntModelInfo |
object |
||
| AntModelInfo |
array |
This field is deprecated. Ignore it. |
|
|
string |
This field is deprecated. Ignore it. |
弃用字段 |
|
| Pvalues |
object |
||
| Pvalues |
array |
This field is deprecated. Ignore it. |
|
|
string |
This field is deprecated. Ignore it. |
弃用字段 |
|
| References |
object |
||
| Reference |
array |
Used for similarity matching. |
|
|
string |
The specific expression for similarity-matching operators. |
[“优惠力度特别大”,”特别的优惠”] |
|
| SimilarlySentences |
object |
||
| SimilarlySentence |
array |
The collection of example sentences for text-similarity operators. |
|
|
string |
The collection of example sentences for text-similarity operators. |
[“优惠力度特别大”,”特别的优惠”] |
|
| OperKeyWords |
object |
||
| OperKeyWord |
array |
The keyword list. |
|
|
string |
The keyword list. |
[“你好”,”您好”,”上午好”] |
|
| CheckRange |
object |
The scope for condition checking. |
|
| Absolute |
boolean |
Whether the condition is independent. |
true |
| Role |
string |
The role for which the condition applies. |
客服 |
| Anchor |
object |
The anchor relationship for the condition. |
|
| HitTime |
integer |
|
1 |
| Location |
string |
|
AFTER |
| AnchorCid |
string |
The condition ID used to identify the anchor condition. |
7 |
| Range |
object |
The range defined by both Role and Anchor. |
|
| To |
integer |
|
10 |
| From |
integer |
|
1 |
| Rules |
object |
||
| RuleBasicInfo |
array<object> |
The configuration for all rules. |
|
|
array<object> |
The list of rules. |
||
| RuleLambda |
string |
The logical relationship between conditions in the rule. |
7&&!8 |
| Rid |
string |
The rule ID. |
4 |
| BusinessCategories |
object |
||
| BusinessCategoryBasicInfo |
array<object> |
The business categories associated with the rule. |
|
|
object |
The business categories associated with the rule. |
||
| BusinessName |
string |
The name of the business category associated with the rule. |
业务A |
| ServiceType |
integer |
The service type. |
1 |
| Bid |
integer |
The business ID (BID) associated with the rule. Must be numeric. |
264971810 |
| Triggers |
object |
||
| Trigger |
array |
The list of triggers. |
|
|
string |
The condition IDs whose content should be returned when the rule triggers. When you set a rule ID, the response includes the specific content that triggered the rule. |
["7","8"] |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "successful",
"RequestId": "4987D326-83D9-4A42-B9A5-0B27F9B40539",
"Success": true,
"Data": {
"PageSize": 10,
"PageNumber": 1,
"Count": 10,
"Conditions": {
"ConditionBasicInfo": [
{
"ConditionInfoCid": "7",
"OperLambda": "7",
"Operators": {
"OperatorBasicInfo": [
{
"Type": "REGULAR_EXPRESSION",
"Oid": "8",
"OperName": "operator demo",
"Param": {
"DifferentRole": true,
"Regex": ".*修改密码.*",
"TargetRole": "客户",
"VelocityInMint": 280,
"Average": true,
"KeywordExtension": true,
"Score": 80,
"NotRegex": "发一下|告诉我",
"CompareOperator": "gt",
"DelayTime": 1000,
"KeywordMatchSize": 3,
"HitTime": 1,
"BeginType": "DIALOGUE",
"Target": 1,
"MaxEmotionChangeValue": 8,
"Threshold": 4,
"From": 3,
"FromEnd": true,
"MinWordSize": 4,
"InSentence": true,
"Phrase": "示例句子",
"Similarity_threshold": 90,
"CheckType": 1,
"Interval": 5000,
"ContextChatMatch": true,
"Excludes": {
"Excludes": [
"[“好的”]"
]
},
"AntModelInfo": {
"AntModelInfo": [
"弃用字段"
]
},
"Pvalues": {
"Pvalues": [
"弃用字段"
]
},
"References": {
"Reference": [
"[“优惠力度特别大”,”特别的优惠”]"
]
},
"SimilarlySentences": {
"SimilarlySentence": [
"[“优惠力度特别大”,”特别的优惠”]"
]
},
"OperKeyWords": {
"OperKeyWord": [
"[“你好”,”您好”,”上午好”]"
]
}
}
}
]
},
"CheckRange": {
"Absolute": true,
"Role": "客服",
"Anchor": {
"HitTime": 1,
"Location": "AFTER",
"AnchorCid": "7"
},
"Range": {
"To": 10,
"From": 1
}
}
}
]
},
"Rules": {
"RuleBasicInfo": [
{
"RuleLambda": "7&&!8",
"Rid": "4",
"BusinessCategories": {
"BusinessCategoryBasicInfo": [
{
"BusinessName": "业务A",
"ServiceType": 1,
"Bid": 264971810
}
]
},
"Triggers": {
"Trigger": [
"[\"7\",\"8\"]"
]
}
}
]
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.