---
title: "List Site Files"
method: GET
path: "/v1/sites/{id}/file_manager/files"
tags: ["Files"]
---

# List Site Files

`GET /v1/sites/{id}/file_manager/files`

List all files/directories in a specific directory

## Path parameters

- `id` integer, required

## Query parameters

- `path` string
- `search` string
- `page` integer, required — Page of results to include (default = 1)
- `per_page` integer, required — How many results to include in each page (default = 10)
- `sort` 'created_at' | 'ctime' | 'mtime' | 'name' | 'size' | 'type' | 'updated_at'
- `direction` 'asc' | 'desc' | 'ASC' | 'DESC' — Direction to sort results in (asc = ascending, desc = descending)

## Response `200`

OK

- ListFileManagerFilesResponse
  - `success` boolean — whether the request succeeded
  - `errors` string[]
  - `messages` string[], nullable
  - `metadata` object
    - `page` integer — Page number of the results
    - `page_size` integer — Number of results per page
    - `total` integer — Total number of results
    - `sort` string — Sorting criteria
    - `direction` 'asc' | 'desc' — Sorting direction
  - `result` FileManagerFile[]
    - `created_at` string — Time the file was created (human readable)
    - `ctime` integer — Time the file was created (unix time)
    - `updated_at` string — Time the file was last modified (human readable)
    - `mtime` integer — Time the file was last modified (unix time)
    - `name` string — Name of the file or directory
    - `mode` string — Human readable linux file permissions
    - `type` 'dir' | 'file' — Whether this is a file or directory (dir)
    - `human_size` string — File size in human readable form
    - `size` integer — File size in bytes
    - `path` string — Path to the file/directory (relative to the document root of the site)

## Other responses

- `400` — Bad Request
- `401` — Authentication failed
- `403` — Not authorized to access endpoint
- `404` — Given site not found for user
- `405` — Invalid input
- `500` — Internal error

---

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