---
title: "List Files"
method: GET
path: "/list-files"
tags: ["runtime_mutations", "notebook"]
---

# List Files

`GET /list-files`

Unified endpoint for listing files and folders in a directory.

``session_id`` scopes the listing to an isolated run's own prefix (the
``--cloud`` copy-back); absent, it lists the shared workspace.

The reply always carries ``run_scoped``, saying which of those two
happened. It exists for the copy-back: a deployment predating this
parameter ignores the unknown query arg and answers with the SHARED
listing, which is indistinguishable from a correctly-scoped empty run
unless the answer says so. An isolated run treats a reply without the
field as "this server cannot scope me" and drops the store leg rather
than exporting another run's files. Never remove it, and never report
True on a path that did not resolve through the run-scoped service.

## Query parameters

- `path` string
- `include_file_metadata` boolean
- `session_id` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/quadrillion/apis/quadrillion-cloud-api.md) · [All operations](https://skmtc.net/quadrillion/apis/quadrillion-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quadrillion/quadrillion-cloud-api/revisions/c53108d35a70/schema)
