API overview
Object Storage API is an interface for programmatic resource management using code.
By utilizing the APIs provided by Object Storage, you can handle tasks that are difficult to perform via the console, such as controlling large volumes of buckets and objects, or executing repetitive and automated operations. KakaoCloud’s Object Storage can be accessed programmatically using the REST API or the OpenStack Swift client.
info
- API responses are returned in
JSON
format. - To use the API, you need an access key and a user authentication token (API auth token).
- Before using the API, you must first generate an access key, which is then used to obtain the user authentication token (API auth token).
- Examples of how to use the Object Storage API are written using the CURL client. For detailed usage of CURL, refer to the CURL guide.
Before you start
To call the API, refer to the Prepare API use documentation for required prerequisites.
API model
The API model of Object Storage consists of the following five components:
Model - bucket
Bucket(kr-central-2)
{
project: String, // Project ID | Used as the project id value in the S3 API
name: String, // Bucket name | Must be unique within Object Storage
type: String, // Bucket type | STANDARD
bytes: int, // Total usage | Unit: Byte
objectCount: int, // Number of objects in the bucket
createdAt: String, // Creation date in RFC3339 format | Example: 2020-07-01T00:00:00Z
use_encryption: boolean, // Whether the bucket is encrypted
encryption_type, // Encryption type | managed
lastModified: String, // Last modified date in RFC3339 format | Example: 2020-07-01T00:00:00Z
storageClass, // Storage class | STANDARD
storagePolicy, // Storage zone of the class
acl: [AccessControlList] // Access control list for the bucket
}
AccessControlList(kr-central-2)
{
acl : [Permission], // Access control list for the bucket
publicAcl : String // Public access status | deny (default): not public, read-only: read access only
}
Data | Type | Description |
---|---|---|
account | String | Project ID - Can be confirmed during token issuance - Used as the Account value in Swift API |
name | String | Bucket name - Must be unique within Object Storage |
type | String | Bucket type - Standard |
bytes | Int | Total usage - Unit: Byte |
objectCount | Int | Number of objects in the bucket |
policyCount | Int | Number of lifecycle policies applied to the bucket |
createdAt | String | Creation date - Format: RFC3339 - Example: 2020-07-01T00:00:00Z |
lastModified | String | Last modified date - Format: RFC3339 - Example: 2020-07-01T00:00:00Z |
owner | SimpleUser | Creator of the bucket - The creator has admin permissions for the bucket |
acl | AccessControlList | Access control information |
use_encryption | Boolean | Whether the bucket is encrypted - false (default): not encrypted- true : encrypted |
Model - simple bucket
SimpleBucket (kr-central-2)
{
project: String, // Project ID | Used as the project id value in the S3 API
name: String, // Bucket name | Must be unique within Object Storage
type: String, // Bucket type | STANDARD
bytes: int, // Total usage | Unit: Byte
objectCount: int, // Number of objects in the bucket
createdAt: String, // Creation date in RFC3339 format | Example: 2020-07-01T00:00:00Z
use_encryption: boolean, // Whether the bucket is encrypted
encryption_type, // Encryption type | managed
lastModified: String, // Last modified date in RFC3339 format | Example: 2020-07-01T00:00:00Z
storageClass, // Storage class | STANDARD
storagePolicy // Storage zone of the class
}
Data | Type | Description |
---|---|---|
project | String | Project ID - Can be confirmed during token issuance - Used in the S3 API |
name | String | Bucket name - Must be unique within Object Storage |
type | String | Bucket type - STANDARD (default): standard bucket |
bytes | Int | Total usage - Unit: Byte |
objectCount | Int | Number of objects in the bucket |
createdAt | String | Creation date - Format: RFC3339 - Example: 2020-07-01T00:00:00Z |
use_encryption | Boolean | Whether the bucket is encrypted - false (default): not encrypted- true : encrypted |
encryption_type | String | Encryption type |
lastModified | String | Last modified date - Format: RFC3339 - Example: 2020-07-01T00:00:00Z |
storageClass | String | Storage class - STANDARD (default): standard bucket |
acl | Access control list | Bucket access control policy - See Model - access control list |
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 user ID - Example: a0cd4299ed99458f9679c89a27e1a52d |
name | String | ID - Example: username@domain.com |
Model - access control list
Data | Type | Description |
---|---|---|
acl | [Permission] | Access control for the bucket - Can be listed - See Model - permission |
publicAcl | String | Public access status - deny (default): not public- read-only : read-only access |
Model - permission
Data | Type | Description |
---|---|---|
user | SimpleUser | User with access to the bucket - See Model - simple user |
permission | String | Bucket access permission - read-only : read-only access- read-write : read and write access |