Menghapus file secara batch.
Deskripsi operasi
Deleting data tables through the API is not supported. To delete a data table or specific data in a table, go to Application Data.
This API is used to delete files in Application Data. It does not affect knowledge bases that have already been built. To delete files in a knowledge base, call the DeleteIndexDocument operation.
A RAM user (sub-account) must first obtain the API permissions for Alibaba Cloud Model Studio (requires
AliyunBailianDataFullAccess, which already includes the sfm:DeleteFiles permission) and join a workspace before calling this operation. The Alibaba Cloud account (main account) can call this operation directly without authorization. We recommend that you use the latest version of the Alibaba Cloud Model Studio SDK to call this operation.This operation can only delete files whose status is parsing failed (PARSE_FAILED) or parsing succeeded (PARSE_SUCCESS).
This operation is idempotent.
Throttling: Frequent calls to this operation are throttled. Do not exceed 10 queries per second (QPS). If you are throttled, try again later.
Coba sekarang
Test
RAM authorization
Sintaks permintaan
POST /{WorkspaceId}/datacenter/file/delete HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
ID ruang kerja tempat kategori berada. Untuk informasi cara mendapatkannya, lihat Cara menggunakan ruang kerja. |
llm-mbhn96xxxx |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| FileIds |
array |
Yes |
Daftar ID file yang akan dihapus. Maksimal 20 file dapat dihapus dalam satu permintaan. |
|
|
string |
No |
The ID of the file to be deleted. |
file_xxxx |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Code |
string |
The error code. |
DataCenter.FileTooLarge |
| Data |
object |
The returned data. |
|
| DeleteFileResultList |
array<object> |
The deletion results. |
|
|
object |
The deletion result of a single file. |
||
| FileId |
string |
file_6b193b9b4b1546ef9eaa7340e69adfca_10052857 |
|
| Status |
string |
DELETED |
|
| Message |
string |
The error message. |
Required parameter(%s) missing or invalid, please check the request parameters. |
| RequestId |
string |
Id of the request |
17204B98-7734-4F9A-8464-2446A84821CA |
| Status |
string |
The status code returned by the API. |
200 |
| Success |
boolean |
Indicates whether the API call is successful. Valid values:
|
true |
Contoh
Respons sukses
JSONformat
{
"Code": "DataCenter.FileTooLarge",
"Data": {
"DeleteFileResultList": [
{
"FileId": "file_6b193b9b4b1546ef9eaa7340e69adfca_10052857",
"Status": "DELETED"
}
]
},
"Message": "Required parameter(%s) missing or invalid, please check the request parameters.",
"RequestId": "17204B98-7734-4F9A-8464-2446A84821CA",
"Status": "200",
"Success": true
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.