Updated on 2025-11-07 GMT+08:00

Querying Associated Questions

Function

Query associated questions based on the current input.

URI

POST /v2/irobot/qapairs/associate

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token.

It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Minimum length: 1

Maximum length: 5000

x-service-key

Yes

String

Specifies the flag for invoking the intelligent customer service.

Minimum length: 1

Maximum length: 32

x-site

No

String

Specifies the site flag. The options are 0 (Chinese mainland) and 1 (international).

Minimum length: 0

Maximum length: 1

x-language

No

String

Specifies the region language with a language abbreviation. The options are en-us and zh-cn.

Minimum length: 0

Maximum length: 32

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

question

Yes

String

Specifies the question entered by a user.

Minimum length: 1

Maximum length: 1000

top

No

Integer

Requests for the number of data records with the highest matching degree.

Minimum value: 1

Maximum value: 10

domains

No

Array of strings

Specifies the domain to which the Q&A belongs.

Minimum length: 1

Maximum length: 200

Array length: 0 - 200

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

questions

Array of strings

Specifies the question list.

Minimum length: 1

Maximum length: 65535

Array length: 0 - 65535

error_code

String

Specifies the error code.

Minimum length: 0

Maximum length: 32

error_msg

String

Describes the error.

Minimum length: 0

Maximum length: 32

Request Example

POST https://{endpoint}/v2/irobot/qapairs/associate

{
  "question" : "User question",
  "top" : 10,
  "domains" : [ "ECS" ]
}

Response Example

Status code: 200

Code 200 is returned if the operation is successful.

{
  "questions" : [ "Question 1", "Question 2" ]
}

Status Codes

Status Code

Description

200

Code 200 is returned if the operation is successful.

Error Codes

See Error Codes.