> 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/api/docs/storages.md).

# Storages

Cloud storage configuration

## Get Storages

> Retrieves all storage configurations for your organization

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Storages","description":"Cloud storage configuration"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"parameters":{"PageParam":{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"Page number (1-indexed). Sending it without `limit` sets the page size to 10. Without it no rows are skipped."},"LimitParam":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1},"description":"Items per page. Not capped by the server. Without it and without `page`, every matching row is returned; `listProjects` is the exception, see its own description."}},"schemas":{"StorageListResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"storages":{"type":"array","items":{"$ref":"#/components/schemas/Storage"}}}}}},"Storage":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string","enum":["AWS","GCP","AZURE","CUSTOM_S3"]},"region":{"type":"string"},"s3AccessType":{"type":"string","enum":["IAM_USER","IAM_DELEGATED"]},"s3RoleArn":{"type":"string"},"s3ExternalId":{"type":"string"},"s3UserArn":{"type":"string"},"host":{"type":"string"},"azureAuthType":{"type":"string","enum":["ACCOUNT_KEY","SERVICE_PRINCIPAL","MULTI_TENANT"]},"azureTenantId":{"type":"string"},"azureClientId":{"type":"string"},"publicKey":{"type":"string"},"useAccelerateEndpoint":{"type":"boolean"},"organization":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["fail","error"]},"message":{"type":"string"}}}},"responses":{"BadRequestError":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/storages":{"get":{"tags":["Storages"],"summary":"Get Storages","description":"Retrieves all storage configurations for your organization","operationId":"getStorages","parameters":[{"$ref":"#/components/parameters/PageParam"},{"$ref":"#/components/parameters/LimitParam"}],"responses":{"200":{"description":"Storages retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestError"}}}}}}
```

## Create Storage

> Creates a new cloud storage configuration

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Storages","description":"Cloud storage configuration"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"StorageCreateRequest":{"type":"object","required":["name","provider"],"properties":{"name":{"type":"string","description":"Storage configuration display name"},"provider":{"type":"string","enum":["AWS","GCP","AZURE","CUSTOM_S3"]},"region":{"type":"string","default":"eu-central-1","description":"AWS only. Bucket region."},"publicKey":{"type":"string","description":"Access key ID for AWS (IAM user) and CUSTOM_S3. For AZURE this is the storage account name (required for all Azure auth types)."},"privateKey":{"type":"string","description":"Secret access key for AWS (IAM user) and CUSTOM_S3. For AZURE (ACCOUNT_KEY) this is the account key. Write-only, never returned."},"s3AccessType":{"type":"string","enum":["IAM_USER","IAM_DELEGATED"],"default":"IAM_USER","description":"AWS only. IAM_DELEGATED uses STS AssumeRole instead of static keys."},"s3RoleArn":{"type":"string","description":"AWS IAM_DELEGATED only. Role ARN to assume."},"s3ExternalId":{"type":"string","description":"AWS IAM_DELEGATED only. External ID for the AssumeRole trust policy."},"host":{"type":"string","description":"CUSTOM_S3 only (required). S3-compatible endpoint URL."},"credentials":{"type":"object","description":"GCP only. Service-account JSON object. Write-only, never returned."},"azureAuthType":{"type":"string","enum":["ACCOUNT_KEY","SERVICE_PRINCIPAL","MULTI_TENANT"],"default":"ACCOUNT_KEY","description":"AZURE only."},"azureTenantId":{"type":"string","description":"AZURE SERVICE_PRINCIPAL and MULTI_TENANT."},"azureClientId":{"type":"string","description":"AZURE SERVICE_PRINCIPAL only."},"azureClientSecret":{"type":"string","description":"AZURE SERVICE_PRINCIPAL only. Write-only, never returned."},"useAccelerateEndpoint":{"type":"boolean","default":false,"description":"AWS only. Use S3 Transfer Acceleration."}}},"StorageResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"storage":{"$ref":"#/components/schemas/Storage"}}}}},"Storage":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string","enum":["AWS","GCP","AZURE","CUSTOM_S3"]},"region":{"type":"string"},"s3AccessType":{"type":"string","enum":["IAM_USER","IAM_DELEGATED"]},"s3RoleArn":{"type":"string"},"s3ExternalId":{"type":"string"},"s3UserArn":{"type":"string"},"host":{"type":"string"},"azureAuthType":{"type":"string","enum":["ACCOUNT_KEY","SERVICE_PRINCIPAL","MULTI_TENANT"]},"azureTenantId":{"type":"string"},"azureClientId":{"type":"string"},"publicKey":{"type":"string"},"useAccelerateEndpoint":{"type":"boolean"},"organization":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["fail","error"]},"message":{"type":"string"}}}},"responses":{"BadRequestError":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/storages":{"post":{"tags":["Storages"],"summary":"Create Storage","description":"Creates a new cloud storage configuration","operationId":"createStorage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageCreateRequest"}}}},"responses":{"200":{"description":"Storage created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestError"}}}}}}
```

## Delete Storage

> Soft-deletes a storage configuration (sets the deleted flag; the record is retained).

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Storages","description":"Cloud storage configuration"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"StorageResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"storage":{"$ref":"#/components/schemas/Storage"}}}}},"Storage":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string","enum":["AWS","GCP","AZURE","CUSTOM_S3"]},"region":{"type":"string"},"s3AccessType":{"type":"string","enum":["IAM_USER","IAM_DELEGATED"]},"s3RoleArn":{"type":"string"},"s3ExternalId":{"type":"string"},"s3UserArn":{"type":"string"},"host":{"type":"string"},"azureAuthType":{"type":"string","enum":["ACCOUNT_KEY","SERVICE_PRINCIPAL","MULTI_TENANT"]},"azureTenantId":{"type":"string"},"azureClientId":{"type":"string"},"publicKey":{"type":"string"},"useAccelerateEndpoint":{"type":"boolean"},"organization":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["fail","error"]},"message":{"type":"string"}}}},"responses":{"NotFoundError":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/storages/{storageId}":{"delete":{"tags":["Storages"],"summary":"Delete Storage","description":"Soft-deletes a storage configuration (sets the deleted flag; the record is retained).","operationId":"deleteStorage","parameters":[{"name":"storageId","in":"path","required":true,"schema":{"type":"string"},"description":"Storage ID"}],"responses":{"200":{"description":"Storage deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageResponse"}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## List Storage Files

> Lists files recursively in a cloud storage bucket. This endpoint allows you to browse and retrieve file listings from your configured storage integrations (AWS S3, Google Cloud Storage, Azure Blob Storage, or Custom S3-compatible storage).\
> \
> \*\*Features:\*\*\
> \- Recursive directory listing\
> \- Optional signed URL generation for direct file access\
> \- Automatic retry mechanism for S3 rate limit errors\
> \- Support for path-based filtering\
> \
> \*\*Use Cases:\*\*\
> \- Browse storage bucket contents before importing\
> \- Generate signed URLs for batch asset uploads\
> \- Validate storage configuration and access\
> \- List available datasets for annotation projects<br>

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Storages","description":"Cloud storage configuration"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"StorageFilesResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"files":{"type":"array","description":"Flat list of object keys, or pre-signed URLs when getSignedUrls=true (default).","items":{"type":"string"}}}}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["fail","error"]},"message":{"type":"string"}}}},"responses":{"UnauthorizedError":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ForbiddenError":{"description":"Forbidden - insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/storages/{storageId}/files":{"get":{"tags":["Storages"],"summary":"List Storage Files","description":"Lists files recursively in a cloud storage bucket. This endpoint allows you to browse and retrieve file listings from your configured storage integrations (AWS S3, Google Cloud Storage, Azure Blob Storage, or Custom S3-compatible storage).\n\n**Features:**\n- Recursive directory listing\n- Optional signed URL generation for direct file access\n- Automatic retry mechanism for S3 rate limit errors\n- Support for path-based filtering\n\n**Use Cases:**\n- Browse storage bucket contents before importing\n- Generate signed URLs for batch asset uploads\n- Validate storage configuration and access\n- List available datasets for annotation projects\n","operationId":"listStorageFiles","parameters":[{"name":"storageId","in":"path","required":true,"schema":{"type":"string"},"description":"Storage configuration ID"},{"name":"bucketName","in":"query","required":true,"schema":{"type":"string"},"description":"Name of the bucket/container to list files from"},{"name":"path","in":"query","required":false,"schema":{"type":"string","default":""},"description":"Directory path to list files from. Defaults to root directory if not specified."},{"name":"getSignedUrls","in":"query","required":false,"schema":{"type":"string","enum":["true","false"],"default":"true"},"description":"Whether to generate pre-signed URLs for each file. Defaults to true.\n- `true`: Returns pre-signed URLs (default)\n- `false`: Returns object keys only\n"},{"name":"retryOnSlowDown","in":"query","required":false,"schema":{"type":"string","enum":["true","false"],"default":"true"},"description":"Enable automatic retry mechanism for S3 SlowDown errors (rate limiting). When enabled, the API will automatically retry with exponential backoff.\n- `true`: Retry on rate limit errors (default)\n- `false`: Fail immediately on rate limit errors\n"}],"responses":{"200":{"description":"Files retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageFilesResponse"}}}},"400":{"description":"Bad Request - Missing required parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Storage not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# 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/api/docs/storages.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.
