删除知识库
更新时间:2025-02-18
接口描述
删除指定知识库
在线调试
百度智能云千帆提供了 API在线调试平台-示例代码 ,用于帮助开发者调试接口,平台集成快速检索、查看开发文档、查看在线调用的请求内容和返回结果、复制和下载示例代码等功能,支持Python、Java、PHP、C#、Go、Node.js、C++ 7种主流语言示例代码自动生成。
权限说明
Authorization需要填写密钥
接口定义
Path | /v2/knowledgeBase?Action=DeleteKnowledgeBase |
---|---|
Method | POST |
Content-Type | application/json |
Authorization | 请求签名(Bearer <AppBuilder API Key>) |
请求结构
Plain Text
1POST /v2/knowledgeBase?Action=DeleteKnowledgeBase HTTP/1.1
2HOST: qianfan.baidubce.com
3Authorization: Bearer <AppBuilder API Key>
4Content-Type: application/json
5
6{
7 "id": "knowledgeBaseID"
8}
请求头
除公共头域外,无其它特殊头域。
请求参数
字段 | 类型 | 是否必须 | 说明 |
---|---|---|---|
id | string | 是 | 知识库 id |
响应头域
除公共头域外,无其它特殊头域。
响应参数
字段 | 类型 | 必然存在 | 说明 |
---|---|---|---|
requestId | string | 是 | requestId |
请求curl 示例
Plain Text
1curl --location 'https://qianfan.baidubce.com/v2/knowledgeBase?Action=DeleteKnowledgeBase' \
2--header 'Authorization: Bearer <AppBuilder API Key>' \
3--header 'Content-Type: application/json' \
4--data '{
5 "id":"5e12955f-6b45-4f54-b2b6-84369f068a3d"
6}'
正确响应示例
Plain Text
1HTTP/1.1 200 OK
2{
3 "requestId": "46017562-637f-402a-9000-cfe535986d5d"
4}
错误响应示例
Plain Text
1HTTP/1.1 400
2{
3 "code": "InvalidRequestArgumentError",
4 "message": "Dataset Not Found",
5 "requestId": "9873898f-4af9-42da-b670-7cd71de8c4d2"
6}