---
title: "List folder content"
method: GET
path: "/api/spaces/{namespace}/{repo}/tree/{rev}/{path}"
tags: ["spaces"]
---

# List folder content

`GET /api/spaces/{namespace}/{repo}/tree/{rev}/{path}`

List the content of a repository tree, with pagination support.

## Path parameters

- `namespace` string, required
- `repo` string, required
- `rev` string, required
- `path` string, required — Wildcard path parameter

## Query parameters

- `expand` boolean — If true, returns returns associated commit data for each entry and security scanner metadata.
- `recursive` boolean — If true, returns the tree recursively.
- `limit` integer — 1.000 by default, 100 by default for expand=true
- `cursor` string

## Response `200`

List of entries in the repository tree

- object[]
  - `type` 'file' | 'directory' | 'unknown', required
  - `oid` string, required
  - `size` integer — If the file is a LFS pointer, it'll return the size of the remote file
  - `lfs` object
    - `oid` string, required
    - `size` integer, required
    - `pointerSize` integer, required
  - `xetHash` string
  - `lastCommit` object
    - `id` string, required
    - `title` string, required
    - `date` string, date-time, required
  - `securityFileStatus` object
    - `status` 'unscanned' | 'safe' | 'queued' | 'error' | 'caution' | 'suspicious' | 'unsafe', required
    - `jFrogScan` object
      - `status` 'unscanned' | 'safe' | 'queued' | 'error' | 'caution' | 'suspicious' | 'unsafe', required
      - `message` string
      - `reportLink` string
      - `reportLabel` string
      - `pickleImports` object[]
        - `module` string, required
        - `name` string, required
        - `safety` 'innocuous' | 'suspicious' | 'dangerous', required
      - `version` string
    - `protectAiScan` object
      - `status` 'unscanned' | 'safe' | 'queued' | 'error' | 'caution' | 'suspicious' | 'unsafe', required
      - `message` string
      - `reportLink` string
      - `reportLabel` string
      - `pickleImports` object[]
        - `module` string, required
        - `name` string, required
        - `safety` 'innocuous' | 'suspicious' | 'dangerous', required
      - `version` string
    - `avScan` object, required
      - `status` 'unscanned' | 'safe' | 'queued' | 'error' | 'caution' | 'suspicious' | 'unsafe', required
      - `message` string
      - `reportLink` string
      - `reportLabel` string
      - `pickleImports` object[]
        - `module` string, required
        - `name` string, required
        - `safety` 'innocuous' | 'suspicious' | 'dangerous', required
      - `version` string
    - `pickleImportScan` object, required
      - `status` 'unscanned' | 'safe' | 'queued' | 'error' | 'caution' | 'suspicious' | 'unsafe', required
      - `message` string
      - `reportLink` string
      - `reportLabel` string
      - `pickleImports` object[]
        - `module` string, required
        - `name` string, required
        - `safety` 'innocuous' | 'suspicious' | 'dangerous', required
      - `version` string
    - `virusTotalScan` object
      - `status` 'unscanned' | 'safe' | 'queued' | 'error' | 'caution' | 'suspicious' | 'unsafe', required
      - `message` string
      - `reportLink` string
      - `reportLabel` string
      - `pickleImports` object[]
        - `module` string, required
        - `name` string, required
        - `safety` 'innocuous' | 'suspicious' | 'dangerous', required
      - `version` string

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/dae0cc3790f0/schema)
