Get your free beta license ↗
API operation · files group
GET

/files/{user}

First published 3 Oct 20260.1.0Unchanged since publication

List the entries in a directory in a customer's home

Who may call it
AdministratorResellerCustomer
Token scope, any of
filesreadall
Answers200 OK

The listing puts directories first. Each entry includes its size, modification time, mode, and owner. Symbolic link entries also include the target and indicate whether it is inside the home directory. The listing includes links that resolve outside the home directory without following them.

All /files operations use the named customer's account, with the same filesystem permissions as SFTP. In API paths, / represents /home/<user>/files. The API ignores repeated slashes and . components. It returns 400 for a missing required path, a path without a leading /, a .. component, a control character, a path longer than 4096 characters, or a component longer than 255 characters. Specifying an administrator's account as the target also returns 400 because administrator accounts lack a customer home directory.

The response field limit_mb reports the maximum file size set by files.upload_limit_mb, in MB. This limit applies to file contents transferred as JSON and to raw uploads. GET /files/{user}/download streams bytes without a size limit.

As a command

Run as root on the server

Parameters

userpath ·UsernameRequired
Username of the customer who owns the home directory. Administrators can specify any customer, and customers can specify only themselves.
pathquery ·HomePath
Directory path starting with /. Defaults to /, the customer's home directory.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/files/alice?path=public_html/index.php" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "entries": [
    {
      "inside": true,
      "mode": "text",
      "modified": "text",
      "name": "alice",
      "owner": "text",
      "path": "public_html/index.php",
      "size": 1,
      "target": "https://example.com/new",
      "target_type": "dir",
      "text": true,
      "type": "dir"
    }
  ],
  "limit_mb": 1,
  "path": "public_html/index.php",
  "total": 1,
  "truncated": true,
  "user": "alice"
}

Errors

11 errors, each a status and a sentence
400--user is required
400<name> is an administrator: administrators have no home
400<what> climbs out of the home with ..
400<what> has a name over 255 characters
400<what> holds a control character
400<what> is required
400<what> is too long
400<what> must start with /, which is the home
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
401Authentication required
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/get-files-user/