API Documentation

List Directory

List directory contents under the webspace home (~/). All paths are validated against the jail root.

Required scope: webspace:manage

Headers

Header Required Value
Authorization Yes Bearer YOUR_API_KEY

Query Parameters

Parameter Required Description
path Yes Absolute path inside ~/ (e.g. /home/ws_xxx/public_html).

Response

{
  "data": {
    "path": "/home/ws_0862c/public_html",
    "entries": [
      { "name": "index.html", "isDirectory": false, "size": 256, "modifiedAt": "2026-04-22T12:34:56+0000" },
      { "name": "assets",     "isDirectory": true,  "size": 4096, "modifiedAt": "2026-04-22T12:30:00+0000" }
    ]
  }
}

Error Responses

Status Code Description
400 PATH_OUTSIDE_JAIL Path escapes the webspace home.

Example

curl "https://hosting.site.quest/api/v1/webspaces/69e80ac1.../sftp/list?path=/home/ws_0862c/public_html" \
  -H "Authorization: Bearer sq_live_..."

MCP

This action is also available via the webspace_list_files MCP tool.