Microsoft Docs

Azure Blob Storage REST API Reference

This document provides detailed reference information for the Azure Blob Storage REST API. The Blob Storage REST API exposes operations for interacting with Azure Blob Storage.

Overview

Azure Blob Storage is a service that stores unstructured data such as text or binary data. Blob storage can be used to serve images or documents directly to a browser, store files for direct access, download videos and audio files for streaming, store data for backup and restore, disaster recovery, and data archiving. You can also store data with custom business logic to suit your needs.

The Blob Storage REST API allows you to perform a wide range of operations on blobs, containers, and storage accounts. These operations include:

Authentication

All REST API requests to Azure Blob Storage must be authenticated. Supported authentication methods include:

For more details on authentication, refer to the Azure Storage Authentication documentation.

API Endpoints

Blob Operations

GET Get Blob Properties

Retrieves system properties for a blob.

URI: /{accountName}/{containerName}/{blobName}?comp=metadata

Request Headers:
x-ms-version: 2020-08-04
Authorization: SharedKey ...
x-ms-date: Tue, 22 Nov 2022 00:39:45 GMT
Responses:
  • 200 OK: Properties retrieved successfully.
  • 404 Not Found: Blob or container does not exist.

GET Download Blob

Reads or downloads a blob.

URI: /{accountName}/{containerName}/{blobName}

Request Headers:
x-ms-version: 2020-08-04
Authorization: SharedKey ...
x-ms-date: Tue, 22 Nov 2022 00:39:45 GMT
If-Match: "0x8CB8234C5E991A5"
Responses:
  • 200 OK: Blob downloaded successfully.
  • 404 Not Found: Blob or container does not exist.

PUT Upload Blob

Uploads a block blob.

URI: /{accountName}/{containerName}/{blobName}

Request Headers:
x-ms-version: 2020-08-04
Authorization: SharedKey ...
x-ms-date: Tue, 22 Nov 2022 00:39:45 GMT
Content-Length: {content-length}
x-ms-blob-type: BlockBlob
Request Body:
Binary data of the blob
Responses:
  • 201 Created: Blob uploaded successfully.

DELETE Delete Blob

Deletes a blob.

URI: /{accountName}/{containerName}/{blobName}

Request Headers:
x-ms-version: 2020-08-04
Authorization: SharedKey ...
x-ms-date: Tue, 22 Nov 2022 00:39:45 GMT
Responses:
  • 200 OK: Blob deleted successfully.
  • 404 Not Found: Blob or container does not exist.

Container Operations

PUT Create Container

Creates a new container within the specified storage account.

URI: /{accountName}/{containerName}

Request Headers:
x-ms-version: 2020-08-04
Authorization: SharedKey ...
x-ms-date: Tue, 22 Nov 2022 00:39:45 GMT
x-ms-blob-public-access: off
Responses:
  • 201 Created: Container created successfully.

GET List Blobs

Lists all blobs within the specified container.

URI: /{accountName}/{containerName}?restype=container&comp=list

Request Headers:
x-ms-version: 2020-08-04
Authorization: SharedKey ...
x-ms-date: Tue, 22 Nov 2022 00:39:45 GMT
Responses:
  • 200 OK: Blobs listed successfully.

DELETE Delete Container

Deletes the specified container and all its blobs.

URI: /{accountName}/{containerName}

Request Headers:
x-ms-version: 2020-08-04
Authorization: SharedKey ...
x-ms-date: Tue, 22 Nov 2022 00:39:45 GMT
Responses:
  • 200 OK: Container deleted successfully.
  • 404 Not Found: Container does not exist.

Further Reading