---
title: Work with BLOB storage containers
slug: dxp/cms12-docs/work-with-blob-storage-containers
docTags: 
createdAt: 2026-06-01T17:39:49.147Z
---

Storage accounts are provisioned as part of a DXP project and are used for various purposes (for example, access logs or to download site contents). The storage container API allows access to the BLOB storage containers and contents. The API has the following operations.

- **List** – Lists the available BLOB storage containers.
- **Generate SAS link** – Generates a read-only SAS link for a blob container with a dynamic link expiration time

The storage containers API uses an authentication mechanism similar to other deployment APIs. See [Deployment API authentication](docId:2zbogiRaPvgO24HKMj_9e).

## Get containers list

### Request

`GET api/v1.0/projects/{projectId:guid}/environments/{environment}/storagecontainers`

### Parameters

| Name        | Type   | Description                                                                       |
| ----------- | ------ | --------------------------------------------------------------------------------- |
| projectId   | Guid   | The identifier of the project.                                                    |
| environment | string | The name of the environment for which the BLOB storage containers will be listed. |

### Response

```csharp
{
  "success": bool,
  "errors": array,
  "result": {
    "projectId": guid,
    "environment": string,
    "storageContainers": array
  }
}
```

## Generate SAS link

### Request

`POST api/v1.0/projects/{projectId:guid}/environments/{environment}/storagecontainers/{containerName}/saslink`

### Parameters

| Name          | Type   | Description                                                                       |
| ------------- | ------ | --------------------------------------------------------------------------------- |
| projectId     | Guid   | The identifier of the project.                                                    |
| environment   | string | The name of the environment for which the BLOB storage containers will be listed. |
| containerName | string | Name of the container for which a SAS link is to be generated.                    |

### Body

```csharp
{
  retentionHours : 12             
}
```

|   |
| - |

```javascript
  <th>
    Type
  </th>

  <th>
    Description
  </th>
</tr>
```

\| retentionHours |

```javascript
  <td>
    int
  </td>

  <td>
    Total hours until the SAS link is valid to access, after which it will expire.  

    The default value is 24 if no body is included with the POST request.
  </td>
</tr>
```

### Response

```csharp
{ 
  "success" : bool,
  "errors"  : array,
  "result"  : {
    "projectId"     : guid,
    "environment"   : string,
    "containerName" : string,
    "sasLink"       : string,
    "expiresOn"     : datetime
  }
}
```

## Epicloud Module

The

:::Iframe{code="<Anchor title=&#x22;EpiCloud PowerShell Module&#x22; href=&#x22;https://www.powershellgallery.com/packages/EpiCloud/&#x22;>"}

:::

EpiCloud PowerShell module adds the `Get-EpiStorageContainer` and `Get-EpiStorageContainerSasLink` cmdlets to perform the storage containers API operations using PowerShell. To install the module and connect with the authentication mechanism, see [Deploy using PowerShell](docId\:gdAi6HCsKQ6a79_xuvErE) for information about how to install the `EpiCloud` module.

### Get-EpiStorageContainer

Fetches the list of BLOB storage containers for an environment in the project.

```powershell
Get-EpiStorageContainer -ProjectId "76443fa4-ad6a-4517-a382-ac5900a18fa4" -Environment "Integration"

projectId                            environment storageContainers
---------                            ----------- -----------------
76443fa4-ad6a-4517-a382-ac5900a18fa4 Integration {azure-application-logs, azure-web-logs}
```

### Get-EpiStorageContainerSasLink

Generates a new read-only SAS link for a specific BLOB storage container. The `-RetentionHours` parameter takes a dynamic value for the SAS link expiry; if it is not provided, a default 24 hours is used to generate the link.

```powershell
Get-EpiStorageContainerSasLink -ProjectId "2372b396-6fd2-40ca-a955-57871fc497c9" `
  -Environment "Preproduction" `
  -StorageContainer "azure-web-logs" `
  -RetentionHours 2

projectId     : 76443fa4-ad6a-4517-a382-ac5900a18fa4
environment   : Integration
containerName : azure-web-logs
sasLink       : https://storagecontainer.blob.core.windows.net/azure-web-logs
expiresOn     : 20/10/2020 10:13:28
```
