Azure Storage Files API Reference

Comprehensive documentation for interacting with Azure Blob Storage, File Shares, and Table Storage.

Blob Storage APIs

Blob Operations

GET /storageaccounts/{accountName}/containers/{containerName}/blobs/{blobName}

Retrieves a blob from a container.

Parameters

Name Type Required Description
accountName string Yes The name of the storage account.
containerName string Yes The name of the container.
blobName string Yes The name of the blob.
snapshot string No Specifies a snapshot version of the blob.
versionId string No Specifies a version of the blob.

Successful Response (200 OK)

The content of the blob.

Example Request

GET https://myaccount.blob.core.windows.net/mycontainer/myblob.txt?snapshot=2023-01-01T10%3A00%3A00Z HTTP/1.1
Host: myaccount.blob.core.windows.net
x-ms-date: Mon, 27 Jul 2009 22:32:43 GMT
x-ms-version: 2019-02-02
Authorization: SharedKey myaccount:TdgG0L4eK3C0Q09vR23dIuXF2P8=
PUT /storageaccounts/{accountName}/containers/{containerName}/{blobName}

Uploads a block blob to a container.

Parameters

Name Type Required Description
accountName string Yes The name of the storage account.
containerName string Yes The name of the container.
blobName string Yes The name of the blob.
Content-Type string No The MIME type of the blob.
x-ms-blob-type string Yes Specifies the type of blob (BlockBlob, AppendBlob, PageBlob).

Successful Response (201 Created)

Indicates the blob was successfully created.

Example Request

PUT https://myaccount.blob.core.windows.net/mycontainer/myblob.txt HTTP/1.1
Host: myaccount.blob.core.windows.net
Content-Length: 1024
Content-Type: text/plain
x-ms-blob-type: BlockBlob
x-ms-date: Mon, 27 Jul 2009 22:32:43 GMT
x-ms-version: 2019-02-02
Authorization: SharedKey myaccount:TdgG0L4eK3C0Q09vR23dIuXF2P8=

<blob content>

File Storage APIs

Share Operations

PUT /storageaccounts/{accountName}/shares/{shareName}

Creates a new file share.

Parameters

Name Type Required Description
accountName string Yes The name of the storage account.
shareName string Yes The name of the file share to create.
x-ms-share-quota integer No The maximum size of the share in GiB.

Successful Response (201 Created)

Indicates the share was successfully created.

Directory Operations

PUT /storageaccounts/{accountName}/shares/{shareName}/dirs/{directoryPath}

Creates a directory within a file share.

Parameters

Name Type Required Description
accountName string Yes The name of the storage account.
shareName string Yes The name of the file share.
directoryPath string Yes The path of the directory to create.

Successful Response (201 Created)

Indicates the directory was successfully created.

File Operations

PUT /storageaccounts/{accountName}/shares/{shareName}/files/{filePath}

Uploads a file to a directory within a file share.

Parameters

Name Type Required Description
accountName string Yes The name of the storage account.
shareName string Yes The name of the file share.
filePath string Yes The path of the file to upload.
Content-Length integer Yes The size of the file in bytes.
x-ms-type string Yes Set to 'File'.

Successful Response (201 Created)

Indicates the file was successfully created.

Table Storage APIs

Table Operations

POST /storageaccounts/{accountName}/tables

Creates a new table.

Parameters

Name Type Required Description
accountName string Yes The name of the storage account.

Request Body

{
    "TableName": "MyNewTable"
}

Successful Response (204 No Content)

Indicates the table was successfully created.

Entity Operations

POST /storageaccounts/{accountName}/tables/{tableName}/entities

Inserts a new entity into a table.

Parameters

Name Type Required Description
accountName string Yes The name of the storage account.
tableName string Yes The name of the table.

Request Body (Example)

{
    "PartitionKey": "abc",
    "RowKey": "123",
    "MyProperty": "SomeValue",
    "AnotherProperty@odata.type": "Edm.Int32",
    "AnotherProperty": 5
}

Successful Response (204 No Content)

Indicates the entity was successfully inserted.