Help Center > Object Storage Service > API Reference > Function Description

Function Description

OBS provides web service interfaces for storing and retrieving any amount of data on different platforms. With OBS, all developers can access the same data storage infrastructure that is scalable, reliable, secure, and cost-effective.

APIs provided by OBS comply with REST specifications in HTTP 1.1 format. Users can send standard HTTP requests for creating, obtaining, and deleting buckets or objects through the REST APIs.

OBS Concepts

You need to understand the following key concepts before using OBS.

Bucket

A bucket is a container that accommodates objects. It is a top namespace in OBS. Each object must reside in a bucket. For example, if you store object picture.jpg in bucket photo, the object can be addressed from http://photo.obs.cn-north-1.myhwclouds.com/picture.jpg. You can create buckets in a specific region as needed. For details, see PUT Bucket.

Object

An object is a basic data unit of OBS. A bucket can store multiple objects, and OBS does not distinguish between object types. In OBS, objects are serialized. An object may be a text file, video file, or another form of file. In OBS, a file ranges from 0 B to 48.8 TB. When an object is uploaded to OBS using the PutObject API, it can be 5 GB at most. To upload an object of larger than 5 GB, use the multipart upload method.

Region

Each bucket in OBS must reside in a region. The owning region of a bucket is selected when creating the bucket. Once a bucket is created, its owning region cannot be changed. Select the most appropriate region for a bucket based on the location, cost, and regulatory compliance requirements. OBS has the following regions:

Northern China

Eastern China

Southern China

For details about OBS regions and endpoints, see Regions and Endpoints.

NOTE:

All the domain names provided in this document use Northern China as an example. The actual domain name is subject to your site conditions.

OBS provides the following APIs:

Table 1 Bucket operation APIs

API

Description

GetAllMyBucket

Obtains a user's bucket list.

CreateBucket

Creates a bucket.

ListBucket

Lists all objects in a bucket.

HeadBucket

Obtains bucket metadata and verifies the read permission for a bucket.

GetBucketLocation

Obtains location information about a bucket.

GetBucketStorageInfo

Obtains bucket storage capacity information.

DeleteBucket

Deletes a bucket.

Table 2 Bucket configuration APIs

API

Description

PutBucketPolicy

Sets a bucket policy.

PutBucketQuota

Sets the quota of a bucket.

PutBucketAcl

Sets the access control list (ACL) of a bucket.

PutBucketLogging

Sets bucket logging.

PutLifecycleConfiguration

Configures the bucket lifecycle rule.

PutBucketVersioning

Sets bucket versioning.

PutBucketNotification

Configures the bucket notification rule.

GetBucketPolicy

Obtains bucket policy information.

GetBucketQuota

Obtains bucket quota information.

GetBucketAcl

Obtains the ACL of a bucket.

GetBucketLogging

Obtains bucket logging status.

GetLifecycleConfiguration

Obtains bucket lifecycle settings.

GetBucketVersioning

Obtains bucket versioning status.

GetBucketNotification

Obtains bucket notification settings.

DeleteBucketPolicy

Deletes a bucket policy.

DeleteLifecycleConfiguration

Deletes bucket lifecycle settings.

Table 3 Static website hosting APIs

API

Description

PutBucketWebsite

Sets a bucket website.

PutBucketCORS

Sets the CORS information about a bucket.

OPTIONSBucket

OPTIONS a bucket.

OPTIONSObject

OPTIONS objects.

GetBucketWebsite

Obtains bucket website information.

GetBucketCORS

Obtains a bucket's cross-origin resource sharing (CORS) information.

DeleteBucketWebsite

Deletes a bucket website.

DeleteBucketCORS

Deletes the CORS information about a bucket.

Table 4 Object operation APIs

API

Description

PutObject

Uploads an object by using PUT Object.

PostObject

Uploads an object by using POST Object.

CopyObject

Copies an object.

PutObjectAcl

Sets the ACL of an object.

GetObject

Obtains object contents.

HeadObject

Obtains object metadata.

GetObjectAcl

Obtains the ACL of an object.

DeleteObject

Deletes an object.

DeleteMultipleObject

Batch deletes objects.

PostRestoreObject

Restores archived objects.

Table 5 Multipart upload operation APIs

API

Description

InitiateMultipartUpload

Initiates a multipart upload task.

ListBucketMultipartUploads

Lists a bucket's multipart upload tasks.

UploadPart

Uploads parts.

UploadPart-Copy

Copies parts.

ListParts

Lists the uploaded parts.

CompleteMultipartUpload

Merges parts.

AbortMultipartUpload

Stops multipart upload tasks.

Registration