Skip to main content

删除文件

永久删除指定的文件

POST
/api/v1/connector/dash/deleteFile
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/connector/dash/deleteFile" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileId": "file_abc123"
  }'
{
  "code": "Success",
  "status_code": 200,
  "data": {},
  "requestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
此操作不可逆。删除后文件数据将被永久移除,无法恢复。本接口仅删除数据管理(数据集)中的文件,不会删除已导入知识库的文档及其切片索引;如需从知识库移除该文档,请另行调用删除文档。

Authorizations

string
header
required

DashScope API Key,在控制台 API Key 页面 获取。

Body

application/json
string
required

文件 ID,通过 listFile 获取。

Response

200-application/json
string

响应码,成功时为 Success。

integer

响应状态码。

string

错误或提示信息,成功时为空字符串。

string

请求唯一标识,排查问题时请提供此 ID。

object

删除结果。

integer

业务状态码。成功为 200,参数错误等失败场景为 400。注意失败时 HTTP 状态码仍为 200,需根据本字段与 code 判断结果。