Skip to main content

Object_file & folder

Use the Object:File&Folder API to create and manage policies and metadata related to files and folders.

Prerequisite

To call the API, refer to the API preparation guide.

API endpoint URL

The Object Storage API endpoint URL for the kr-central-2 region is:

Object_file & folder API endpoint format
https://objectstorage.kr-central-2.kakaocloud.com

Supported specifications

The Object REST API follows the OpenStack Swift API specifications.

Object REST-APISwift API terminology
AccountBucket account
ContainerBucket name
ObjectFolder and file
- Folder example: images/small
- File example: image/small/icon.jpg

Create folder

Users with Owner or Read-Write permissions can create folders within a bucket.

Request syntax
Create folder request syntax
curl --location --request PUT 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}/' \
--header 'X-Auth-Token: {x-auth-token}' \
--header 'Content-Type: application/directory' \
--header 'X-Object-Meta-Company: kakao enterprise'

API call method

MethodRequest URL
PUThttps://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}
PathTypeRequiredDescription
region_nameStringRequiredRegion name: kr-central-2
accountStringRequiredProject ID
- Available during token issuance (used/confirmed during token issuance process)
- Used as the Account value in Swift API
bucket_nameStringRequiredName of the bucket
pathStringRequiredFull folder path
- Example: image/small, images/small/icon.jpg

Request header

HeaderTypeRequiredDescription
X-Auth-TokenStringRequiredUser authentication token
Content-TypeStringRequiredFixed to application/directory
X-Object-Meta-{key_name}StringOptionalBucket metadata key specified by user
- Applies the Swift API prefix
X-amz-Meta-{key_name}StringOptionalBucket metadata key specified by user
- Applies the S3 API prefix

Response syntax

Status codes

HTTP StatusResponseDescription
201CreatedSuccess
401UnauthorizedAuthentication failed
403ForbiddenNo permission

Create and upload file

Users with Owner or Read-Write permissions can create or upload files to a bucket.

Request syntax
Create and upload file request syntax
curl --location --request PUT 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}/{file}' \
--header 'X-Auth-Token: {x-auth-token}' \
--header 'Content-Type: text/plain' \
--data-raw '{Content}'
API call method
MethodRequest URL
PUThttps://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}/{file}
PathTypeRequiredDescription
region_nameStringRequiredRegion name: kr-central-2
accountStringRequiredProject ID
- Confirmed during token issuance
- Used as Account in Swift API
bucket_nameStringRequiredBucket name
pathStringRequiredFull folder path
- Example: image/small, images/small/icon.jpg
fileStringRequiredFile name
- Example: icon.jpg
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequiredUser authentication token
Content-TypeStringOptionalMIME type of uploaded object
- If omitted, defaults to application/octet-stream
X-Object-Meta-{name}StringOptionalMetadata key specified by user
Content-LengthIntOptionalLength of content
Transfer-EncodingStringOptionalEncoding method:
- chunked: sends data in chunks (must omit Content-Length)
- compress, deflate, gzip, identity: compression algorithms
Request body elements
ElementTypeRequiredDescription
ContentRaw dataRequiredContent of the file
Status codes
HTTP StatusResponseDescription
201CreatedSuccess
401UnauthorizedAuthentication failed
403ForbiddenPermission denied

Upload large file

Since HTTP does not maintain persistent connections, file uploads can be interrupted if the TCP connection is lost. KakaoCloud Object Storage provides large object upload methods for reliable upload of large files.

caution
  • Not supported on encrypted buckets.
  • If uploading a file with the same name but a different size, leftover segment files may remain.
  • We recommend checking for and deleting orphaned segment files using object listing.

Large object upload methods

MethodDescription
DLO (Dynamic Large Object)Treats segmented objects as a single large object
- Swift protocol
SLO (Static Large Object)No naming or size restrictions on segments
- Swift protocol

DLO (Dynamic Large Object) method

The DLO method allows segmented objects to be recognized as one large object. It does not guarantee the integrity of each segment. When downloading the object, the Object Storage server recognizes the manifest and assembles the segments.

  1. Split a large object into segments.
  2. Upload each segment under a path.
  3. Upload a manifest object with X-Object-Manifest header. (The manifest can be uploaded first.)
DLO segment object upload
Request syntax
DLO segment object upload
curl --location --request PUT 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{DLO Manifest Object}/{Segment Objects...}' \
--header 'X-Auth-Token: {x-auth-token}' \
--data-raw '{segment_content}'
Example
DLO segment upload example
curl -X PUT -H 'X-Auth-Token: <token>' https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/test-bucket/DLO/00000001 --data-binary '1'
curl -X PUT -H 'X-Auth-Token: <token>' https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/test-bucket/DLO/00000002 --data-binary '2'
curl -X PUT -H 'X-Auth-Token: <token>' https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/test-bucket/DLO/00000003 --data-binary '3'
API call method
MethodURL
PUThttps://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{DLO Manifest Object}/{Segment Objects…}
Path parameters
ParameterTypeRequiredDescription
region_nameStringYeskr-central-2
accountStringYesProject ID
bucket_nameStringYesBucket name
DLO Manifest ObjectStringYesManifest object name
Segment Objects…StringYesSegmented object files in sequence
HeaderTypeRequiredDescription
X-Auth-TokenStringYesAuth token
Status codes
HTTP StatusResponseDescription
201CreatedSuccess
Upload DLO manifest object
Request syntax
DLO manifest upload request syntax
curl --location --request PUT 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{DLO Manifest Object}' \
--header 'X-Auth-Token: {x-auth-token}' \
--header 'X-Object-Manifest: {bucket_name}/{DLO Manifest Object}' \
DLO manifest object upload example
curl -X PUT -H 'X-Auth-Token: <token>' -H 'X-Object-Manifest: test-bucket/DLO' https://objectstorage.kr-central-2.kakaocloud.com/v1/{account}/test-bucket/DLO --data-binary ''
API call method
MethodURL
PUT
(Upload segmented objects)
https:/objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{DLO Manifest Object}/{Segment Object…}
PUT
(Upload manifest object itself)
https:/objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{DLO Manifest Object}
PathTypeRequiredDescription
region_nameStringRequiredkr-central-2
accountStringRequiredProject ID
- Confirmed during token issuance
- Used as Account in Swift API
bucket_nameStringRequiredBucket name
DLO Manifest ObjectStringRequiredName of the manifest object
Segment Object…StringRequiredMultiple segment objects can be uploaded
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequiredUser authentication token
X-Object-ManifestStringRequiredPath to the uploaded segment objects
- Format: {bucket_name}/{DLO Manifest Object}
Response syntax
Status codes
HTTP StatusResponseDescription
201CreatedSuccess
Download DLO
Request syntax
Download LO request syntax
curl --location --request GET 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{DLO Manifest Object}' \
--header 'X-Auth-Token: {x-auth-token}' \
Download DLO example
curl -H 'X-Auth-Token: <token>' https://objectstorage.kr-central-2.kakaocloud.com/v1/{account}/test-bucket/DLO
API call method
MethodURL
GEThttps://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{DLO Manifest Object}
PathTypeRequiredDescription
region_nameStringRequiredkr-central-2
accountStringRequiredProject ID
- Confirmed during token issuance
- Used as Account in Swift API
bucket_nameStringRequiredBucket name
DLO Manifest ObjectStringRequiredName of the manifest object
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequiredUser authentication token
Response syntax
Status codes
HTTP StatusResponseDescription
201CreatedSuccess
DLO download
Request syntax
DLO download request syntax
curl --location --request GET 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{DLO Manifest Object}' \
--header 'X-Auth-Token: {x-auth-token}' \
DLO download example
curl -H 'X-Auth-Token: <token>' https://objectstorage.kr-central-2.kakaocloud.com/v1/{account}/test-bucket/DLO
API method
MethodURL
PUT     https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{DLO Manifest Object}
PathTypeRequiredDescription
region_nameStringRequiredkr-central-2
accountStringRequired   Project ID
- Available when issuing a token
- Used as the Account value in Swift API
bucket_nameStringRequired   Bucket name
DLO Manifest ObjectStringRequired   Manifest object name
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Response syntax
Status codes
HTTP statusResponseDescription
201     Created   Success

SLO (static large object) method

The SLO method also uploads data by splitting it into segments, similar to the DLO method. However, it differs in that it does not impose naming restrictions on segments, and the segment sizes do not need to be uniform. Additionally, the manifest must be uploaded last. The SLO manifest object must contain a list of segment objects in the correct order. KC Object Storage currently supports including up to 1,000 segment objects in a single manifest.

When a request is made to create an SLO manifest object, the system verifies that each segment object exists at the specified path and that the etag value and segment size match the metadata. If the information does not match, the manifest object is not created. The use of etag also ensures the integrity of each segment object referenced in the manifest.

  1. A large object is split into segments according to the desired size.
  2. Each segment is uploaded to a bucket with proper access permissions. Segments do not have to be in the same bucket, but must reside in buckets that belong to a project (account) with access rights.
  3. A manifest object is uploaded by specifying the path, etag, and size of each uploaded segment in the body of the request.
info

For detailed examples of manifest structure, refer to https://objectstorage.kr-central-2.kakaocloud.com/info.

Upload SLO segment object

Request syntax
SLO segment upload request syntax
curl --location --request PUT 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}/{segment_object}' \
--header 'X-Auth-Token: {x-auth-token}' \
--data-raw '{segment_content}'
SLO segment object upload example
curl -X PUT -H 'X-Auth-Token: <token>' https://objectstorage.kr-central-2.kakaocloud.com/v1/{account}/test-bucket/slo_test_1.txt --data-binary '@./slo_test_1.txt'
curl -X PUT -H 'X-Auth-Token: <token>' https://objectstorage.kr-central-2.kakaocloud.com/v1/{account}/other-bucket/slo_test_2.txt --data-binary '@./slo_test_2.txt'
curl -X PUT -H 'X-Auth-Token: <token>' https://objectstorage.kr-central-2.kakaocloud.com/v1/{account}/other1-bucket/slo_test_3.txt --data-binary '@./slo_test_3.txt'
API method
MethodURL
PUT    https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}/{segment_object}
PathTypeRequiredDescription
region_nameStringRequiredkr-central-2
accountStringRequired   Project ID
- Available when issuing a token
- Used as the Account value in Swift API
bucket_nameStringRequired   Bucket name
pathStringRequiredPath where the segment object is uploaded
segment_objectStringRequired   Name of the segment object
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Request elements
FieldTypeRequiredDescription
segment_contentRaw-dataRequired   Content of the segment object
Response syntax
Status codes
HTTP statusResponseDescription
201     Created  Success

Upload SLO manifest

Request syntax
SLO manifest upload request syntax
curl --location --request PUT 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{SLO Manifest Object}?multipart-manifest=put' \
--header 'X-Auth-Token: {x-auth-token}' \
--header 'Content-Type: "application/json"' \
--data '[ \
{
"path": "{path}/{segment object}",
"etag": "{etag value of the segment object}",
"size_bytes": "{segment object size}"
},
....
]
}'
SLO manifest object upload example
curl -X PUT -H 'X-Auth-Token: <token>' -H 'Content-Type: application/json' https://objectstorage.kr-central-2.kakaocloud.com/v1/{account}/bucket/SLO?multipart-manifest=put \
--data \
'
[
{
"path": "test-bucket/slo_test_1.txt",
"etag": "ba1f2511fc30423bdbb183fe33f3dd0f",
"size_bytes": 4
},
{
"path": "other-bucket/slo_test_2.txt",
"etag": "441295deac01cf5d6bdc7db3173adfdf",
"size_bytes": 1369
},
{
"path": "other1-bucket/slo_test_3.txt",
"etag": "aa3f5bb8c988fa9b75a1cdb1dc4d93fc",
"size_bytes": 4
}
]
'
API method
MethodURL
PUT   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{SLO Manifest Object}?multipart-manifest=put
PathTypeRequiredDescription
accountStringRequired   Project ID
- Available when issuing a token
- Used as the Account value in Swift API
bucket_nameStringRequired   Bucket name
SLO Manifest ObjectStringRequired   Name of the manifest object
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Content-TypeStringRequired   Type of the content
Request elements
FieldTypeRequiredDescription
pathStringRequired   Enter in the format {path}/{segment object}
- {path}: Path where the object is uploaded
- {segment object}: Segment object under the specified path
etagStringOptionaletag value of the segment object
size_bytesIntOptionalSize of the segment object
info

When performing a manifest PUT operation, the system compares the input etag and size_bytes with those of the already uploaded segment objects. If they do not match, an error is returned.

Response syntax
Status codes
HTTP statusResponseDescription
201     Created  Success

Download SLO

Request syntax
SLO download request syntax
curl --location --request GET 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{SLO Manifest Object}' \
--header 'X-Auth-Token: {x-auth-token}' \
SLO download example
curl -H 'X-Auth-Token: <token>' https://objectstorage.kr-central-2.kakaocloud.com/v1/{account}/bucket/SLO
API method
MethodURL
PUT   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{SLO Manifest Object}
PathTypeRequiredDescription
accountStringRequired   Project ID
- Available when issuing a token
- Used as the Account value in Swift API
bucket_nameStringRequired   Bucket name
SLO Manifest ObjectStringRequired   Name of the manifest object
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Response syntax
Status codes
HTTP statusResponseDescription
201     Created  Success

Download SLO manifest

SLO allows downloading only the SLO manifest object separately. By using the query parameter multipart-manifest=get, you can retrieve only the manifest object without downloading the full large object.

Request syntax
SLO manifest download request syntax
curl --location --request GET 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{SLO Manifest Object}?multipart-manifest=get' \
--header 'X-Auth-Token: {x-auth-token}' \
SLO manifest object download example
curl -H 'X-Auth-Token: <token>' https://objectstorage.kr-central-2.kakaocloud.com/v1/{account}/test-bucket/SLO?multipart-manifest=get
API method
MethodURL
PUT   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{SLO Manifest Object}?multipart-manifest=get
PathTypeRequiredDescription
accountStringRequired   Project ID
- Available when issuing a token
- Used as the Account value in Swift API
bucket_nameStringRequired   Bucket name
SLO Manifest ObjectStringRequired   Name of the manifest object
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Response syntax
Status codes
HTTP statusResponseDescription
201     Created  Success

Multipart upload

  • Provides an extension of the OpenStack Swift Object API for multipart upload. This enables large file uploads using a method similar to the S3 multipart upload API.
  • The S3 multipart upload API, provided by AWS, allows uploading large files by splitting them into multiple parts, uploading them individually, and then combining them.
  • For more information on the S3 multipart upload API, refer to the S3 multipart upload documentation.
  • Object Storage does not support the Swift SLO (static large object) or DLO (dynamic large object) APIs.

Multipart upload consists of the following three steps:


Step 1. Initiate multipart upload

Request syntax
Initiate multipart upload request syntax
curl --location --request POST 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?uploads' \
--header 'X-Auth-Token: {x-auth-token}'
API method
MethodRequest URL
POST   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?uploads
PathTypeRequiredDescription
accountStringRequired   Project ID
- Available during token issuance
- Used as the Account value in Swift API
bucket_nameStringRequired   Bucket name
pathStringRequired   Full folder path
- Example: image/small, images/small/icon.jpg
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Response syntax
Initiate multipart upload response syntax
<?xml version="1.0" encoding="UTF-8"?>
<InitiateMultipartUploadResult>
<Tenant>{tenant-id}</Tenant>
<Bucket>{bucket-name}</Bucket>
<Key>{object-path}</Key>
<UploadId>{upload-id}</UploadId>
</InitiateMultipartUploadResult>
Response elements
FieldTypeDescription
tenant-idStringProject ID
bucket-nameStringBucket name
object-pathStringFile path
upload-idStringUnique upload ID assigned by the server
Status codes
HTTP statusResponseDescription
201CreatedSuccess
401UnauthorizedAuthentication failed
403ForbiddenAccess denied

Step 2. Upload part

Each part must be at least 5 MB in size.

Request syntax
Upload part request syntax
curl --location --request PUT 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?uploadId={upload-id}&partNumber={part-number}' \
--header 'X-Auth-Token: {x-auth-token}' \
--header 'Content-Type: application/octet-stream' \
--data '{path_name}'
API method
MethodRequest URL
PUT   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?uploadId={upload-id}&partNumber={part-number}
PathTypeRequiredDescription
accountStringRequired   Project ID
bucket_nameStringRequired   Bucket name
pathStringRequired   Full folder path
Request query parameters
ParameterTypeRequiredDescription
uploadIdQueryRequired   Unique upload ID returned by CreateMultipartUpload
partNumberQueryRequired   Sequence number of the current part (1–10000)
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Response header
HeaderTypeDescription
etagStringETag of the uploaded part
Status codes
HTTP statusResponseDescription
200     Created   Success
401UnauthorizedAuthentication failed
403ForbiddenAccess denied

Step 3. Complete multipart upload

Request syntax
Complete multipart upload request syntax
curl --location --request PUT 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?uploadId={upload-id}' \
--header 'X-Auth-Token: {x-auth-token}' \
--header 'Content-Type: application/xml' \
--data '<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
<Part>
<ETag>"<etag of 5MB_1.file>"</ETag>
<PartNumber>1</PartNumber>
</Part>
<Part>
<ETag>"<etag of 5MB_2.file>"</ETag>
<PartNumber>2</PartNumber>
</Part>
<Part>
<ETag>"<etag of remain.file>"</ETag>
<PartNumber>3</PartNumber>
</Part>
</CompleteMultipartUpload>'
API method
MethodRequest URL
PUT    https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?uploadId={upload-id}
PathTypeRequiredDescription
accountStringRequired   Project ID
bucket_nameStringRequired   Bucket name
pathStringRequired   Full folder path
Request query parameters
ParameterTypeRequiredDescription
uploadIdQueryRequired   Unique upload ID returned by CreateMultipartUpload
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Response elements
FieldTypeDescription
ETagStringETag of the uploaded part
PartNumberIntegerPart number of the uploaded part
Status codes
HTTP statusResponseDescription
201CreatedSuccess
401UnauthorizedAuthentication failed
403ForbiddenAccess denied

Manage object

Query object metadata

Users with Owner, Read-Only, or Read-Write permissions can query object metadata in a bucket. This provides metadata for stored objects (files, folders) in the bucket.

Request syntax
Query object metadata request syntax
curl --location --request HEAD 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}' \
--header 'X-Auth-Token: {x-auth-token}'
API method
MethodRequest URL
HEAD   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}
PathTypeRequiredDescription
region_nameStringRequired   Region name: kr-central-2
accountStringRequired   Project ID
- Available during token issuance
- Used as the Account value in Swift API
bucket_nameStringRequired   Bucket name
pathStringRequired   Full path to the object
- Example: image/small, images/small/icon.jpg
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Status codes
HTTP statusResponseDescription
200SuccessSuccess
401UnauthorizedAuthentication failed
403ForbiddenAccess denied

Change object metadata

Users with Owner or Read-Write permissions can update object metadata for files or folders stored in the bucket.

Request syntax
Change object metadata request syntax
curl --location --request POST 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}' \
--header 'X-Auth-Token: {x-auth-token}' \
--header 'X-Object-Meta-Company: kakao enterprise'
API method
MethodRequest URL
POST   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}
PathTypeRequiredDescription
region_nameStringRequired   Region name: kr-central-2
accountStringRequired   Project ID
bucket_nameStringRequired   Bucket name
pathStringRequired   Full path to the object
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
X-Object-Meta-{name}StringOptionalMetadata to assign to the object. Replace {name} with the metadata key.
Status codes
HTTPS statusResponseDescription
200     SuccessSuccess
401UnauthorizedAuthentication failed
403ForbiddenAccess denied

Query object list

Users with Owner, Read-Write, or Read-Only permissions can list objects (files, folders) stored in a bucket.

Request syntax
Query object list request syntax
curl --location --request GET 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}?format=json' \
--header 'X-Auth-Token: {x-auth-token}'
API method
MethodRequest URL
GET   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}
PathTypeRequiredDescription
region_nameStringRequired   Region name: kr-central-2
accountStringRequired   Project ID
bucket_nameStringRequired   Bucket name
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Request query parameters
ParameterTypeRequiredDescription
prefixQueryOptionalDirectory path
- Example: image/small
delimiterQueryOptionalUse / as delimiter when listing with key prefix
limitQueryOptionalMaximum number of items
- Default: 1000 (maximum 1,000 items)
markerQueryOptionalListing starts after the specified object name
formatQueryOptionalResponse format
- plain (default)
- json
- xml
Response syntax
JSON object list
[
{
"name": "document",
"content_type": "application/directory",
"bytes": 0,
"hash": "d41d8cd98f00b204e9800998ecf8427e",
"last_modified": "2020-06-26T11:12:03+09:00"
},
{
"name": "document/hello.txt",
"content_type": "application/octet-stream",
"bytes": 7,
"hash": "083d9fe8506415ba02f2f86e0531527f",
"last_modified": "2020-06-26T11:14:50+09:00"
}
]
Response elements
FieldTypeDescription
nameStringObject name
content_typeStringValue returned from the Content-Type at the time of upload
bytesintObject size
hashStringUnique file hash
last_modifiedStringLast modified timestamp
- Format: RFC3339
subdirStringProvided only for pseudo-directories
Status codes
HTTPS statusResponseDescription
200      OKSuccess
401UnauthorizedAuthentication failed
403ForbiddenAccess denied

Download object

Users with Owner, Read-Write, or Read-Only permissions can download objects from a bucket.
If the specified path is a folder, the response will contain a content size of 0. To list contents inside a folder, use the object list API.

Request syntax
Download object request syntax
curl --location --request GET 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}' \
--header 'X-Auth-Token: {x-auth-token}'
API method
MethodRequest URL
GET   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}
PathTypeRequiredDescription
region_nameStringRequired   Region name: kr-central-2
accountStringRequired   Project ID
bucket_nameStringRequired   Bucket name
pathStringRequired   Full object path (e.g., image/small, images/small/icon.jpg)
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Response syntax
Object download response syntax
{
Content-Length (Header),
Content-Type (Header),
Last-Modified (Header),
ETag (Header),
Content (Body)
}
Response headers
HeaderTypeDescription
Content-LengthintSize of the object
- For files: actual file size
- For folders: 0
Content-TypeStringType of the content
Last-ModifiedStringLast modified timestamp
ETagStringMD5 hash of the binary object (folders may return meaningless ETags)
Response elements
FieldTypeDescription
ContentRaw dataNot returned for folder-type objects
Status codes
Status codeResponseDescription
200OKSuccess
401UnauthorizedAccess denied
404Not foundFile not found

Delete object

Users with Owner or Read-Write permissions can delete objects from a bucket.

Request syntax
Delete object request syntax
curl --location --request DELETE 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}' \
--header 'X-Auth-Token: {x-auth-token}'
API method
MethodRequest URL
DELETEhttps://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Status codes
HTTPS statusResponseDescription
204     No contentSuccess
401UnauthorizedAccess denied
404Not foundFile not found

Copy object

Copying an object requires read permission on the source and Read-Write permission on the destination.

Request syntax
Copy object request syntax
curl --location --request COPY 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}' \
--header 'X-Auth-Token: {x-auth-token}' \
--header 'Destination: /{target-bucket-name}/{target-path}'
API method
MethodRequest URL
COPYhttps://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
DestinationStringRequired   Destination path for the copy
- Example: {target-bucket-name}/{target-path}
Status codes
HTTPS statusResponseDescription
201     Created   Success
401UnauthorizedAccess denied
404Not foundFile not found

Move object

To move an object, the source bucket must grant storage.objects.get permission, and the destination bucket must allow storage.objects.create.

Not available for encrypted buckets in kr-central-2 region.

Request syntax
Move object request syntax
curl --location --request MOVE 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}' \
--header 'X-Auth-Token: {x-auth-token}' \
--header 'Destination: /{target-bucket-name}/{target-path}'
API method
MethodRequest URL
MOVEhttps://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
DestinationStringRequired   Destination path for the move
- Example: {target-bucket-name}/{target-path}
Status codes
HTTPS statusResponseDescription
201CreatedSuccess
401UnauthorizedAccess denied
404Not foundFile not found

Create temp URL for downloading object

Users with access to the object can generate a temporary URL for downloading it. The temp_url_expires parameter defines the validity period, allowing the object to be downloaded until the specified expiration time.

Request syntax
Create temp URL for downloading object request syntax
curl --location --request GET 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?temp_url&temp_url_expires={temp_url_expires}' \
--header 'X-Auth-Token: {x-auth-token}'
API method
MethodRequest URL
GET   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?temp_url&temp_url_expires={temp_url_expires}
PathTypeRequiredDescription
accountStringRequired   Project ID
- Available during token issuance
- Used as the Account value in the Swift API
bucket_nameStringRequired   Bucket name
pathStringRequired   Full object path
- Example: image/small, images/small/icon.jpg
Request header
HeaderTypeRequiredDescription
X-Auth-TokenStringRequired   User authentication token
Request query parameters
ParameterTypeRequiredDescription
temp_urlStringRequired   Indicates the request is for generating a temp URL
temp_url_expiresTimestampRequired   Expiration time of the generated temp URL (in seconds)
Response syntax
Create temp URL for downloading object response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Thu, 09 Mar 2023 04:44:00 GMT
Content-Length: 209

{
"url": "/v1/{project_id}/object-reg-test-1/test.txt?temp_url_sig={temp_url_sig}&temp_url_expires={temp_url_expires}",
"sig": "{sig}"
}
Response elements
FieldTypeDescription
urlStringTemporary URL to download the object within the expiration time
sigStringSignature used to validate the temp URL until the expiration time
Status codes
HTTPS statusResponseDescription
200     OKSuccess
403ForbiddenAccess denied
404Not foundBucket not found

Download object using temp URL

A generated temp URL allows object download within the specified valid time. Since the download does not require X-Auth-Token, the URL should only be shared with trusted users.

Request syntax
Download object using temp URL request syntax
curl --location --request GET 'https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?temp_url_sig={temp_url_sig}&temp_url_expires={temp_url_expires}'
API method
MethodRequest URL
GET   https://objectstorage.{region_name}.kakaocloud.com/v1/{account}/{bucket_name}/{path}?temp_url_sig=value&temp_url_expires=value&filename=name
PathTypeRequiredDescription
region_nameStringRequired   Region name: kr-central-2
accountStringRequired   Project ID
bucket_nameStringRequired   Bucket name
pathStringRequired   Full object path
Request query parameters
ParameterTypeRequiredDescription
temp_url_sigQueryRequired   Signature from the temp URL response
temp_url_expiresQueryRequired   Expiration timestamp in Unix epoch format
filenameQueryOptionalCustom filename for download in browser (UTF-8 percent-encoded string)
Response syntax
Download using temp URL response syntax
{
Content-Length (Header),
Content-Type (Header),
Last-Modified (Header),
ETag (Header),
Content-Disposition (Header),
Content (Body)
}
Response headers
HeaderTypeDescription
Content-LengthintObject size
- 0 if the object is a folder
Content-TypeStringMedia type of the object
Last-ModifiedStringLast modification timestamp
ETagStringMD5 hash of the object (may be invalid for folders)
Content-DispositionStringDownload filename for browser (UTF-8 encoded)
Response elements
FieldTypeDescription
ContentBodyNot provided if the object is a folder
Status codes
HTTPS statusResponseDescription
200     SuccessSuccess
403ForbiddenTemp URL has expired