知识库详情
更新时间:2025-08-19
POST
https://qianfan.baidubce.com/v2/knowledgeBase?Action=DescribeKnowledgeBase
获取指定知识库详情
权限说明
调用本API,需使用API Key鉴权方式。Authorization的值为Bearer <API Key>。获取API Key流程,请查看授权。
请求参数
Headers 参数
除公共头域外,无其它特殊头域
Body 参数
id
string
知识库 id
必选
请求结构
POST /v2/knowledgeBase?Action=DescribeKnowledgeBase HTTP/1.1
HOST: qianfan.baidubce.com
Authorization: Bearer <API Key>
Content-Type: application/json
{
"id": "knowledgeBaseID"
}
示例代码
curl
curl --location 'https://qianfan.baidubce.com/v2/knowledgeBase?Action=DescribeKnowledgeBase' \
--header 'Authorization: Bearer <API Key>' \
--header 'Content-Type: application/json' \
--data '{
"id":"5e12955f-6b45-4f54-b2b6-84369f068a3d"
}'
返回响应
Headers 参数
除公共头域外,无其它特殊头域
返回参数
id
string
知识库id
必选
name
string
知识库名称
必选
config
object {2}
知识库配置
必选
显示子属性
隐藏子属性
index
object {2}
知识库托管配置
必选
显示子属性
隐藏子属性
type
string
知识库索引存储配置 (official | bes | vdb)
必选
esUrl
string
bes 访问地址
必选
catalogue
object {1}
知识库目录配置
可选
显示子属性
隐藏子属性
pathPrefix
string
知识库所属目录绝对路径
可选
requestId
string
requestId
必选
description
string
知识库描述
必选
JSON
HTTP/1.1 200 OK
{
"requestId": "75a340ee-bfb5-40c2-b0a9-de80400368c8",
"id": "5e12955f-6b45-4f54-b2b6-84369f068a3d",
"name": "knowledge_base",
"description": "knowledge_base description",
"config": {
"index": {
"type": "official",
"esUrl": ""
},
"catalogue":{
"pathPrefix": "/全部群组/##/##"
}
}
}
JSON
HTTP/1.1 400
{
"code": "InvalidRequestArgumentError",
"message": "Dataset Not Found",
"requestId": "aceb2ccb-2762-4a11-b8de-1c01c9ad5b35"
}