刪除文件
刪除文件
從知識庫中刪除文件。
請求方法
DELETE
請求 URL
https://api-${endpoint}.gptbots.ai/v1/bot/doc/batch/delete
請求驗證
請參考概述部分以獲取驗證相關的詳細資訊。
請求
請求範例
curl -X DELETE 'https://api-${endpoint}.gptbots.ai/v1/bot/doc/batch/delete?doc=67501ddb8cf3c334cd0e8e70,12345ddb8cf3c334cd0e0987' \
-H 'Authorization: Bearer ${API Key}'
curl -X DELETE 'https://api-${endpoint}.gptbots.ai/v1/bot/doc/batch/delete?doc=67501ddb8cf3c334cd0e8e70,12345ddb8cf3c334cd0e0987' \
-H 'Authorization: Bearer ${API Key}'
此代碼塊在浮窗中顯示
說明:請將
${endpoint}替換為您的服務端點,${API Key}替換為您的 API Key(應用程式介面金鑰)。
請求標頭
| 欄位 | 資料類型 | 欄位描述 |
|---|---|---|
| Authorization | Bearer ${API Key} | 使用 Authorization: Bearer ${API Key} 進行驗證。API Key(應用程式介面金鑰)可從 API Key 頁面獲取。 |
請求參數
| 欄位 | 資料類型 | 是否必填 | 欄位描述 |
|---|---|---|---|
| doc | Array<String> | 是 | 要刪除的文件 ID。 |
回應
回應範例
{
"code": 0,
"message": "OK"
}
{
"code": 0,
"message": "OK"
}
此代碼塊在浮窗中顯示
成功回應
| 欄位 | 資料類型 | 欄位描述 |
|---|---|---|
| code | Int | 回應代碼。 |
| message | String | 回應詳細資訊。 |
失敗回應
| 欄位 | 資料類型 | 欄位描述 |
|---|---|---|
| code | Int | 錯誤代碼。 |
| message | String | 錯誤詳細資訊。 |
