GetRuleV4

Updated at:

This API is located in the frontend at Quality Check Rule Configuration > Query. The Apsara Stack URL is ip:port/api/client/GetRuleById.json.

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:GetRuleV4

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RuleId

integer

Yes

Rule ID.

531

Response elements

Element

Type

Description

Example

object

PlainResult<rulesinfo>

Data RulesInfo

Rule information.

RequestId

string

Request ID.

106C6CA0-282D-4AF7-85F0-D2D24***

Success

boolean

Indicates whether the request succeeded. Set to true for success. Set to false or null for failure.

true

Code

string

Result code. A value of 200 indicates success. Other values indicate failure. Use this field to identify the cause of failure.

200

Message

string

Error details if the request failed. Returns successful if the request succeeded.

successful

Messages

array

Error details if the request failed. Use this field when returning multiple messages.

string

Error details if the request failed. Use this field when returning multiple messages.

无

HttpStatusCode

integer

HTTP status code returned by the request. A value of 200 indicates success.

200

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": "**[Deprecated]**",
                "ActualValue": "**[Deprecated]**",
                "ExpressionMetaDesc": {
                  "LeftFieldType": 0,
                  "LeftOperand": "**[Deprecated]**",
                  "Operator": "**[Deprecated]**",
                  "RightFieldType": 0,
                  "RightOperand": "**[Deprecated]**",
                  "RoundingMode": "**[Deprecated]**"
                }
              },
              "Keywords": [
                "Hello"
              ],
              "Regex": "Question.*",
              "NotRegex": "Excellent.*",
              "Phrase": "Hello, may I ask",
              "References": [
                "Hello.{0,10}"
              ],
              "Interval": 1,
              "IntervalEnd": 2,
              "Threshold": 90,
              "In_sentence": true,
              "Target": 1,
              "From_end": true,
              "Different_role": true,
              "Target_role": "Agent",
              "RoleId": 1,
              "Velocity": 111,
              "VelocityInMint": 1,
              "KeywordExtension": 1,
              "Synonyms": {
                "key": [
                  "Sell"
                ]
              },
              "Case_sensitive": true,
              "Near_dialogue": true,
              "MinWordSize": 1,
              "Hit_time": 2,
              "Excludes": [
                "Negative"
              ],
              "From": 0,
              "CheckFirstSentence": true,
              "Average": true,
              "BeginType": "1",
              "EndType": "2",
              "CompareOperator": "gt",
              "Pkey": "xx",
              "Poutput_type": 1,
              "SimilarlySentences": [
                "I want to buy"
              ],
              "LgfSentences": [
                "Hello {1}"
              ],
              "Score": 70,
              "ContextChatMatch": true,
              "KeywordMatchSize": 1,
              "MaxEmotionChangeValue": 3,
              "CheckType": 1,
              "KnowledgeTargetId": "1",
              "CategoryPathCode": "Deprecated field",
              "KnowledgeTargetType": 1,
              "KnowledgeTargetName": "Order",
              "QuestionThreshold": "90",
              "AnswerThreshold": "90",
              "KnowledgeSentenceNum": 1,
              "KnowledgeInfo": "Place an order",
              "BotId": "chatbot-cn-xxx",
              "UseEasAlgorithm": true,
              "Pvalues": [
                "10"
              ],
              "Similarity_threshold": 90,
              "AntModelInfo": {
                "key": "model"
              },
              "DelayTime": 10,
              "Knowledges": "Deprecated field",
              "LlmModelCode": "TYXM_PLUS",
              "HitCondition": "Hit condition",
              "SceneName": "Politeness detection",
              "Dimensions": [
                {
                  "Dimension": "Inappropriate opening language",
                  "Desc": "Checks whether impolite or non-standard opening remarks are used in customer service conversations, which affects service professionalism",
                  "ExcludeCondition": "Customer service representatives are required to use the official standard dialect during service",
                  "IncludeCondition": "Non-standard and impolite greetings such as \"Hey\" appear at the beginning of the conversation"
                }
              ]
            },
            "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": "Zhang San",
        "CreateTime": "1641277321000",
        "LastUpdateTime": "1641277321000",
        "LastUpdateEmpid": "1",
        "LastUpdateEmpName": "Zhang San",
        "Comments": "Violation",
        "Deny": 1,
        "ScoreSubId": 1,
        "ScoreName": "Violation",
        "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": "General scheme",
        "ModifyType": 1,
        "SortIndex": 1,
        "RuleType": 1,
        "Rid": "1",
        "Name": "Greeting rule",
        "TaskFlowId": 111111111,
        "Lambda": "a&&b",
        "ExternalProperty": 1,
        "Type": 2,
        "RuleCategoryName": "Positive rule",
        "AutoReview": 1,
        "RuleScoreType": 3,
        "ScoreId": 1,
        "PreqRule": {
          "Rid": "1"
        },
        "ScoreNum": 1,
        "BusinessCategoryNameList": [
          "All"
        ],
        "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": "106C6CA0-282D-4AF7-85F0-D2D24***",
  "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.