Available in Classic and VPC
Get the retention information set on an Ncloud Storage object.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| GET | /{Key} |
Request headers
For information about the headers common to all Ncloud Storage APIs, see Ncloud Storage request headers.
Request path parameters
You can use the following path parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
Key |
String | Required | Object name |
Request query parameters
You can use the following query parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
versionId |
String | Optional | Version ID of the object to query the retention status for
|
Request example
The request example is as follows:
GET /object.csv?retention HTTP/1.1
Host: {Bucket}.kr.ncloudstorage.com
Response
This section describes the response format.
Response headers
For information about the headers common to all Ncloud Storage APIs, see Ncloud Storage response headers.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
Retention |
Object | - | Retention settings |
Retention.Mode |
String | - | Retention mode
|
Retention.RetainUntilDate |
String | - | Retention expiration date
|
Response status codes
The following describes the response status codes.
For information about the HTTP status codes common to all Ncloud Storage APIs, see Common Ncloud Storage response status codes.
| Error code | HTTP status code | Description |
|---|---|---|
InvalidRequest |
400 | No object lock settings exist in the bucket. |
NoSuchObjectLockConfiguration |
404 | No retention settings exist in the object. |
NoSuchKey |
404 | Specified object does not exist. |
NoSuchVersion |
404 | Specified version does not exist. |
Response example
The response example is as follows:
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<Retention xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Mode>GOVERNANCE</Mode>
<RetainUntilDate>2025-12-31T00:00:00.000Z</RetainUntilDate>
</Retention>