Azure Blob Storage REST API

Azure Blob Storage stores text and binary data as objects in the cloud. Blob Storage offers the following resources: the storage account, containers, and blobs. Within your storage account, containers provide a way to organize sets of blobs.

You can store text and binary data in one of the following types of blobs:

  • Block blobs, which are optimized for streaming.

  • Append blobs, which are optimized for append operations.

  • Page blobs, which are optimized for random read/write operations, and which provide the ability to write to a range of bytes in a blob.

For more information, see Understanding block blobs, append blobs, and page blobs.

The REST API for Blob Storage defines HTTP operations against the storage account, containers, and blobs. The API includes the operations listed in the following table.

Operation Resource type Description
List Containers Account Lists all of the containers in a storage account.
Set Blob Storage Properties Account Sets the properties of Blob Storage, including logging and metrics settings, and the default service version.
Get Blob Storage Properties Account Gets the properties Blob Storage, including logging and metrics settings, and the default service version.
Preflight Blob Request Account Queries the Cross-Origin Resource Sharing (CORS) rules for Blob Storage, prior to sending the actual request.
Get Blob Storage Stats Account Retrieves statistics related to replication for Blob Storage. This operation is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account.
Get Account Information Account Returns the SKU name and account kind for the specified account.
Get User Delegation Key Account Gets a key that can be used to sign a user delegation shared access signature. This signature grants access to resources in Blob Storage by using Microsoft Entra credentials.
Create Container Container Creates a new container in a storage account.
Get Container Properties Container Returns all user-defined metadata and system properties of a container.
Get Container Metadata Container Returns only user-defined metadata of a container.
Set Container Metadata Container Sets user-defined metadata of a container.
Get Container ACL Container Gets the public access policy and any stored access policies for the container.
Set Container ACL Container Sets the public access policy and any stored access policies for the container.
Lease Container Container Establishes and manages a lock on a container for delete operations.
Delete Container Container Deletes the container and any blobs that it contains.
List Blobs Container Lists all of the blobs in a container.
Put Blob Block, append, and page blobs Creates a new blob or replaces an existing blob within a container.
Get Blob Block, append, and page blobs Reads or downloads a blob from Blob Storage, including its user-defined metadata and system properties.
Get Blob Properties Block, append, and page blobs Returns all system properties and user-defined metadata on the blob.
Set Blob Properties Block, append, and page blobs Sets system properties defined for an existing blob.
Set Blob Expiry Block blobs Sets expiry time for an existing blob.
Get Blob Metadata Block, append, and page blobs Retrieves all user-defined metadata of an existing blob or snapshot.
Set Blob Metadata Block, append, and page blobs Sets user-defined metadata of an existing blob.
Get Blob Tags Block, append, and page blobs Retrieves user-defined tags of an existing blob.
Set Blob Tags Block, append, and page blobs Sets user-defined tags of an existing blob that form a secondary index.
Find Blobs By Tags Block, append, and page blobs Lists blobs by their user-defined tags.
Delete Blob Block, append, and page blobs Marks a blob for deletion.
Undelete Blob Block, append, and page blobs Restores the contents and metadata of a soft-deleted blob, or all associated soft-deleted snapshots.
Lease Blob Block, append, and page blobs Establishes and manages a lock on write and delete operations. To delete or write to a locked blob, a client must provide the lease ID.
Snapshot Blob Block, append, and page blobs Creates a read-only snapshot of a blob.
Copy Blob Block, append, and page blobs Copies a source blob to a destination blob in this storage account or in another storage account.
Abort Copy Blob Block, append, and page blobs Stops a pending Copy Blob operation, and leaves a destination blob with zero length and full metadata.
Put Block Block blobs only Creates a new block to be committed as part of a block blob.
Put Block From URL Block blobs only Creates a new block to be committed as part of a block blob where the contents are read from a URL.
Put Block List Block blobs only Commits a blob by specifying the set of block IDs that comprise the block blob.
Get Block List Block blobs only Retrieves the list of blocks that have been uploaded as part of a block blob.
Query Blob Contents Block blobs only Applies a simple Structured Query Language (SQL) statement on a blob's contents, and returns only the queried subset of the data.
Set Blob Tier Block and page blobs Sets the tier of a blob.
Put Page Page blobs only Writes a range of pages into a page blob.
Get Page Ranges Page blobs only Returns a list of valid page ranges for a page blob or a snapshot of a page blob.
Incremental Copy Blob Page blobs only Copies a snapshot of a source page blob to a destination page blob. Only differential changes are transferred.
Append Block Append blobs only Writes a block of data to the end of an append blob.

In this section

Blob Storage concepts

Operations on the account (Blob Storage)

Operations on containers

Operations on blobs

Operations on blobs (hierarchical namespace-enabled accounts)

See also

Storage services REST