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

Flow Query Interface

Description

The OIAP provides an interface for third-party systems to query flow information in the intelligent interaction system.

Interface Method

The request method must be set to POST.

URL

https://IP:PORT/oifde/rest/api/queryflows

Request

Table 1 Parameters in the request body

Parameter

Type

Position

Mandatory

Description

tenantId

String

body

Yes

Tenant ID.

flowId

String

body

No

Flow ID.

flowName

String

body

No

Flow name.

flowCode

String

body

No

Flow code.

source

String

body

No

Flow source.

  • IVR: traditional IVR flow
  • OIFDE: intelligent flow configured by the ODFS

    If this parameter is not set, the IVR is used by default.

pageNum

Integer

body

No

Page number.

Number of the page to be queried. The value is 1 for the first page.

pageSize

Integer

body

No

Number of records on each page.

authToken

String

body

Yes

Authentication token.

For details, see C3 OIAP Interface Authentication.

Response

Parameter

Type

Position

Mandatory

Description

errorCode

Integer

body

No

Error code.

If the operation is successful, no error code is returned.

If the operation fails, see Common Error Codes.

errorMsg

String

body

No

Error description.

total

long

body

M

Total number of records.

flowList

Flow[]

body

Yes

Array.

Table 2 Flow

Parameter

Type

Position

Mandatory

Description

tenantId

String

body

Yes

Tenant ID.

flowId

Integer

body

Yes

Flow ID.

flowCode

String

body

Yes

Flow code.

flowName

String

body

Yes

Flow name.

flowDesc

String

body

No

Flow description.

scenarioType

String

body

Yes

Scenario type.

Default: default (main flow)

subFlow: subflow

SYS_ERROR_DEFAULT: abnormal flow

createDate

Date

body

No

Creation date.

The format is timestamp.

status

String

body

No

Status.

INITIAL: initial status

VALID: valid status

statusDate

Date

body

No

Modification time.

The format is timestamp.

flowStartNode

String

body

No

Start node.

flowEndNode

String

body

No

End node.

ext01

String

body

No

Dynamic field.

logSwitch

String

body

No

Log switch.

0: disabled

1: enabled

isDefault

String

body

No

Whether the current flow is the default flow.

0: no

1: yes

version

String

body

No

Flow version.

ruleId

String

body

No

Gray rule ID.

ruleName

String

body

No

Gray rule name.

source

String

body

Yes

Flow source.

IVR: traditional flow

OIFDE: intelligent flow

workMode

Integer

body

No

Release mode.

  • 0: common mode
  • 1: monitoring mode
  • 2: insert mode

    Currently, the flow of the silent agent system can be connected. When the silent agent system is connected, you can set Work Mode to Monitor (silent agents only view the replies of the chatbot), Insert (silent agents assist the chatbot in reply), or Common (default).

Example

  • Request
    {
       "tenantId": "tenant001" ,
       "flowId": "??" ,
       "flowName": "??" ,
       "flowCode": "??" ,
       "pageNum": 5 ,
       "pageSize": 10 ,
       "authToken": "0************************" 
    }
  • Response
    { 
        "total": 1,
        "flowList": [
            {
                "flowId": "201904151183171584",
                "flowCode": "flow_ivr_5d06dad92731499abbe6cc6ebcb9d29d",
                "flowName": "Key test",
                "flowDesc": null,
                "scenarioType": "subFlow",
                "tenantId": "NJ_001",
                "createDate": 1555293043000,
                "status": "VALID",
                "statusDate": 1555401640000,
                "flowStartNode": "node_view_c157d73a1b5640d280ee1cb4dcb239e2",
                "flowEndNode": "node_end_97dda8c5a62541c5b44b184a4645f6e8",
                "ext01": null,
                "logSwitch": null,
                "isDefault": "1",
                "version": "v1",
                "ruleId": null,
                "ruleName": null,
                "source":"IVR",
                "flowVariableList": []
            }
         ] 
     }