You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
API reference
GetBucketTrash
Copy page
Download PDF
GetBucketTrash
Description​
This interface is used to retrieve the Recycle Bin rules for hierarchical namespaces.​
Usage​
This interface currently only supports hierarchical namespaces. For details, see Recycle Bin.​
Request syntax​
​
GET /?trash HTTP/1.1​
Host: bucket-name.tos-cn-beijing.volces.com​
Date: GMT Date​
Authorization: authorization string​
​
Request parameters and headers​
This request uses common request headers. See Common parameters.​
​
Name​
Location​
Type​
Required​
Sample value​
Description​
trash​
Query​
String​
Yes​
-​
Represents a special identifier for the GetBucketTrash request.​
​
Request body elements​
No elements are used.​
Response headers​
The common response headers returned by this request. See Common parameters.​
Response body elements​
​
Name​
Type​
Required​
Sample value​
Description​
BucketTrash​
Container​
Yes​
-​
Recycle Bin rule information.​
TrashPath​
String​
Yes​
.Trash​
Full path of the Recycle Bin.​
CleanInterval​
Integer​
Yes​
7​
The number of days after a file or directory moves to the Recycle Bin before it is permanently deleted. Must be a positive integer.​
Status​
String​
Yes​
Enabled​
Set whether the Recycle Bin is enabled. The values are explained as follows:​
  • Enabled: Enables the Recycle Bin function.​
  • Disabled: Disables the Recycle Bin function.​
​
Sample request​
​
GET /?trash HTTP/1.1​
Host: bucket-name.tos-cn-beijing.volces.com​
Date: Mon, 14 Apr 2021 01:17:29 GMT ​
Authorization: authorization string​
​
Sample response​
​
HTTP/1.1 200 OK​
Date: Fri, 30 Jul 2021 13:53:55 GMT​
Server: TosServer​
x-tos-id-2: 1e89f203jld00006-a444fd0​
x-tos-request-id: 1e89f203b2d00006-a444ed0​
Content-Length: ***​
{​
"Trash": {​
"TrashPath": ".Trash",​
"CleanInterval": 7,​
"Status": "Enabled"​
}​
}​
​
If no recycle bin rules are set, the default rule is returned, as shown in the example below.​
​
HTTP/1.1 200 OK​
Date: Fri, 30 Jul 2021 13:53:55 GMT​
Server: TosServer​
x-tos-id-2: 1e89f203jld00006-a444fd0​
x-tos-request-id: 1e89f203b2d00006-a444ed0​
Content-Length: ***​
{​
"Trash": {​
"TrashPath": ".Trash",​
"CleanInterval": 7,​
"Status": "Disabled"​
}​
}​
​
​
Last updated: 2026.08.03 10:30:02