Bulk Delete Image Files
Deletes multiple image files in one request. Up to 100 image files can be deleted at a time.
Request URL
DELETE {base_url}/uc-cautop/api/v1/image-files/batch
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code No String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description ids Yes Array<String> The list of IDs of the image files to delete, supporting 1 to 100 image files. You can obtain the IDs using the Search Image Files interface. Note:idssupports 1 to 100 items. The request fails with an error if the array is empty.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<Batch_Delete_Result> | The batch deletion result. |
- Batch_Delete_Result
-
Parameter Type Description successCount Integer The number of image files deleted successfully. failedCount Integer The number of image files that fail to be deleted. failures Array<Failure_Item> The list of image files that fail to be deleted, with failure reasons.
- Failure_Item
-
Parameter Type Description id String The ID of the failed image file. code String The error code of the failure. message String The description of the failure reason.
Example
Request example
DELETE /uc-cautop/api/v1/image-files/batch HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzYyOTgxMSwiaWF0IjoxNzkzNjA4MjExLCJqdGkiOiJkNmEzZjJlZi03N2VhLTQ1ZGMtYTUzYS1mNGZhYjYzM2M0NDUiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.zNOWIXkT6Vqbu8R3WEwh2xfg2FmcSugvLMxWRgx8dTezP5EAndoH7txA937ygQMC1yKwUzgPOmfHALNnAk9X9aQpMbNQq5PTsaLIqo-J4WBDE_vpM_2jPIMlye0Ms_fu8L-B7Zp0ipwFEz_Foj-53_-EvOT3e1cpCf7-cR5OaHBJdgcjtbiB8H1kv6iKi4hlWLKi8tB5nR9D_IR4cpNSxmpRxPS52cyU1527A4wM-OfflCMhOMmxR5XxUAmuQRdLDhW9exv0-O8MAbmejrFt74nzbxW0rdW9nXPx9qDPn6RQYKG8OGKql2SflfezyUKlnhJLGDCjRr3Zp4ZT0FlPhQ
Content-Type: application/json
{
"ids": [
"123456789012345678",
"123456789012345679"
]
}
Response example
HTTP/1.1 200 OK { "requestId": "5d9d616beca4a7267875663950033368", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "successCount": 0, "failedCount": 2, "failures": [ { "id": "123456789012345678", "code": "404", "message": "image not found" }, { "id": "123456789012345679", "code": "404", "message": "image not found" } ] } }