Updated on 2024-09-29 GMT+08:00

API Overview

APIs for Basic Bucket Operations

Table 1 APIs for basic bucket operations

API

Description

Listing Buckets

Queries the buckets created by the user.

Creating a Bucket

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

Listing Objects in a Bucket

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

Obtaining Bucket Metadata

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

Obtaining Bucket Location

Obtains the bucket region.

Deleting Buckets

Deletes a bucket. Only empty buckets can be deleted.

APIs for Advanced Bucket Settings

Table 2 APIs for advanced bucket settings

API

Description

Configuring a Bucket Policy

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

Obtaining Bucket Policy Information

Obtains the policy of a bucket.

Deleting a Bucket Policy

Deletes the policy of a bucket.

Configuring a Bucket ACL

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

Obtaining Bucket ACL Information

Obtains the ACL of a bucket.

Configuring Logging for 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.

Obtaining a Bucket Logging Configuration

Obtains the logging configuration of a bucket.

Configuring Bucket Lifecycle Rules

Configures rules to delete or migrate objects in a bucket.

Obtaining Bucket Lifecycle Configuration

Obtains the lifecycle rules of a bucket.

Deleting Lifecycle Rules

Deletes the lifecycle rules of a bucket.

Configuring Versioning for 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.

Obtaining Bucket Versioning Status

Obtains the versioning status of a bucket.

Configuring Storage Class for a Bucket

Creates or updates the default storage class of a bucket.

Obtaining Bucket Storage Class Information

Obtains the default storage class of a bucket.

Configuring Cross-Region Replication for a Bucket

Configures cross-region replication for a bucket. This allows you to copy an object from a region to another one.

Obtaining the Cross-Region Replication Configuration of a Bucket

Obtains the cross-region replication configuration of a bucket.

Deleting the Cross-Region Replication Configuration of a Bucket

Deletes the cross-region replication configuration of a bucket.

Configuring Tags for 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.

Obtaining Bucket Tags

Obtains the tags of a specified bucket.

Deleting Tags

Deletes the tags of a bucket.

Configuring Bucket Storage Quota

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

Querying Bucket Storage Quota

Obtains the bucket quota.

Obtaining Storage Information of a Bucket

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

Configuring Bucket Inventories

Configures an inventory rule for a bucket. You can use an inventory rule to get a list of all objects in your bucket on a regular basis. The object metadata is saved in CSV files. These files are uploaded to your bucket.

Obtaining a Specific Inventory of a Bucket

Obtains an inventory rule of a bucket.

Listing All Inventories of a Bucket

Obtains all inventory rules of a bucket.

Deleting Bucket Inventories

Deletes an inventory rule of a bucket.

Configuring a Custom Domain Name for a Bucket

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

Obtaining the Custom Domain Name of a Bucket

Queries the custom domain name of a bucket.

Deleting the Custom Domain Name of a Bucket

Deletes the custom domain name of a bucket.

Configuring Bucket Encryption

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

Obtaining Bucket Encryption Configuration

Queries the server-side encryption configuration of a bucket.

Deleting the Encryption Configuration of a Bucket

Deletes the server-side encryption configuration of a bucket.

Setting the Direct Reading Policy for Archive Objects in a Bucket

Enables or disables direct reading for Archive objects in a bucket. This means objects can be downloaded without being restored.

Obtaining the Direct Reading Policy of Archive Objects in a Bucket

Obtains the direct reading status of Archive objects in a bucket.

Deleting the Direct Reading Policy of Archive Objects in a Bucket

Deletes the direct reading configuration of Archive objects in a bucket.

Configuring Mirroring Back-to-Source Rules

Configures mirroring back-to-source rules for a bucket.

Obtaining Mirroring Back-to-Source Rules

Obtains mirroring back-to-source rules of a bucket.

Deleting Mirroring Back-to-Source Rules

Deletes mirroring back-to-source rules of a bucket.

Setting an Online Decompression Policy

Configures the decompression rules for ZIP files in a bucket.

Obtaining an Online Decompression Policy

Obtains the decompression rules for ZIP files in a bucket.

Deleting an Online Decompression Policy

Deletes the decompression rules for ZIP files in a bucket.

Configuring a Default WORM Policy for a Bucket

Configures the WORM policy and retention period for a bucket.

Obtaining the Default WORM Policy of a Bucket

Returns the WORM policy of a bucket.

APIs for Static Website Hosting

Table 3 APIs for static website hosting

API

Description

Configuring Static Website Hosting for a Bucket

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.

Obtaining the Static Website Hosting Configuration of a Bucket

Obtains the website hosting configuration of a bucket.

Deleting the Static Website Hosting Configuration of a Bucket

Deletes the website hosting configuration of a bucket.

Configuring Bucket CORS

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.

Obtaining the CORS Configuration of a Bucket

Obtains the CORS configuration of a bucket.

Deleting the CORS Configuration of a Bucket

Deletes the CORS configuration of a bucket.

OPTIONS Bucket

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

OPTIONS Object

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

Uploading an Object - PUT

Uploads an object to a bucket.

Uploading an Object - POST

Uploads an object to a bucket using a form.

Copying an Object

Creates a copy for an existing object.

Downloading an Object

Downloads an object.

Querying Object Metadata

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

Deleting an Object

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

Deleting Objects

Permanently deletes a batch of objects from a bucket.

Restoring Archive or Deep Archive Objects

Restores objects from the Archive or Deep Archive (under limited beta testing) storage class.

Appending an Object

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

Configuring an Object ACL

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

Obtaining Object ACL Configuration

Obtains the ACL of an object.

Modifying Object Metadata

Adds, modifies, or deletes the existing object metadata.

Modifying an Object

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

Truncating an Object

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

Renaming an Object

Renames an object in a parallel file system.

Configuring WORM Retention for an Object

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

Listing Initiated Multipart Uploads in a Bucket

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

Initiating a Multipart Upload

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

Uploading Parts

Uploads parts for a multipart task.

Copying Parts

Copies part or all of an existing object as a part.

Listing Uploaded Parts that Have Not Been Assembled

Queries all parts of a multipart task.

Completing a Multipart Upload

Assembles parts into an object.

Canceling a Multipart Upload Task

Cancels a multipart upload task.