tencent cloud

Feedback

Cloud Object Storage
DocumentationCloud Object Storage
DocumentationCloud Object Storage

GET Object retention

Last updated: 2024-03-28 18:12:17

Overview

This API is used to obtain the expiration date of object lock.

Request

Sample request

GET /<object-key>?retention HTTP/1.1
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
Date: GMT Date
Authorization: Auth String
Note:
In Host: <BucketName-APPID>.cos.<Region>.myqcloud.com, <BucketName-APPID> is the bucket name followed by the APPID, such as examplebucket-1250000000 (see Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions), and <Region> is a COS region (see Regions and Access Endpoints).
Authorization: Auth String (See Request Signature for details.)

Request headers

This API only uses Common Request Headers.

Request body

The request body of this request is empty.

Response

Response headers

This API only returns Common Response Headers.

Response body

<?xml version="1.0" encoding="UTF-8" ?>
<Retention>
<RetainUntilDate>timestamp</RetainUntilDate>
</Retention>
The nodes are described as follows:
Node Name (Keyword)
Parent Node
Description
Type
Retention
None
Retention period (during which an object remains locked)
Container
RetainUntilDate
Retention
Expiration date of the retention period
String

Error codes

This API returns common error responses and error codes. For more information, see Error Codes.

Examples

Request

GET /temp.txt?retention HTTP/1.1
Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.com
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
Server: tencent-cos
x-cos-request-id: NjM5MmYzNjVfMjBkMDM4MGJfMWM2ND****

<Retention>
<RetainUntilDate>2022-12-10T08:34:48.000Z</RetainUntilDate>
</Retention>


Catalog

In The Article

GET Object retention

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon