Get Knowledge Base List
Get Knowledge Base List
Retrieve the list of knowledge bases within the Agent.
Request Method
GET
Request URL
https://api-${endpoint}.gptbots.ai/v1/bot/knowledge/base/page
Request Authentication
See Overview for authentication details.
Request
Request Example
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/bot/knowledge/base/page' \
-H 'Authorization: Bearer ${API Key}'
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/bot/knowledge/base/page' \
-H 'Authorization: Bearer ${API Key}'
บล็อกโค้ดนี้ในหน้าต่างลอย
Request Header
Field | Type | Description |
---|---|---|
Authorization | Bearer ${API Key} | Use Authorization: Bearer ${API Key} for authentication. Get API key from API Key page. |
Request Parameters
None.
Response
Response Example
{
"knowledge_base": [
{
"id": "xxxxxx",
"name": "My Knowledge Base",
"desc": "This is my knowledge base.",
"doc": 10,
"chunk": 1000,
"token": 1000000,
"owner_id": "xxxxxx",
"owner_email": "johnlee@gptbots.ai"
},
{
"id": "xxxxxx",
"name": "My Knowledge Base 2",
"desc": "This is my knowledge base 2.",
"doc": 10,
"chunk": 1000,
"token": 1000000,
"owner_id": "xxxxxx",
"owner_email": "jasonwong@gptbots.ai"
}
]
}
{
"knowledge_base": [
{
"id": "xxxxxx",
"name": "My Knowledge Base",
"desc": "This is my knowledge base.",
"doc": 10,
"chunk": 1000,
"token": 1000000,
"owner_id": "xxxxxx",
"owner_email": "johnlee@gptbots.ai"
},
{
"id": "xxxxxx",
"name": "My Knowledge Base 2",
"desc": "This is my knowledge base 2.",
"doc": 10,
"chunk": 1000,
"token": 1000000,
"owner_id": "xxxxxx",
"owner_email": "jasonwong@gptbots.ai"
}
]
}
บล็อกโค้ดนี้ในหน้าต่างลอย
Success Response
Field | Type | Description |
---|---|---|
knowledge_base | Array<Object> | List of knowledge bases. |
id | String | ID of the knowledge base. |
name | String | Name of the knowledge base. |
desc | String | Description of the knowledge base. |
doc | Integer | Number of documents in the knowledge base. |
chunk | Integer | Number of knowledge chunks in the knowledge base. |
token | Number | Number of tokens in the knowledge base. |
owner_id | String | Owner ID of the knowledge base. |
owner_email | String | Owner's email of the knowledge base. |
Failure Response
Field | Type | Description |
---|---|---|
code | Int | Error code. |
message | String | Error details. |