Updated on 2025-08-13 GMT+08:00

Querying the FAQ List

Function

This API is used to obtain the FAQ list, including the ID, question, answer, creator, and creation time. You can filter the FAQs based on the keywords.

URI

GET /v1/{project_id}/applications/{application_id}/uni-search/{repo_id}/faq

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Constraints:

N/A

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

application_id

Yes

String

Definition:

Application ID. For details about how to obtain the application ID, see Obtaining an Application ID.

Constraints:

Character string

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

repo_id

Yes

String

Definition:

Knowledge base ID.

How to obtain:

Log in to the KooSearch experience platform. In the navigation tree on the left, choose Knowledge Bases to view knowledge base IDs. Each knowledge base has a unique ID stored in the vector database.

Constraints:

N/A

Value range:

Length: 1 to 64 characters. The value can contain only digits, letters, hyphens (-), and underscores (_).

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

question

No

String

Definition:

Question keywords.

Constraints:

N/A

Value range:

A maximum of 1,000 characters are allowed.

Default value:

N/A

answer

No

String

Definition:

The answer of an FAQ.

Constraints:

N/A

Value range:

The value cannot exceed 10,000 characters.

Default value:

N/A

page_num

No

Integer

Definition:

Page number of the current request, indicating the start page from data retrieval. The default value is 1, indicating to start from the first page.

Constraints:

N/A

Value range:

1-65535

Default value:

1

page_size

No

Integer

Definition:

Number of records displayed on each page, indicating the number of records returned per request. The default value is 10, indicating that 10 records are displayed on each page.

Constraints:

N/A

Value range:

1-65535

Default value:

10

ids

No

Array of strings

Definition:

FAQ ID list.

Constraints:

N/A

Value range:

Each ID can contain only 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed.

Default value:

N/A

create_user

No

String

Definition:

Creator name

Constraints:

N/A

Value range:

The user name contains 1 to 64 characters.

Default value:

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

records

Array of FaqInfo objects

Definition:

FAQ information.

Value range:

N/A

total

Integer

Definition:

Total number.

Value range:

N/A

size

Integer

Definition:

Number of records per page.

Value range:

N/A

current

Integer

Definition:

Current page number.

Value range:

N/A

optimize_count_sql

Boolean

Definition:

This parameter can be ignored.

Value range:

N/A

search_count

Boolean

Definition:

This parameter can be ignored.

Value range:

N/A

pages

Integer

Definition:

Total number of pages.

Value range:

N/A

Table 5 FaqInfo

Parameter

Type

Description

id

String

Definition:

FAQ ID.

Value range:

N/A

repo_id

String

Definition:

Knowledge base ID.

Value range:

N/A

question

String

Definition:

Question.

Value range:

N/A

answer

String

Definition:

Answer.

Value range:

N/A

status

String

Definition:

This parameter can be ignored.

Value range:

N/A

create_user

String

Definition:

Creator.

Value range:

N/A

create_time

String

Definition:

Creation time.

Value range:

N/A

update_time

String

Definition:

Update time.

Value range:

N/A

question1

String

Definition:

Similar question 1.

Value range:

N/A

question2

String

Definition:

Similar question 2.

Value range:

N/A

question3

String

Definition:

Similar question 3

Value range:

N/A

question4

String

Definition:

Similar question 4.

Value range:

N/A

category

String

Definition:

Directory, which is a single value and corresponds to a leaf node in the directory tree.

Value range:

N/A

tags

Array of strings

Definition:

Tag list.

  1. A document can have more than one tag.

  2. It is recommended that the tag value be case insensitive.

  3. Do not use reserved characters (+ - = && || > <!). Otherwise, you will need to escape them in queries. ( ) { } [ ] ^ " ~ * ? : \ /

  4. The tag list must be replaced as a whole. Partial update is not supported.

Value range:

N/A

file_id

String

Definition:

File ID.

Value range:

N/A

project_id

String

Definition:

Project ID.

Value range:

N/A

component_num

Integer

Definition:

Chunk sequence number

Value range:

N/A

page_num

Integer

Definition:

Number of pages.

Value range:

N/A

Example Requests

Query an FAQ list instance.

/v1/12345678/applications/12345678/uni-search/12345678aaa/faq??page_num=1&page_size=10&question = Hello

Example Responses

Status code: 200

Query succeeded.

{
  "records" : [ {
    "id" : "991a482a-8330-4338-bdda-32852504bb38",
    "repo_id" : "b4254b30-f241-476c-b003-63df8f1cc221",
    "question" : "What can I do if I cannot log in to my account?",
    "answer" : "Make sure you use the correct username and password. If the login still fails, reset the password or contact customer service.",
    "status" : 0,
    "create_time" : "1700807345932",
    "update_time" : "1700807345932"
  }, {
    "id" : "d3477f5c-f7d7-409c-a709-b56df8a7341c",
    "repo_id" : "b4254b30-f241-476c-b003-63df8f1cc221",
    "question" : "How do I apply for admission?",
    "answer" : "Please check our official website or contact the Admissions Office for admission requirements, application deadlines, and required materials. We also provide admission consultant services.",
    "status" : 0,
    "create_time" : "1700807328240",
    "update_time" : "1700807328240"
  } ],
  "total" : 2,
  "size" : 10,
  "current" : 1,
  "optimize_count_sql" : true,
  "search_count" : true,
  "pages" : 1
}

Status Codes

Status Code

Description

200

Query succeeded.

Error Codes

See Error Codes.