> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/sdk/sdk-documentation/utility-functions/list_storage_files.md).

# list\_storage\_files

`imerit_ango.sdk.SDK.`

## list\_storage\_files(storage\_id, bucket\_name, path, get\_signed\_urls, retry\_on\_slow\_down)

Recursively list all files stored in the specified storage, bucket or Azure container, and folder path.

### Parameters

* **storage\_id:** string
  * The unique identifier for the storage. You can retrieve the storage ID using [`get_storages`](/sdk/sdk-documentation/organization-level-sdk-functions/get_storages.md) function.
* **bucket\_name:** string
  * The name of the storage bucket, or Azure container, to list files from.
  * Example: `"ango-datasets"`
* **path:** string, *default ""*
  * The directory path within the bucket or container to list files from. If empty, files are listed from the root.
  * Example: `"project-1/images/batch-1/"`
* **get\_signed\_urls:** bool, *default True*
  * Whether to generate signed URLs for the listed files. When enabled, each file entry includes a temporary URL for secure access.
* **retry\_on\_slow\_down:** bool, *default True*
  * Whether to automatically retry the request if the storage service responds with a slow-down or rate-limiting error.

Returns:

* **output:** dict
  * A dictionary containing the result of the operation.
  * Including a `status` field indicating whether the request was successful and a `data` field containing the response payload with updated resources produced by the operation.

### Example

{% tabs %}
{% tab title="python" %}

```python
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')

ango_sdk = SDK(api_key)

storage_id = "$STORAGE_ID"
sdk_response = ango_sdk.list_storage_files(
    storage_id=storage_id,
    bucket_name="ango-dataset",
    path="project-1/images/batch-1/",
    get_signed_urls=True,
    retry_on_slow_down=True
)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X GET "https://imeritapi.ango.ai/v2/storages/\$STORAGE_ID/files \
  ?bucketName=ango-dataset \
  &path=project-1/images/batch-1/ \
  &getSignedUrls=true \
  &retryOnSlowDown=true" \
  -H "Content-Type: application/json" \
  -H "apikey: YOUR_API_KEY"
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**See also**

[get\_storages](/sdk/sdk-documentation/organization-level-sdk-functions/get_storages.md)
{% endhint %}
