DeleteBucketTrash
Updated at:2025-11-03
API description
This API is used to disable the trash function. The user must have FULL_CONTROL permissions on the source bucket and also be the owner of the target bucket.
Request
-
Request syntax
Plain Text1DELETE /?trash HTTP/1.1 2Host: <BucketName>.bj.bcebos.com 3Date: <Date> 4Authorization: <AuthorizationString> -
Request headers
No special header parameters
-
Request elements
None
Response
| Name | Description |
|---|---|
| trashDir | The trash folder, with a length limit. Optional. It defaults to .trash if empty. |
The response results are explained as follows:
| Result | http status | error code | Description |
|---|---|---|---|
| Succeeded | 204 | - | - |
| The bucket does not exist | 404 | NoSuchBucket | - |
| No permission | 403 | AccessDenied | Only the bucket owner can perform this operation |
Plain Text
1> Note: Even when trash function is disabled, return 204, and ensure the compliance with the requirement for deleting idempotence.
Example
-
Request example
Plain Text1DELETE /?trash HTTP/1.1 2Host: bucket.bj.bcebos.com 3x-bce-date: date 4Authorization: AuthorizationString -
Response example
Plain Text1HTTP/1.1 204 OK 2x-bce-request-id: 4db4b34d-653d-4d9a-b49b-3049ca786409 3Date: Wed, 31 May 2017 08:34:40 GMT 4Server: BceBos 5Connection: keep-alive
