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/koosearch/repos/{repo_id}/faqs

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

repo_id

Yes

String

Knowledge base ID. The value is a string of 1 to 64 characters and can contain only digits, letters, hyphens (-), and underscores (_).

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.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

question

No

String

Question keywords.

answer

No

String

The answer to an FAQ.

page_num

No

Integer

Request page number.

page_size

No

Integer

Number of records returned on each page in the response body, for example, 5 records/page or 10 records/page.

ids

No

Array of strings

FAQ ID list.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Parameter description:

Token used for API authentication. For how to obtain the token, see section 3.2 "Authentication."

Constraints:

N/A.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

records

Array of FaqInfo objects

FAQ information

total

Integer

Total number.

size

Integer

Number of records on each page.

current

Integer

Current page number.

optimize_count_sql

Boolean

This parameter can be ignored.

search_count

Boolean

This parameter can be ignored.

pages

Integer

Total number of pages

Table 5 FaqInfo

Parameter

Type

Description

id

String

FAQ ID

repo_id

String

Knowledge base ID.

question

String

Question.

answer

String

Answer.

status

String

This parameter can be ignored.

create_time

String

Creation time.

update_time

String

Update time.

question1

String

Similar question 1

question2

String

Similar question 2

question3

String

Similar question 3

question4

String

Similar Question 4.

category

String

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

tags

Array of strings

Tag list.

Notes:

  1. A document can have one or more tags.

  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.

component_num

Integer

Number of the shard where the document shard is located. The value is fixed to 0 in the FAQ scenario.

page_num

Integer

Number of the page where the shard is located in the document. The value is fixed to 0 in the FAQ scenario.

Example Requests

None

Example Responses

Status code: 200

A success message is displayed.

{
  "records" : [ {
    "id" : "34dff58c-431a-47f1-96bc-b482f2474e3d",
    "repo_id" : "acd90739-2e22-4870-b2db-35018699b623",
    "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,
    "update_time" : "1731047738889",
    "component_num" : 0,
    "page_num" : 0
  }, {
    "id" : "4b92ec29-0151-4b33-8e0f-ff104b833099",
    "repo_id" : "acd90739-2e22-4870-b2db-35018699b623",
    "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,
    "update_time" : "1731047751205",
    "component_num" : 0,
    "page_num" : 0
  } ],
  "total" : 2,
  "size" : 10,
  "current" : 1,
  "pages" : 1
}

Status Codes

Status Code

Description

200

A success message is displayed.

Error Codes

See Error Codes.