API Overview
Object Storage API is an interface for managing resources in a code-based programmatic manner.
When utilizing the API provided by Object Storage, you can handle tasks that are difficult to perform with the console, such as controlling large amounts of buckets and objects or repetitive and automated tasks. You can use KakaoCloud's Object Storage as a code base through REST API and Openstack Swift Client.
info
- Responses to API requests are provided in
JSON
format. - To use the API, an access key and authentication token (API authentication token) are required.
- Before using the API, you must first create an access key and receive a authentication token (API authentication token) through it.
- Examples of how to use the Object Storage API are written with the CURL client. For a details of Curl, please refer to the CURL Guide.
API preparations
Please refer to the API Preparation for the preparatory work required to call the API.
API model
Object Storage's API model consists of the following five elements.
Model - Bucket
Bucket
{
project:String // Project ID | Used as project id value in S3 API
name:String // bucket name | Unique value in Object storage
type:String // bucket type | STANDARD
bytes:int // total usage | Unit: Byte
objectCount:int // Number of objects belonging to the bucket
createdAt:String // Creation date in RFC3339 format | Example) 2020-07-01T00:00:00Z
use_encryption:boolean // Whether to encrypt bucket
encryption_type // encryption type | managed
lastModified:String // Modified date in RFC3339 format | Example) 2020-07-01T00:00:00Z
storageClass // storage class | STANDARD
storagePolicy // zone of storage class
acl: [AccessControlList] // Access permissions to the bucket
}
AccessControlList
{
acl: [Permission] // Access permission to bucket
publicAcl: String // Whether the bucket is public or not | deny (default): do not disclose, read-only: disclose read permission
}
Data | Type | Description |
---|---|---|
account | String | Project ID - Able to get this information when issuing a token - Used as the account value in Swift API |
name | String | Bucket name - Unique value in Object Storage |
type | String | Bucket type - Standard |
bytes | Int | Total usage - Unit: Byte |
objectCount | Int | Number of objects in bucket |
policyCount | Int | Number of policies to which the lifecycle of the bucket is applied |
createdAt | String | Creation date - Format: RFC3339 - Example: 2020-07-01T00:00:00Z |
lastModified | String | Modification date - Format: RFC3339 - Example: 2020-07-01T00:00:00Z |
owner | SimpleUser | Bucket creator - The creator has Admin permissions on the bucket |
acl | AccessControlList | Access permission information |
use_encryption | Boolean | Whether to encrypt bucket - false (default): Do not encrypt - true : Encrypt |
Model - Simple Bucket
SimpleBucket
{
project: String // Project ID | Used as project id value in S3 API
name: String // bucket name | Unique value in Object storage
type: String // bucket type | STANDARD
bytes: int // total usage | Unit: Byte
objectCount: int // Number of objects belonging to the bucket
createdAt: String // Creation date in RFC3339 format | Example) 2020-07-01T00:00:00Z
use_encryption: boolean // Whether to encrypt bucket
encryption_type // encryption type | managed
lastModified: String // Modification date in RFC3339 format | Example) 2020-07-01T00:00:00Z
storageClass // storage class | STANDARD
storagePolicy // zone of storage class
}
Data | Type | Description |
---|---|---|
project | String | Project ID - Able to get this information when issuing a token - Used in S3 API |
name | String | Bucket name - Unique value in Object Storage |
type | String | Bucket type - STANDARD (default): standard bucket |
bytes | Int | Total usage - Unit: Byte |
objectCount | Int | Number of objects in bucket |
createdAt | String | Creation date - Format: RFC3339 - Example: 2020-07-01T00:00:00Z |
use_encryption | Boolean | Whether to encrypt bucket - false (default): Do not encrypt - true : Encrypt |
encryption_type | String | Bucket encryption type |
lastModified | String | Modification date - Format: RFC3339 - Example: 2020-07-01T00:00:00Z |
storageClass | String | Storage class - STANDARD (default): standard bucket. |
acl | Access Control List | Bucket access management policy - Model - Access Control List Reference |
Model - Simple User
SimpleUser
{
id: String // User ID. Example) a0cd4299ed99458f9679c89a27e1a52d
name: String // user name. Example) reuben.b@kakkaoenterprise.com
}
Data | Type | Description |
---|---|---|
id | String | Unique ID of user - Example: a0cd4299ed99458f9679c89a27e1a52d |
name | String | ID - Example: username@domain.com |
Model - Access Control List
Data | Type | Description |
---|---|---|
acl | [Permission] | Access permission to bucket - Can be written as a list - Refer to Model - Permission |
PublicAcl | String | Whether bucket is public - Deny (default): Not public- Read-Only : Read only |
Model - Permission
Data | Type | Description |
---|---|---|
user | SimpleUser | Users who can access the bucket - Refer to Model - Simple User |
permission | String | Bucket access permissions - Read-Only : Read permission disclosed - Read-Write : Read and write permission disclosed |