Compatibility of OBS REST APIs

REST APIs support standard HTTP headers and status codes. In order to enhance security, OBS supports different types of user permission by adding authentication information to headers.

OBS REST APIs comply with REST (HTTP 1.1). With REST APIs, you can create, obtain, and delete buckets or objects by sending standard HTTP requests using any tool that supports REST requests.

OBS REST APIs are compatible with most Amazon S3 APIs. Table 1 describes the compatibility between OBS REST APIs and Amazon S3 APIs.

Table 1 Compatibility between OBS REST APIs and Amazon S3 APIs

S3 Operation

Function

Supported by OBS

Remarks

Abort Multipart Upload

Aborts a multipart upload.

Yes

None

Complete Multipart Upload

Completes a multipart upload by assembling previously uploaded parts.

Yes

None

DELETE Bucket

Deletes a bucket.

Yes

None

DELETE Bucket lifecycle

Deletes the lifecycle configuration of a bucket.

Yes

None

DELETE Bucket policy

Deletes the policy of a bucket.

Yes

None

DELETE Bucket website

Deletes the website configuration of a bucket.

Yes

None

DELETE Multiple Objects

Deletes multiple objects from a bucket.

Yes

None

DELETE Object

Deletes an object.

Yes

None

GET Bucket acl

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

Yes

None

GET Bucket CORS

Obtains the CORS configuration of a bucket.

Yes

None

GET Bucket lifecycle

Obtains the lifecycle configuration of a bucket.

Yes

None

GET Bucket (List Objects)

Lists objects in a bucket.

Yes

None

GET Bucket location

Obtains the Region (data center) where a bucket is located.

Yes

OBS and S3 have different response bodies in XML.

An XML response body of OBS:

<Location>RegionID</Location>

An XML response body of S3:

<CreateBucketConfiguration>

<LocationConstraint>RegionID</LocationConstraint>

</CreateBucketConfiguration>

GET Bucket logging

Obtains the logging status of a bucket.

Yes

None

GET Bucket notification

Obtains the notification configuration of a bucket.

Yes

None

GET Bucket Object versions

Obtains information about all versions of objects in a bucket.

Yes

None

GET Bucket policy

Obtains the policy of a bucket.

Yes

None

GET Bucket versioning

Obtains the versioning state of a bucket.

Yes

None

GET Bucket website

Obtains the website configuration of a bucket.

Yes

None

GET Object

Obtains an object.

Yes

None

GET Object acl

Obtains the ACL of an object.

Yes

None

GET Object torrent

Obtains torrent files of an object.

No

None

GET Service

Lists all buckets of a user.

Yes

None

HEAD Bucket

Retrieves the metadata of a bucket and checks its access permission.

Yes

None

HEAD Object

Retrieves the metadata of an object.

Yes

If the returned user-defined metadata contains non-ASCII or other unprintable characters, the metadata is encoded based on the number of returned ACSII and UTF characters in Amazon S3. However, the metadata is Base64 encoded in the OBS.

Initiate Multipart Upload

Creates a multipart upload.

Yes

None

List Multipart Uploads

Lists multipart uploads.

Yes

None

List Parts

Lists parts.

Yes

None

POST Object

Uploads an object using HTML forms.

Yes

None

PUT Bucket

Creates a bucket.

Yes

In contrast to OBS, Amazon S3 supports more complex bucket names and different bucket naming rules based on regions.

Users can create a maximum of 101 (officially 100) buckets in Amazon S3 and a maximum of 100 buckets in OBS.

PUT Bucket acl

Sets the ACL of a bucket.

Yes

In OBS, permission cannot be granted to users identified by email address.

The x-amz-grant-* header cannot be used to set ACLs, and the x-amz-acl header cannot be used to modify existing bucket ACLs.

PUT Bucket CORS

Sets the CORS of a bucket.

Yes

None

PUT Bucket lifecycle

Sets the lifecycle configuration of a bucket.

Yes

In OBS, expired objects can be deleted.

PUT Bucket logging

Sets the logging state of a bucket.

Yes

None

PUT Bucket notification

Sets the notification configuration of a bucket.

Yes

The restrictions are inconsistent with those of AWS. AWS supports up to 100 configuration items. However, OBS supports up to 100 configuration items only when the configuration file is not larger than 100 KB.

PUT Bucket policy

Sets the policy of a bucket.

Yes

OBS supports only some conditions. For details, see section Bucket Policy.

PUT Bucket versioning

Sets the versioning state of a bucket.

Yes

OBS does not support the MfaDelete function. Using the MfaDelete element in XML will respond 200, but the setting does not take effect.

The x-amz-mfa header is not supported in OBS.

PUT Bucket website

Sets the website configuration of a bucket.

Yes

None

PUT Object

Uploads an object to a bucket.

Yes

OBS does not support service end encryption.

PUT Object acl

Sets the ACL of an object.

Yes

In OBS, permission cannot be granted to users identified by email address.

The OBS does not support x-amz-grant-* headers.

PUT Object - Copy

Copies an object.

Yes

OBS processes field x-amz-copy-source-if-* added to request headers but reserves HTTP-defined fields if-unmodified-since, if-modified-since, if-match, and if-none-match.

Upload Part

Uploads a part to a multipart upload.

Yes

None

Upload Part - Copy

Uploads a part by copying data from an existing object as data source.

Yes

None

OPTIONS Bucket

Pre-processes a bucket.

Yes

Amazon does not support this API.

OPTIONS Object

Pre-processes an object.

Yes

None

PutBucketObjectLockConfiguration

Configuring a Default WORM Policy for a Bucket.

Yes

None

GetBucketObjectLockConfiguration

Obtaining the Default WORM Policy of a Bucket.

Yes

None

PutObjectRetention

Configuring WORM Retention for an Object.

Yes

None