# List a task's files under a path

`GET /tasks/{id}/files/list/{path}`

:::code-group
```bash title="cURL"
curl --request GET \
  --url https://{host}/api/tasks/{id}/files/list/{path} \
  --header 'Authorization: Bearer <token>'
```

```json title="200"
{
  "entries": [
    {
      "name": "<string>",
      "kind": "<string>",
      "size": 123,
      "mtime": "<string>"
    }
  ],
  "total": 123,
  "offset": 123,
  "limit": 123,
  "next_offset": 123
}
```
:::

## Authorizations

- `Authorization` (header, string, required) — Bearer authentication header of the form `Bearer <token>`.

## Path Parameters

- `id` (path, string, required) — Task id.
- `path` (path, string, required) — Relative path within the tree. Matches greedily, so it may contain `/`.

## Query Parameters

- `offset` (query, integer) — Where the page starts. Source and knowledge listings echo it rather than applying it, since they return the whole directory in one page.
- `limit` (query, integer) — Maximum entries in the page. Source and knowledge listings echo it rather than applying it, since they return the whole directory in one page.

## Headers

- `X-Pinecone-Api-Version` (header, string) — Date-based contract version, echoed back on the same header. Omit for the default (`2026-07`); send `unstable` for the in-development surface. An unrecognized value is rejected with `400 unsupported_api_version`.

## Response

- `200` — Directory listing
- `404` — Not found

## Related pages

- [Read a task file (raw bytes)](./data-plane-task-files-read-a-task-file-raw-bytes.md)
- [Stat a task file](./data-plane-task-files-stat-a-task-file.md)
- [List a task's working-directory files](./data-plane-task-files-list-a-tasks-working-directory-files.md)
- [Delete a task file](./data-plane-task-files-delete-a-task-file.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
