This topic outlines the Object Storage Service (OSS) APIs. It helps you understand the core concepts and resource model of OSS and quickly find the APIs that you need. For custom development, use software development kits (SDKs) in your production environment. SDKs encapsulate complex logic, such as signing, retries, and concurrency. This topic serves as a reference for the underlying implementation of SDKs and is useful for advanced customization or for understanding the communication mechanism.
Before you begin, take note of the following:
API calls must comply with the Limits.
Before you use the APIs, make sure that you understand the billing methods of OSS. For more information about pricing, see OSS Pricing.
Quick start: Call your first API
This section uses the creation of a bucket (PutBucket) as an example to describe the complete process of making an API call.
1. Preparations
Before you start, obtain the following information:
AccessKey: For security, all OSS API requests except for anonymous access requests must be signed for authentication. OSS uses a signature mechanism that is based on an AccessKey pair, which consists of an AccessKey ID and an AccessKey secret, to verify requests. The signature information must be included in the
Authorizationfield of the HTTP request header. For more information about how to calculate a signature, see Signature V4 (recommended).Endpoint: API requests must be sent to the endpoint of the region where the destination bucket is located. An endpoint is the access address of an OSS service. For more information about the endpoints of different regions, see Regions and endpoints.
2. Construct and send a request
PUT / HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Thu, 17 Apr 2025 03:15:40 GMT
x-oss-acl: private
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
<?xml version="1.0" encoding="UTF-8"?>
<CreateBucketConfiguration>
<StorageClass>Standard</StorageClass>
<DataRedundancyType>LRS</DataRedundancyType>
</CreateBucketConfiguration>3. Understand the response
Successful response: If the request is successful, the server returns a
2xxstatus code. For operations that return content, the response body is in XML format.HTTP/1.1 200 OK x-oss-request-id: 534B371674E88A4D8906**** Date: Fri, 24 Feb 2017 03:15:40 GMT Content-Length: 0 Connection: keep-alive Server: AliyunOSS Location: /oss-exampleError handling: If the request fails, the server returns a
4xxor5xxstatus code. The response body is also in XML format and contains a specific error code (Code) and an error message (Message). For more information, see Error codes to troubleshoot the issue.
API list
Service operations
API | Description |
Returns all buckets that are owned by the requester. | |
Lists all data redundancy transition tasks of the requester. |
Region operations
API | Description |
Queries the endpoints of all supported regions or a specified region. |
Bucket operations
Classification | API | Description |
Basic operations | Creates a bucket. | |
Deletes a bucket. | ||
Lists information about all objects in a bucket. | ||
Queries bucket information. | ||
Queries the location of a bucket. | ||
Queries the storage usage and the number of objects in a bucket. | ||
Retention policy | Creates a retention policy. | |
Deletes an unlocked retention policy. | ||
Locks a retention policy. | ||
Extends the retention period of objects in a bucket for which a retention policy is locked. | ||
Queries the retention policy of a bucket. | ||
Access control | Sets the access permissions of a bucket. | |
Queries the access permissions of a bucket. | ||
Lifecycle | Sets lifecycle rules for objects in a bucket. | |
Queries the lifecycle rules for objects in a bucket. | ||
Deletes the lifecycle rules for objects in a bucket. | ||
Transfer acceleration | Configures transfer acceleration for a bucket. | |
Queries the transfer acceleration configuration of a bucket. | ||
Versioning | Sets the versioning state of a bucket. | |
Queries the versioning state of a bucket. | ||
Lists the versions of all objects in a bucket. | ||
Cross-region replication | Sets data replication rules for a bucket. | |
Enables or disables replication time control (RTC) for existing cross-region replication rules. | ||
Queries the data replication rules that are set for a bucket. | ||
Queries the destination regions to which data can be replicated. | ||
Queries the data replication progress of a bucket. | ||
Stops data replication tasks and deletes the replication configuration of a bucket. | ||
Authorization policy | Sets a bucket policy. | |
Queries a bucket policy. | ||
Checks whether the current bucket policy allows public access. | ||
Deletes a bucket policy. | ||
Inventory | Sets an inventory rule for a bucket. | |
Queries a specified inventory task in a bucket. | ||
Queries all inventory tasks in a bucket. | ||
Deletes a specified inventory task from a bucket. | ||
Log Management | Enables the access log recording feature for a bucket. | |
Queries the access log configuration of a bucket. | ||
Disables the access log recording feature for a bucket. | ||
Configures the | ||
Queries the configuration of the | ||
Deletes the configuration of the | ||
Static website | Sets a bucket to the static website hosting mode. | |
Queries the static website hosting status of a bucket. | ||
Disables the static website hosting mode for a bucket. | ||
Hotlink protection | Sets a hotlink protection rule for a bucket. | |
Queries the hotlink protection rule of a bucket. | ||
Tags | Adds or modifies bucket tags. | |
Queries bucket tags. | ||
Deletes bucket tags. | ||
Encryption | Configures encryption rules for a bucket. | |
Queries the encryption rules of a bucket. | ||
Deletes the encryption rules of a bucket. | ||
Pay by requester | Sets a bucket to the pay-by-requester mode. | |
Queries the pay-by-requester configuration of a bucket. | ||
Cross-origin resource sharing | Sets cross-origin resource sharing (CORS) rules for a specified bucket. | |
Queries the current CORS rules of a specified bucket. | ||
Disables the CORS feature and clears all CORS rules for a specified bucket. | ||
Before a browser sends a cross-origin request, it sends a preflight request (OPTIONS) that carries information such as the source origin, HTTP method, and headers to OSS to determine whether to send the actual request. | ||
Access tracking | Configures the access tracking state of a bucket. | |
Queries the access tracking state of a bucket. | ||
Data Indexing | Enables the metadata management feature for a bucket. | |
Queries the metadata index library of a specified bucket. | ||
Queries objects that meet specified conditions and lists object information based on specified fields and sorting methods. | ||
Disables the metadata management feature for a bucket. | ||
DDoS Protection | Creates an Anti-DDoS for OSS instance. | |
Changes the status of an Anti-DDoS for OSS instance. | ||
Queries information about the Anti-DDoS for OSS instances that belong to a specified account. | ||
Initializes protection for a bucket. | ||
Updates the protection status of a bucket. | ||
Queries the list of protection information for a bucket. | ||
Resource group | Configures a resource group for a bucket. | |
Queries the ID of the resource group to which a bucket belongs. | ||
Custom domain name | Creates a CNAME token that is required to verify the ownership of a domain name. | |
Queries a created CNAME token. | ||
Binds a CNAME record to a bucket. | ||
Queries the list of all CNAME records that are bound to a bucket. | ||
Deletes a bound CNAME record. | ||
Image style | Adds an image style. | |
Queries information about a specified image style in a bucket. | ||
Queries all image styles that are created in a bucket. | ||
Deletes a specified image style from a bucket. | ||
Transport-layer security | Enables or disables TLS version settings for a bucket. | |
Queries the TLS version settings of a bucket. | ||
Redundancy transition | Creates a data redundancy transition task. | |
Queries a data redundancy transition task. | ||
Deletes a data redundancy transition task. | ||
Lists all data redundancy transition tasks of the requester. | ||
Lists all data redundancy transition tasks in a bucket. | ||
Access point | Creates an access point. | |
Queries the information about an access point. | ||
Deletes an access point. | ||
Queries the information about user-level or bucket-level access points. | ||
Configures an access point policy. | ||
Queries the configuration of an access point policy. | ||
Deletes an access point policy. | ||
Object FC access point | Creates an Object FC access point. | |
Queries basic information about an Object FC access point. | ||
Deletes an Object FC access point. | ||
Queries information about user-level Object FC access points. | ||
Modifies the configuration of an Object FC access point. | ||
Queries the configuration of an Object FC access point. | ||
Configures an access policy for an Object FC access point. | ||
Queries the access policy configuration of an Object FC access point. | ||
Deletes the access policy of an Object FC access point. | ||
Customizes returned data and response headers. | ||
Block Public Access | Globally enables Block Public Access for OSS. | |
Queries the global Block Public Access configuration for OSS. | ||
Deletes the global Block Public Access configuration for OSS. | ||
Enables Block Public Access for a bucket. | ||
Queries the Block Public Access configuration of a specified bucket. | ||
Deletes the Block Public Access configuration of a specified bucket. | ||
Enables Block Public Access for an access point. | ||
Queries the Block Public Access configuration of a specified access point. | ||
Deletes the Block Public Access configuration of a specified access point. | ||
Real-time access of Archive objects | Enables or disables real-time access of Archive objects. | |
Queries whether real-time access of Archive objects is enabled. | ||
OSS accelerator | Creates an OSS accelerator or modifies its configuration. | |
Queries the information about an OSS accelerator. | ||
Deletes an OSS accelerator. |
Object operations
Classification | API | Description |
Basic operations | Uploads an object. | |
Queries an object. | ||
Copies an object. | ||
Uploads an object using append upload. | ||
Prevents data from being appended to an Appendable object. | ||
Deletes a single object. | ||
Deletes multiple objects. | ||
Returns only the metadata of an object, not the content of the object. | ||
Returns the basic metadata of an object, such as the ETag, size, and last modified time of the object, but does not return the content of the object. | ||
Uploads an object using an HTML form. | ||
You can implement a callback by including the callback parameters in a request that you send to OSS. | ||
Restores an Archive Storage, Cold Archive, or Deep Cold Archive object. | ||
Ends the restored state of an object in advance. | ||
Executes an SQL statement on an object file and returns the execution result. | ||
Queries the total number of rows, total number of columns (for CSV files), and number of splits of an object file. | ||
Folder management | Creates a folder. | |
Renames a folder or an object. | ||
Deletes a folder. | ||
Multipart upload | Initiates a multipart upload event. | |
Uploads data in parts based on the specified object name and upload ID. | ||
Calls the UploadPartCopy operation to copy data from an existing object to upload a part by adding the x-oss-copy-source request header to an UploadPart request. | ||
After all parts of a file are uploaded, you must call the CompleteMultipartUpload operation to complete the multipart upload of the file. | ||
Cancels a multipart upload event and deletes the uploaded parts. | ||
Lists all multipart upload events that are in progress. In-progress multipart upload events are multipart upload events that are initiated but not completed or aborted. | ||
Lists all successfully uploaded parts that belong to a specified upload ID. | ||
Access control | Modifies the access permissions of an object. | |
Queries the access permissions of an object. | ||
Symbolic link | Creates a symbolic link. | |
Queries a symbolic link. | ||
Tagging | Sets or updates object tags. | |
Queries object tags. | ||
Deletes specified object tags. |
Vector bucket operations
Classification | API | Description |
Vector bucket | PutVectorBucket | Creates a vector bucket. |
GetVectorBucket | Queries the details of a vector bucket. | |
ListVectorBuckets | Lists all vector buckets that belong to the current account. | |
DeleteVectorBucket | Deletes a vector bucket. | |
Index | PutVectorIndex | Creates a vector index in a vector bucket. |
GetVectorIndex | Queries the details of a vector index. | |
ListVectorIndexes | Lists all vector indexes in a vector bucket. | |
DeleteVectorIndex | After you upload all data parts, you must call the CompleteMultipartUpload API to complete the multipart upload. | |
Vectors | PutVectors | Writes vector data to an index. |
GetVectors | Queries specified vector data. | |
ListVectors | Lists all vector data in a vector index. | |
DeleteVectors | Deletes specified vector data from a vector index. | |
QueryVectors | Performs a vector similarity search. |
Resource group QoS operations
API | Description |
Sets throttling for a bucket in a resource pool. | |
Queries the throttling configuration of a bucket in a resource pool. | |
Deletes the throttling configuration of a specified bucket in a resource pool. | |
Sets bucket-level throttling for a requester. | |
Queries the bucket-level throttling configuration for a specified requester. | |
Queries the bucket-level throttling configurations for all requesters. | |
Deletes the throttling configuration of a requester for a bucket. | |
Queries information about all resource pools that belong to the current account. | |
Queries the throttling configuration of a specified resource pool. | |
Queries the list of buckets that are included in a specified resource pool. | |
Configures throttling for a requester of a resource pool. | |
Queries the throttling configuration of a specified requester for a resource pool. | |
Queries the throttling configurations of all requesters for a resource pool. | |
Deletes the throttling configuration of a specified requester for a resource pool. | |
Adds a bucket in a resource pool to a bucket group. | |
Lists the bucket groups in a specified resource pool. | |
Configures or modifies the throttling settings for a bucket group in a resource pool. | |
Queries the throttling configuration of a bucket group in a resource pool. | |
Lists the throttling configurations of bucket groups in a resource pool. | |
Deletes the throttling configuration of a bucket group in a resource pool. |
LiveChannel operations
API | Description |
Switches the status of a LiveChannel. | |
Creates a LiveChannel. | |
Queries a playlist. | |
Generates a playlist. | |
Queries the stream ingest status of a LiveChannel. | |
Queries the configuration of a LiveChannel. | |
Queries the stream ingest records of a LiveChannel. | |
Lists LiveChannels. | |
Deletes a LiveChannel. |