---
title: "List Files"
method: GET
path: "/v2/storage/files"
tags: ["Files"]
---

# List Files

`GET /v2/storage/files`

## Request

- Base URL: `https://connection.keboola.com`
- URL: `https://connection.keboola.com/v2/storage/files`
- Auth: one of:
  - API key in header `X-StorageApi-Token`
  - API key in header `X-KBC-ManageApiToken`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/keboola/apis/keboola-storage-api/docs/v2/storage/files/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists all files uploaded by your token. If the `canReadAllFileUploads` permission is set for your token,
all file uploads for project will be returned.

*Note*: There can be a delay of up to one second before any file change is propagated into the
list of files (including addition and removal of a file).

Filters are passed as query string parameters.

## Query parameters

- `sinceId` string
- `maxId` string
- `tags` string[]
- `q` string
- `runId` string
- `limit` integer
- `offset` integer
- `showExpired` boolean

## Response `200`

List of files.

- FileResponse[]
  - `id` integer, required: Identifier of the file.
  - `created` string, required: Creation time of the file, ISO 8601 with a `+hhmm` offset.
  - `isPublic` boolean, required: Whether the file is publicly accessible via a direct URL.
  - `isSliced` boolean, required: Whether the file consists of multiple slices (chunks) described by a manifest file.
  - `isEncrypted` boolean, required: Whether the file content is encrypted in the storage.
  - `name` string, required: Sanitized file name.
  - `fileType` string, required: Human readable file type derived from the file name.
  - `url` string, required: Pre-signed download URL of the file. The URL expires after one hour.
  - `provider` 'aws' | 'azure' | 'gcp', required: File storage provider.
  - `region` string, required: Region of the file storage.
  - `sizeBytes` integer, nullable, required: File size in bytes, null when not known.
  - `tags` string[], required: Tags assigned to the file.
  - `maxAgeDays` integer, nullable, required: Number of days the file is kept before it expires. Null for permanent files.
  - `runId` string, nullable, required: Run ID taken from the X-KBC-RunId header when the file was created.
  - `runIds` string[], required: All run IDs derived from the hierarchical run ID.
  - `creatorToken` object, required: Token that created the file.
    - `id` integer, required
    - `description` string, required

## Other responses

- `400`: Returned when a parameter is invalid (`storage.validation`), the `q` query has invalid syntax (`query.syntax`) or the search fails (`storage.files.filesError`).

---

[API](https://skmtc.dev/keboola/apis/keboola-storage-api.md) - [All operations](https://skmtc.dev/keboola/apis/keboola-storage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keboola/apis/keboola-storage-api/revisions/34b5ceac0317?raw)
