Tenant Cloud
Storage
Cloud Object Storage
API References
Querying the Object Locking Expiration Date
Description
This API is used to obtain the expiration date of object locking.
Request
Request Example
GET /<object-key>?retention HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: GMT Date
Authorization: Auth String
Note:
<BucketName-APPID>is the bucket name with APPID as the suffix, for example, examplebucket-1250000000.- Authorization: Auth String (For details, refer to Request Signature).
Request Header
This API only uses common request headers. For details, please refer to the Common Request Headers document.
Request Body
The request body of this request is empty.
Response
Response Headers
This API only returns common response headers. For details, please refer to the Public Response Headers document.
Response Body
<?xml version="1.0" encoding="UTF-8" ?>
<Retention>
<RetainUntilDate>timestamp</RetainUntilDate>
</Retention>
The detailed data is described as follows:
| Node Name (Keyword) | Parent Node | Description | Type |
|---|---|---|---|
| Retention | No | Period | Container |
| RetainUntilDate | Retention | Specific expiration date | String Date |
Error Code
This API follows unified error responses and error codes. For details, see Error Code.
Practical Case
Request
GET /temp.txt?retention HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Authorization: Auth String
Response
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 87
Connection: keep-alive
Date: Fri, 09 Dec 2022 08:35:49 GMT
x-cos-request-id: NjM5MmYzNjVfMjBkMDM4MGJfMWM2ND****
<Retention>
<RetainUntilDate>2022-12-10T08:34:48.000Z</RetainUntilDate>
</Retention>