v48

latestOpenAPI 3.0.0raw.githubusercontent.com2025-12-0297180624.8 KB
File System

List box files

Lists files and directories in a box. You can specify the directory path and depth, and optionally a working directory. The response includes metadata such as type, size, permissions, and last modified time.

get/boxes/{boxId}/fs/list

Path parameters

boxIdstring required
Example:c9bdc193-b54b-4ddb-a035-5ac0c598d32d

Box ID

Query parameters

workingDirstring
Example:/home/user/documents

Working directory. If not provided, the file will be read from the box.config.workingDir directory.

pathstring required
Example:/home/user/documents

Target directory path in the box

depthnumber
Example:2

Depth of the directory

Response

List files

Example response

{
  "data": [
    {
      "type": "dir",
      "name": "projects",
      "path": "/home/user/documents/projects/",
      "mode": "755",
      "lastModified": "2024-01-15T10:30:00.000Z"
    },
    {
      "type": "file",
      "name": "readme.txt",
      "path": "/home/user/documents/readme.txt",
      "size": "1.2KB",
      "mode": "644",
      "lastModified": "2024-01-15T10:30:00.000Z"
    }
  ]
}