---
title: "List Files"
method: GET
path: "/storage/list"
---

# List Files

`GET /storage/list`

List files under a given S3 prefix (file tree).

Requires platform admin role.

Args:
    prefix: S3 prefix to list files under (default: "" for all files)
    max_keys: Maximum number of keys to return (default: 1000)

Returns:
    ListFilesResponse with list of file keys, prefix, and count

Raises:
    HTTPException: 403 if not platform admin, 500 for S3 errors

## Query parameters

- `prefix` string
- `max_keys` integer

## Response `200`

Successful Response

- ListFilesResponse — Response containing list of files under a prefix. Attributes: prefix: The S3 prefix that was queried files: List of S3 keys found under the prefix count: Number of files found
  - `prefix` string, required
  - `files` string[], required
  - `count` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/traversal/apis/fastapi.md) · [All operations](https://skmtc.net/traversal/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/traversal/fastapi/revisions/2134ebffd1ef/schema)
