> 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.imerit.net/sdk/sdk-documentation/utility-functions/list_storage_files.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
