Updated on 2023-09-27 GMT+08:00

POST /CCSQM/rest/ccisqm/v1/conversation-rules/getConversationFlow

Scenario

This interface is invoked to query a dialog logic by ID. The query criterion is flow_id, which indicates the unique ID of a dialog logic and is mandatory.

Method

POST

URI

/CCSQM/rest/ccisqm/v1/conversation-rules/getConversationFlow

Request Description

Table 1 Request header parameters

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.

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

flow_id

String

Yes

Dialog logic ID

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

sentence_groups

Array [Object]

No

Sentence groups used in a dialog logic

1.1.1

sg_id

String

No

Sentence group ID

1.2

min

String

No

Number of matched dialog logics

1.3

expression

String

No

Logical relationship between sentence groups, for example, if 7cb411de0c5c4c8fab51e28a1ce7d3c7 then 9bb193e53de64e3a9e8545e5ce28bb2e

1.4

flow_id

String

No

Dialog logic ID

1.5

resultCode

String

No

Return code. The value 0405000 indicates success, and other values indicate failure.

1.6

flow_name

String

No

Dialog logic name

1.7

resultDesc

String

No

Return description

  • Status code: 400
Table 4 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

schema

String

Yes

Incorrect request. Check the request path and parameters.

  • Status code: 401
Table 5 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

schema

String

Yes

Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404
Table 6 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

schema

String

Yes

The requested content is not found. Check the request path.

  • Status code: 500
Table 7 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

schema

String

Yes

Business failure. Check the values of parameters in the request.

Error Codes

None

Example

  • Scenario: Query a dialog logic by ID.

    Request header:

    x-app-key:************************************  
    X-UserID:1611917095665261978  
    Authorization:Bearer ********************************

    Request parameters:

    {
    	"flow_id": "871578307970207744"
    }

    Response parameters:

    {
    	"sentence_groups": [{
    		"sg_id": "923083618002145280"
    	}],
    	"min": null,
    	"expression": "must 923083618002145280",
    	"flow_id": "923083617557549056",
    	"resultCode": "0405000",
    	"flow_name": "wqqw",
    	"resultDesc": "Operation successful."
    }