nav-img
Advanced

API Overview

APIs for Basic Bucket Operations

Table 1 APIs for basic bucket operations

API

Description

Queries the buckets created by the user.

Creates a bucket. You can add request headers to specify the region, storage class, and ACL.

Lists objects in a bucket. You can add different request headers to obtain objects that match the specified prefix, identifier, and other requirements.

Lists objects in a bucket. You can add different request headers to obtain objects that match the specified prefix, identifier, or other conditions.

Checks the bucket metadata. You can query the region, storage class, service version, enterprise project ID, CORS, or other information.

Obtains the bucket region.

Deletes a bucket. Only empty buckets can be deleted.

APIs for Advanced Bucket Settings

Table 2 APIs for advanced bucket settings

API

Description

Creates or modifies a bucket policy. The existing policy in a bucket is overwritten by the policy in the request.

Obtains the policy of a bucket.

Deletes the policy of a bucket.

Sets an ACL to control the read and write permissions on a bucket.

Obtains the ACL of a bucket.

Enables or disables logging for a bucket. If logging is enabled for a bucket, each operation creates a record. Multiple records are packed and stored in a specified location.

Obtains the logging configuration of a bucket.

Configures rules to delete or migrate objects in a bucket.

Obtains the lifecycle rules of a bucket.

Deletes the lifecycle rules of a bucket.

Enables or suspends versioning for a bucket. With versioning enabled, you can use various object versions to protect data against accidental deletion or application breakdown.

Obtains the versioning status of a bucket.

Configures the event notification for a bucket.

Obtains the notification configuration of a bucket.

Creates or updates the default storage class of a bucket.

Obtains the default storage class of a bucket.

Adds a tag to an existing bucket. The tags you added are attached to all service detail records (SDRs) generated by bucket requests. This makes it easy to manage costs.

Obtains the tags of a specified bucket.

Deletes the tags of a bucket.

Sets a quota to limit how much space of a bucket can be used.

Obtains the bucket quota.

Obtains the number of objects in a bucket and the space occupied by them.

Configures a custom domain name for a bucket. You can use the configured domain name to access the bucket.

Queries the custom domain name of a bucket.

Deletes the custom domain name of a bucket.

Creates or updates the server-side encryption configuration for a bucket. This configuration is later used to encrypt newly uploaded objects.

Queries the server-side encryption configuration of a bucket.

Deletes the server-side encryption configuration of a bucket.

Configures the WORM policy and retention period for a bucket.

Returns the WORM policy of a bucket.

APIs for Static Website Hosting

Table 3 APIs for static website hosting

API

Description

Creates or updates the website hosting configuration of a bucket. You can host static website resources such as HTML web pages, flash files, or audio and video files in an OBS bucket, so that you can provide these hosted resources using the bucket's website endpoint to end users.

Obtains the website hosting configuration of a bucket.

Deletes the website hosting configuration of a bucket.

Configures cross-origin resource sharing (CORS) for a bucket. Static website resources stored in a bucket in a domain can be configured with CORS to accept requests from a different domain.

Obtains the CORS configuration of a bucket.

Deletes the CORS configuration of a bucket.

Checks whether the client has the permission to access the server. This operation is usually performed before cross-domain access.

Checks whether the client has the permission to access the server. This operation is usually performed before cross-domain access.

APIs for Object Operations

Table 4 APIs for object operations

API

Description

Uploads an object to a bucket.

Uploads an object to a bucket using a form.

Creates a copy for an existing object.

Downloads an object.

Obtains object metadata (such as expiration time, version number, and CORS configuration).

Deletes an object. You can use versionId to specify a version to delete.

Permanently deletes a batch of objects from a bucket.

Restores objects from the Cold storage class.

Appends data to an object. If the requested object cannot be found, it will be created.

Sets an ACL to control the read and write permissions on an object.

Obtains the ACL of an object.

Adds, modifies, or deletes the existing object metadata.

Modifies the content of an object in a parallel file system from a specified location.

Truncates an object in a parallel file system to a specified size.

Renames an object in a parallel file system.

Configures or updates the retention period for objects uploaded to a bucket with WORM enabled.

APIs for Multipart Uploads

Table 5 APIs for multipart uploads

API

Description

Queries all multipart uploads for a bucket that have been initiated but not completed or aborted.

Initiates a multipart upload and obtains a globally unique task ID for later use when uploading, assembling, and listing parts.

Uploads parts for a multipart task.

Copies an object or its part as a part of a multipart upload task.

Queries all parts of a multipart task.

Assembles parts into an object.

Cancels a multipart upload task.