# 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 and folder path.

### Parameters

* **storage\_id:** string
  * The unique identifier for the storage. You can retrieve the storage ID using [`get_storages`](https://docs.imerit.net/sdk/sdk-documentation/organization-level-sdk-functions/get_storages) function.
* **bucket\_name:** string
  * The name of the storage bucket to list files from.
  * Example: `"ango-datasets"`
* **path:** string, *default ""*
  * The directory path within the bucket to list files from. If empty, files are listed from the root of the bucket.
  * 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 %}
{% endtabs %}

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

[get\_storages](https://docs.imerit.net/sdk/sdk-documentation/organization-level-sdk-functions/get_storages)
{% endhint %}
