GetRuleById

Updated at:

Retrieves the details of a specific quality inspection rule. It corresponds to the **Edit** action on the **Quality Inspection Rule Configuration** page. The URL for this operation in a private cloud is `ip:port/api/client/GetRuleById.json`.

Note

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.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sca:GetRuleById

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RuleId

integer

Yes

The rule ID.

53

BaseMeAgentId

integer

No

The business space ID.

123456

Response elements

Element

Type

Description

Example

object

PlainResult

Data RulesInfo

The detailed information about the rule.

无

RequestId

string

The request ID.

3CEA0495-341B-4482-9AD9-8191EF4***

Success

boolean

Indicates whether the request succeeded. A value of true indicates success, and false or null indicates failure.

true

Code

string

The result code. A value of 200 indicates success. Other values indicate an error.

200

Message

string

The returned message. A value of successful is returned on success, and an error message is returned on failure.

successful

Messages

array

Details about the error. This parameter is used when multiple messages are returned.

string

A single error message.

无

HttpStatusCode

integer

The HTTP status code.

200

The Data parameter contains the rule details. For more information, see the Rule Object Description document.

Examples

Success response

JSON format

{
  "Data": {
    "Conditions": [
      {
        "Cid": "a",
        "Id": 1,
        "Rid": "1",
        "Check_range": {
          "RoleId": 1,
          "Role": "客服",
          "Anchor": {
            "Cid": "a",
            "Location": "BEFORE",
            "Hit_time": 1
          },
          "Range": {
            "From": 1,
            "To": 2
          },
          "Absolute": true,
          "AllSentencesSatisfy": true
        },
        "Operators": [
          {
            "Oid": "a",
            "Id": 1,
            "Type": "HIT_ANY_KEYWORDS",
            "Param": {
              "CustomerParam": {
                "Field": "remark1",
                "FieldType": 1,
                "DataType": 1,
                "Symbol": 1,
                "Value": "xxx",
                "ActualValue": "xx",
                "ExpressionMetaDesc": {
                  "LeftFieldType": 0,
                  "LeftOperand": "",
                  "Operator": "",
                  "RightFieldType": 0,
                  "RightOperand": "",
                  "RoundingMode": ""
                }
              },
              "Keywords": [
                "你好"
              ],
              "Regex": "质疑.*",
              "NotRegex": "优秀.*",
              "Phrase": "你好,请问",
              "References": [
                "你好.{0,10}"
              ],
              "Interval": 1,
              "IntervalEnd": 2,
              "Threshold": 90,
              "In_sentence": true,
              "Target": 1,
              "From_end": true,
              "Different_role": true,
              "Target_role": "客服",
              "RoleId": 1,
              "Velocity": 111,
              "VelocityInMint": 1,
              "KeywordExtension": 1,
              "Synonyms": {
                "key": [
                  "售卖"
                ]
              },
              "Case_sensitive": true,
              "Near_dialogue": true,
              "MinWordSize": 1,
              "Hit_time": 2,
              "Excludes": [
                "负向"
              ],
              "From": 0,
              "CheckFirstSentence": true,
              "Average": true,
              "BeginType": "1",
              "EndType": "2",
              "CompareOperator": "gt",
              "Pkey": "xx",
              "Poutput_type": 1,
              "SimilarlySentences": [
                "我要购买"
              ],
              "LgfSentences": [
                "你好{1}"
              ],
              "Score": 70,
              "ContextChatMatch": true,
              "KeywordMatchSize": 1,
              "MaxEmotionChangeValue": 3,
              "CheckType": 1,
              "KnowledgeTargetId": "1",
              "CategoryPathCode": "xx",
              "KnowledgeTargetType": 1,
              "KnowledgeTargetName": "订单",
              "QuestionThreshold": "90",
              "AnswerThreshold": "90",
              "KnowledgeSentenceNum": 1,
              "KnowledgeInfo": "下单",
              "BotId": "chatbot-cn-xxx",
              "UseEasAlgorithm": true,
              "Pvalues": [
                ""
              ],
              "Similarity_threshold": 90,
              "AntModelInfo": {
                "key": "xxx"
              },
              "DelayTime": 10,
              "Knowledges": "",
              "LlmModelCode": "",
              "HitCondition": "",
              "SceneName": "",
              "Dimensions": [
                {
                  "Dimension": "",
                  "Desc": "",
                  "ExcludeCondition": "",
                  "IncludeCondition": ""
                }
              ]
            },
            "Name": "a",
            "UserGroup": "xxx",
            "QualityCheckType": 0
          }
        ],
        "Lambda": "a",
        "Exclusion": 0,
        "Name": "xx",
        "UserGroup": "xxxx"
      }
    ],
    "Rules": [
      {
        "Status": 1,
        "IsDelete": 1,
        "StartTime": "1641277321000",
        "EndTime": "1641277321000",
        "Weight": "1",
        "IsOnline": 1,
        "CreateEmpid": "1",
        "CreateEmpName": "张三",
        "CreateTime": "1641277321000",
        "LastUpdateTime": "1641277321000",
        "LastUpdateEmpid": "1",
        "LastUpdateEmpName": "张三",
        "Comments": "违规",
        "Deny": 1,
        "ScoreSubId": 1,
        "ScoreName": "违规",
        "ScoreSubName": "1",
        "ScoreType": 1,
        "ScoreDeleted": true,
        "OperationMode": 1,
        "Meet": 1,
        "Effective": 1,
        "FullCycle": 1,
        "EffectiveStartTime": "OperationMode",
        "EffectiveEndTime": "OperationMode",
        "QualityCheckType": 1,
        "Level": 1,
        "GraphFlow": "{}",
        "TaskFlowType": 1,
        "CheckType": 3,
        "SchemeCheckType": {
          "CheckType": 1,
          "CheckName": "流程规则",
          "SourceScore": 1,
          "Score": 50,
          "Enable": 1,
          "SchemeId": 1,
          "SchemeScoreInfoList": [
            {
              "Rid": 1,
              "Name": "xx",
              "TaskFlowId": 1,
              "TaskFlowName": "xx",
              "ScoreType": 1,
              "ScoreNumType": 0,
              "ScoreNum": 1,
              "ScoreRuleHitType": 0
            }
          ],
          "TaskFlowScoreInfoList": [
            {
              "TaskFlowId": 1,
              "TaskFlowName": "xx",
              "TaskFlowType": 1,
              "SchemeScoreInfoList": [
                {
                  "Rid": 1,
                  "Name": "xx",
                  "TaskFlowId": 1,
                  "TaskFlowName": "xx",
                  "ScoreType": 1,
                  "ScoreNumType": 0,
                  "ScoreNum": 11,
                  "ScoreRuleHitType": 0
                }
              ]
            }
          ]
        },
        "TargetType": 10,
        "ConfigType": 1,
        "ScoreNumType": 1,
        "ScoreRuleHitType": 0,
        "SchemeId": 1,
        "SchemeRuleMappingId": 1,
        "SchemeName": "通用方案",
        "ModifyType": 1,
        "SortIndex": 1,
        "RuleType": 1,
        "Rid": "1",
        "Name": "开头语规则",
        "TaskFlowId": 111111111,
        "Lambda": "a&&b",
        "ExternalProperty": 1,
        "Type": 2,
        "RuleCategoryName": "正向规则",
        "AutoReview": 1,
        "RuleScoreType": 3,
        "ScoreId": 1,
        "PreqRule": {
          "Rid": ""
        },
        "ScoreNum": 1,
        "BusinessCategoryNameList": [
          "全部"
        ],
        "Dialogues": [
          {
            "Id": 1,
            "Content": [
              {
                "HourMinSec": "00:00:00",
                "Role": "客户",
                "Identity": "客户",
                "EmotionValue": 1,
                "SpeechRate": 100,
                "Words": "方便",
                "End": 1360,
                "SilenceDuration": 100,
                "BeginTime": 350,
                "Begin": 360
              }
            ],
            "Name": "xx",
            "UserGroup": "xx"
          }
        ],
        "Triggers": [
          "a"
        ]
      }
    ],
    "Dialogues": [
      {
        "Id": 1,
        "Content": [
          {
            "HourMinSec": "00:00:00",
            "Role": "客户",
            "Identity": "客户",
            "EmotionValue": 1,
            "SpeechRate": 100,
            "Words": "方便",
            "End": 1360,
            "SilenceDuration": 100,
            "BeginTime": 350,
            "Begin": 360
          }
        ],
        "Name": "xx",
        "UserGroup": "xx"
      }
    ],
    "Count": 100,
    "PageSize": 10,
    "PageNumber": 1
  },
  "RequestId": "3CEA0495-341B-4482-9AD9-8191EF4***\t",
  "Success": true,
  "Code": "200",
  "Message": "successful",
  "Messages": [
    "无"
  ],
  "HttpStatusCode": 200
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.