---
title: "List a directory in the session's workspace [read]"
method: GET
path: "/sessions/{id}/workspace/files"
---

# List a directory in the session's workspace \[read\]

`GET /sessions/{id}/workspace/files`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/sessions/{id}/workspace/files`
- Auth: HTTP bearer

Returns up to 200 entries (name, type, size, mtime) for a directory under /data/workspace. Dotfiles are excluded by default; pass ?hidden=true to include them. Only regular files and directories are listed: symlinks, FIFOs, sockets and devices never are. Paths are confined to the workspace root; '..' and absolute paths outside the root return 400 invalid_path. A parked or suspended pod returns 409 session_parked — send a message to wake it.

## Path parameters

- `id` string, required

## Query parameters

- `path` string
- `hidden` boolean

## Response `200`

OK

- object
  - `path` string
  - `entries` object[]
    - `name` string
    - `type` 'file' | 'directory'
    - `size` integer
    - `mtime` string, date-time
  - `truncated` boolean
  - `limit` integer

## Other responses

- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/sessions/:id/workspace/files/get.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
