POST /CCSQM/rest/ccisqm/v1/conversation-rules/queryRules
Scenario
This interface is invoked to query a dialog rule list in pagination mode. The query criteria are limit (number of records on each page), page (current page number), keyword (query keyword), and completeOnly (whether a rule is complete).
Method
POST
URI
https://Domain name/apiaccess/CCSQM/rest/ccisqm/v1/conversation-rules/queryRules (For example, the domain name is service.besclouds.com.)
Request Description
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
Content-Type |
String |
No |
The value is fixed to application/json; charset=UTF-8. |
2 |
x-app-key |
String |
No |
App key |
3 |
Authorization |
String |
Yes |
Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.) |
4 |
x-UserId |
String |
Yes |
Operator ID You can sign in to the system and go to the employee management page to view the value of userId returned by an interface. |
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1.1 |
limit |
Number |
Yes |
Number of records on each page. Pagination information. |
1.2 |
page |
Number |
No |
Current page number. Pagination information. |
1.3 |
keyword |
String (128) |
No |
Query keyword |
1.4 |
incompleteOnly |
Boolean |
No |
Whether to search for complete rules |
Response Description
- Status code: 200
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1.1 |
data |
Array [Object] |
No |
Returned data |
1.1.1 |
rule_id |
String |
No |
Rule ID |
1.1.2 |
score |
String |
No |
Rule score |
1.1.3 |
rule_name |
String |
No |
Rule name |
1.1.4 |
flows |
Array [Object] |
No |
Dialog logics associated with a rule |
1.1.4.1 |
expression |
String |
No |
Expression |
1.1.4.2 |
min |
Number |
No |
Minimum number of dialog logics |
1.1.4.3 |
name |
String |
No |
Dialog logic name |
1.1.4.4 |
id |
String |
No |
Dialog logic ID |
1.1.4.5 |
dialogRuleId |
String |
No |
Rule ID |
1.1.4.6 |
tenantId |
String |
No |
Tenant ID |
1.1.5 |
description |
String |
No |
Rule description |
1.1.6 |
completeness |
Object |
No |
Rule integrity |
1.1.6.1 |
hasConversationFlow |
Boolean |
No |
Whether dialog logics are set for a rule |
1.1.6.2 |
sentenceComplete |
Boolean |
No |
Whether applicable sentences are set for a rule |
1.1.6.3 |
ruleComplete |
Boolean |
No |
Whether the rule content is set |
1.1.6.4 |
hasDescription |
Boolean |
No |
Whether the rule description is set |
1.2 |
resultCode |
String |
No |
Return code. The value 0405000 indicates success, and other values indicate failure. |
1.3 |
paging |
Object |
No |
Pagination information |
1.3.1 |
total |
Number |
No |
Total number of records |
1.4 |
resultDesc |
String |
No |
Return description |
- Status code: 400
Incorrect request. Check the request path and parameters.
- Status code: 401
Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.
- Status code: 404
The requested content is not found. Check the request path.
- Status code: 500
Business failure. Check the values of parameters in the request.
Error Codes
None
Example
- Scenario: Query a dialog rule list in pagination mode.
x-app-key:************************************ X-UserID:1611917095665261978 Authorization:Bearer ********************************
Request parameters:
{ "limit": 10, "page": 1, "incompleteOnly": false }
Response parameters:
{ "data": [{ "rule_id": "922202599711576064", "score": "1", "rule_name": "Dialog rule" "flows": [{ "expression": "must 923000490218754048 and 923001105690923008", "min": null, "tenantId": "202106114153", "name": "cs", "errorCode": null, "id": "923000489761574912", "ruleId": "922202599711576064", "errorMsg": null }], "description": "Dialog rule", "completeness": { "hasConversationFlow": true, "sentenceComplete": true, "ruleComplete": true, "hasDescription": true } }], "resultCode": "0405000", "paging": { "total": 1 }, "resultDesc": "Operation successful." }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot