Azure Storage REST API Reference
This section provides detailed reference information for the Azure Storage REST APIs. These APIs allow you to interact with Azure Storage services programmatically, enabling you to manage and access your data from anywhere.
Overview
Azure Storage exposes data through various services, each with its own set of REST APIs:
- Blob Storage: For storing large amounts of unstructured data such as text or binary data.
- File Storage: For fully managed cloud file shares accessible via the SMB protocol.
- Queue Storage: For storing large numbers of messages that can be accessed from anywhere in the world.
- Table Storage: For storing large amounts of structured, non-relational data.
- Disk Storage: For providing high-performance managed disks for Azure Virtual Machines.
Authentication
Azure Storage REST APIs support several authentication methods, including:
- Shared Key Authentication: Using the storage account name and account key.
- Shared Access Signatures (SAS): Delegating access to resources with fine-grained control.
- Azure Active Directory (Azure AD): For service-to-service authentication.
Refer to the Authentication for Azure Storage documentation for detailed guidance.
Common REST API Operations
Blob Storage Operations
These operations allow you to interact with Blob Storage containers and blobs.
Put Blob
: Uploads a blob into a container.Get Blob
: Retrieves a blob from a container.Delete Blob
: Deletes a blob.List Blobs
: Lists the blobs within a container.Create Container
: Creates a new container.
Table Storage Operations
These operations allow you to interact with Table Storage entities.
Insert Entity
: Inserts an entity into a table.Query Entities
: Retrieves entities from a table.Merge Entity
: Updates an existing entity by merging properties.Delete Entity
: Deletes an entity from a table.
API Reference Details
Put Blob
Uploads a block blob, append blob, or page blob.
HTTP Method: PUT
Request URL:
https://.blob.core.windows.net//?comp=blocklist
Request Headers:
x-ms-blob-type
: Required. Specifies the type of blob (BlockBlob
,AppendBlob
,PageBlob
).Content-Length
: Required. The size of the request body in bytes.x-ms-date
: Required. The UTC date/time of the request.Authorization
: Required. Authentication credentials.
Request Body: The content of the blob.
Success Response: 201 Created
Get Blob
Retrieves a blob from a container.
HTTP Method: GET
Request URL:
https://.blob.core.windows.net//
Request Headers:
x-ms-date
: Required. The UTC date/time of the request.Authorization
: Required. Authentication credentials.
Success Response: 200 OK
with blob content in the body.
Delete Blob
Deletes a blob.
HTTP Method: DELETE
Request URL:
https://.blob.core.windows.net//
Request Headers:
x-ms-date
: Required. The UTC date/time of the request.Authorization
: Required. Authentication credentials.
Success Response: 202 Accepted
List Blobs
Lists the blobs within a specified container.
HTTP Method: GET
Request URL:
https://.blob.core.windows.net/?restype=container&comp=list
Query Parameters:
Name | Type | Description |
---|---|---|
prefix |
String | Filters the results to return only blobs whose names begin with the specified prefix. |
maxresults |
Integer | Specifies the maximum number of blobs to return. |
Request Headers:
x-ms-date
: Required. The UTC date/time of the request.Authorization
: Required. Authentication credentials.
Success Response: 200 OK
with an XML response containing the list of blobs.
Create Container
Creates a new container within a storage account.
HTTP Method: PUT
Request URL:
https://.blob.core.windows.net/
Request Headers:
x-ms-blob-public-access
: Optional. Specifies public access level (off
,blob
,container
).x-ms-date
: Required. The UTC date/time of the request.Authorization
: Required. Authentication credentials.
Success Response: 201 Created
Insert Entity
Inserts a new entity into a table.
HTTP Method: POST
Request URL:
https://.table.core.windows.net/
Request Headers:
Content-Type
: Required. Typicallyapplication/json;odata=nometadata
orapplication/atom+xml
.x-ms-date
: Required. The UTC date/time of the request.Authorization
: Required. Authentication credentials.
Request Body: The entity to insert (JSON or AtomPub format).
Success Response: 204 No Content
Query Entities
Retrieves entities from a table.
HTTP Method: GET
Request URL:
https://.table.core.windows.net/
Query Parameters:
Name | Type | Description |
---|---|---|
$filter |
String | OData filter expression to filter entities. |
$select |
String | Comma-separated list of properties to retrieve. |
$top |
Integer | Specifies the maximum number of entities to return. |
Success Response: 200 OK
with an OData or AtomPub response containing the entities.
Merge Entity
Merges an existing entity's properties with new properties.
HTTP Method: MERGE
Request URL:
https://.table.core.windows.net/(PartitionKey='',RowKey='')
Request Headers:
Content-Type
: Required. Typicallyapplication/json;odata=nometadata
orapplication/atom+xml
.x-ms-date
: Required. The UTC date/time of the request.Authorization
: Required. Authentication credentials.
Request Body: The properties to merge.
Success Response: 204 No Content
Delete Entity
Deletes an entity from a table.
HTTP Method: DELETE
Request URL:
https://.table.core.windows.net/(PartitionKey='',RowKey='')
Request Headers:
x-ms-date
: Required. The UTC date/time of the request.Authorization
: Required. Authentication credentials.
Success Response: 204 No Content
Note
For a complete and up-to-date list of all Azure Storage REST API operations, including details on request/response formats, error codes, and advanced features, please refer to the official Azure Storage REST API documentation on Microsoft Docs.