Skip to main content

Delete File

Permanently delete a file.

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"
}
This operation is irreversible. File data is permanently removed and cannot be recovered. This endpoint only deletes the file from Data Management (the dataset); it does not delete the document or its chunk index already imported into a Knowledge Base. To remove the document from a Knowledge Base, call Delete document separately.

Authorizations

string
header
required

DashScope API Key, obtained from the API Key page in the console.

Body

application/json
string
required

File ID. Returned by listFile.

Response

200-application/json
string

Response code. Success on success.

integer

Response status code.

string

Error or informational message; an empty string on success.

string

Unique request identifier. Include this ID when reporting an issue.

object

Deletion result.

integer

Business status code. 200 on success, 400 for failures such as invalid parameters. Note that the HTTP status code remains 200 even on failure, so rely on this field and code to determine the result.