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.
Coba sekarang
Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.
RAM authorization
Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.
Sintaks permintaan
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