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

Intention List Query Interface

Basic Information

This interface is invoked by a third-party system (for example, the silent agent system) to query the intention list.

Interface Method

POST

URL

https://IP:PORT/oifde/rest/api/intentions/query

Request

Table 1 Parameters in the request body

Parameter

Type

Position

Mandatory

Description

tenantId

String

Body

Yes

Tenant ID.

language

String

Body

Yes

Language.

en_US: English

zh_CN: Chinese

pt_BR: Portuguese

th_TH: Thai

fr_FR: French

ar: Arabic

pageNum

Integer

Body

Yes

Page number.

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

pageSize

Integer

Body

Yes

Number of records on each page.

5, 10, 20, 50, or 100 records can be displayed on each page.

domainInfo

DomainInfo

Body

If oifde.slient.use is set to ipcc, this parameter is mandatory. In other cases, this parameter is optional.

Domain information.

authToken

String

Body

Yes

Authentication token.

For details, see C3 OIAP Interface Authentication.

Table 2 DomainInfo

Parameter

Type

Position

Mandatory

Description

domainName

String

Body

No

Domain name.

domainId

Integer

Body

Yes

Domain ID.

language

String

Body

No

Language.

tenantId

String

Body

No

Tenant ID.

Response

Parameter

Type

Position

Mandatory

Description

errorCode

Integer

Body

No

Error code.

  • 0: success
  • Other values: failure

errorMsg

String

Body

No

Error description.

intentions

intention[]

Body

Yes

Intention list (array structure).

Default intentions are not included, for example, unknown intentions and sensitive words.

total

Integer

Body

Yes

Number of returned intentions.

Table 3 intention

Parameter

Type

Position

Mandatory

Description

intentCmd

String

Body

No

Command word.

intentName

String

Body

O

Intention name (format: Domain name/Intention name-Command word).

intentDesc

String

Body

No

Intention description.

Example

  • Request
    { 
        "tenantId":"202104237142",
        "language":"en_US",
        "pageNum":1,
        "pageSize":20,
        "authToken": "t*********************",
        "domainInfo":{
           "domainName":"Chatbot",
            "domainId": "10149"
        }
    }
  • Response
    {
        "errorMsg": "",
        "errorCode": 0,
        "intentions": [
            {
                "intentName": "Address for car moving",
                "intentDesc": " ",
                "intentCmd": "Address for car moving"
            },
            {
                "intentName": "Social security service",
                "intentDesc": " ",
                "intentCmd": "Social security service"
            },
            {
                "intentName": "Car moving service",
                "intentDesc": "Car moving service",
                "intentCmd": "Car moving"
            },
            {
                "intentName": "Housing provident fund issue",
                "intentDesc": " ",
                "intentCmd": "Housing provident fund issue"
            },
            {
                "intentName": "Yes/No",
                "intentDesc": " ",
                "intentCmd": "Yes/No"
            },
            {
                "intentName": "Housing provident fund service",
                "intentDesc": " ",
                "intentCmd": "Housing provident fund"
            }
        ],
        "total": 6
    }