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 页面(https://agent.console.aliyun.com/settings/apikey)获取。

Body

application/json
string
required

文件 ID,通过 listFile 获取。

Response

200-application/json
string

响应码,成功时为 Success

integer

HTTP 状态码。

string

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

object

删除操作无返回数据。

Managed Agent API
Connector API
Memory API
框架集成
  • 框架