Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
DELETE /api/v1/file/`{LibraryId}`/`{SpaceId}`/`{FilePath}`?permanent=`{Permanent}`&access_token=`{AccessToken}`&user_id=`{UserId}`
Request parameters | Description | Type | Required or Not |
LibraryId | Media Library ID, obtained after creating a media library in the media hosting console. See create media library | String | Yes |
SpaceId | Space ID If the media library is in single-tenant mode, then this parameter is fixed as a hyphen (`-`). If the media library is in multi-tenant mode, this parameter is the space ID returned by the Create Tenant Space API. | String | Yes |
FilePath | String | Yes | |
Permanent | When the media library enables the recycle bin, this parameter specifies whether to move the files to the recycle bin or permanently delete the files. 1: Permanently delete, 0: Move to recycle bin. Default is 0. | Integer | No |
AccessToken | Access token, see Generate Access Token | String | Yes |
UserId | User identity recognition. When the permission corresponding to the access token is administrator permission and the user identity recognition when applying for the access token is empty, it is used to temporarily specify user identity. For details, see Generate Access Token API. | String | No |
{"recycledItemId": 392}
Response Parameters | Description | Type |
recycledItemId | Recycle bin project ID, used to permanently delete or restore a designated project from the recycle bin. | Integer |
DELETE /api/v1/file/smhxxx/spacexxx/hello.txt?access_token=*** HTTP/1.1Host: smhxxx.api.tencentsmh.cnUser-Agent: curl/8.5.0Accept: */*
HTTP/1.1 200 OKDate: Thu, 13 Nov 2025 12:03:07 GMTContent-Type: application/json; charset=utf-8Content-Length: 23Server: nginx/1.29.0X-Request-Id: 1134a11c72aae4f9436150715ffxxxxx{"recycledItemId":1221}
DELETE /api/v1/file/smhxxx/spacexxx/hello.txt?permanent=1&access_token=*** HTTP/1.1Host: smhxxx.api.tencentsmh.cnUser-Agent: curl/8.5.0Accept: */*
HTTP/1.1 204 No ContentDate: Thu, 13 Nov 2025 11:59:07 GMTServer: nginx/1.29.0X-Request-Id: 31cd0b6354901448bbfff8602fexxxxx
DELETE /api/v1/file/smhxxx/spacexxx/hello.txt?access_token=*** HTTP/1.1Host: smhxxx.api.tencentsmh.cnUser-Agent: curl/8.5.0Accept: */*
HTTP/1.1 204 No ContentDate: Thu, 13 Nov 2025 12:06:13 GMTServer: nginx/1.29.0X-Request-Id: 39c5971c236e7d49ddd4f383f15xxxxx
DELETE /api/v1/file/smhxxx/spacexxx/path/to/non_existent_file.txt?access_token=*** HTTP/1.1Host: smhxxx.api.tencentsmh.cnUser-Agent: curl/8.5.0Accept: */*
HTTP/1.1 404 Not FoundDate: Thu, 13 Nov 2025 12:07:28 GMTContent-Type: application/json; charset=utf-8Content-Length: 141Server: nginx/1.29.0X-Request-Id: 7ed191d7a75dd90ccc8ff2905d8xxxxx{"status":404,"code":"FileNotFound","message":"File not found.","requestId":"7ed191d7a75dd90xxxxxf2905d8b6ef1","qualifier":"","revision":""}
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários