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

Torch Object Storage

Copy page
Download PDF
WORM object
GetObjectRetention
Copy page
Download PDF
GetObjectRetention
Function Description​
This interface is used to obtain the retention policy information of an object.​
Precautions​
When versioning is enabled for a storage bucket, if no version number is specified, the retention policy information for the latest version object will be retrieved by default.​
Request syntax​
​
GET /objectname?retention HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Date: GMT Date​
Authorization: authorization string​
​
Request parameters and headers​
The public message header used by this request. See Common parameters.​
​
Name​
Location​
Type​
Required​
Sample Value​
Description​
retention​
Query​
String​
Yes​
-​
A special identifier representing the GetObjectRetention request.​
versionId​
Query​
String​
No​
57AF1A32CECB56721267​
The version number of the object.​
​
Request body elements​
This request does not use message elements.​
Response headers​
This request returns public response message headers.​
Response body elements​
​
Name​
Type​
Sample Value​
Description​
Mode​
String​
COMPLIANCE​
The retention policy mode can only be set to COMPLIANCE, which means compliance mode. In this mode, no user can delete or overwrite locked objects during the retention period.​
RetainUntilDate​
String​
2025-01-01T00:00:00Z​
Retention period, the deadline by which an object cannot be deleted or overwritten.​
​
Sample request​
​
GET /objectname?retention HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Date: GMT Date​
Authorization: authorization string​
​
Sample response​
​
HTTP/1.1 200 OK​
x-tos-id-2: f91b0c03a01300c1-a444ed0​
x-tos-request-id: f91b0c03a01300c1-a444ed0​
Date: Fri, 30 Jul 2021 06:45:39 GMT​
server: TosServer​
Content-Length: 62​
​
{​
"Mode": "COMPLIANCE",​
"RetainUntilDate": "2025-07-22T00:00:00Z"​
}​
​
​
Last updated: 2025.09.29 17:27:02