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

# List Files

`GET /storage/list`

## Request

- Base URL: `https://api.traversal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.traversal.com/storage/list`
- Auth: none declared

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.dev/traversal/apis/traversal-api.md) - [All operations](https://skmtc.dev/traversal/apis/traversal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traversal/apis/traversal-api/revisions/31e1a8b7cf89?raw)
