删除切片
更新时间:2025-02-18
接口描述
删除指定切片
权限说明
Authorization需要填写密钥。
接口定义
Path | /v2/knowledgeBase?Action=DeleteChunk |
---|---|
Method | POST |
Content-Type | application/json |
Authorization | 请求签名(Bearer <AppBuilder API Key>) |
请求结构
Plain Text
1POST /v2/knowledgeBase?Action=DeleteChunk HTTP/1.1
2HOST: qianfan.baidubce.com
3Authorization: Bearer <AppBuilder API Key>
4Content-Type: application/json
5{
6 "knowledgeBaseId": "knowledgeBaseID",
7 "chunkId": "chunkID"
8}
请求头域
除公共头域外,无其它特殊头域。
请求参数
字段 | 类型 | 是否必须 | 说明 |
---|---|---|---|
knowledgeBaseId | string | 是 | 知识库ID |
chunkId | string | 是 | 切片ID |
响应头域
除公共头域外,无其它特殊头域。
响应参数
字段 | 类型 | 必然存在 | 说明 |
---|---|---|---|
requestId | string | 是 | requestId |
请求curl 示例
Plain Text
1curl --___location 'https://qianfan.baidubce.com/v2/knowledgeBase?Action=DeleteChunk' \
2--header 'Authorization: Bearer <AppBuilder API Key>' \
3--header 'Content-Type: application/json' \
4--data '{
5 "chunkId": "b6f8a70b-fc34-4845-a89d-01f44052e389"
6}'
正确响应示例
Plain Text
1HTTP/1.1 200 OK
2{
3 "requestId": "f4189af1-2fed-47f4-b25e-9d6492540aaf"
4}
错误响应示例
Plain Text
1HTTP/1.1 401
2{
3 "requestId": "ae2225f7-1c2e-427a-a1ad-5413b762957d",
4 "code": "PermissionDeniedError",
5 "message": "没有权限"
6}