Skip to main content
GET
/
browser
/
sessions
/
{id}
/
fs
/
dir
List Directory
curl --request GET \
  --url https://api.example.com/browser/sessions/{id}/fs/dir
{
  "path": "<string>",
  "entries": [
    {}
  ]
}

Overview

Returns the immediate children of a workspace directory. Pass an empty path (or omit it) to list the workspace root. The listing is not recursive — use GET /fs/zip to get the full tree as an archive.

Path Parameters

id
string
required
Browser session ID (UUID).

Query Parameters

path
string
Workspace-relative directory path. Empty or omitted lists the workspace root.

Example Request

curl -G "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/fs/dir" \
  -H "Authorization: Bearer $SCRAPENGINE_API_KEY"

Response

Success Response (200)

path
string
The listed workspace-relative directory path.
entries
array
Entries in the directory. Each entry contains:
  • name (string) — basename of the entry.
  • path (string) — workspace-relative path of the entry.
  • type (string) — one of file, dir, symlink, other.
  • size (integer) — size in bytes (0 for directories).
  • mode (integer) — Unix mode.
  • mtime (string) — last modified timestamp (ISO 8601).
Example Response:
{
  "path": "downloads",
  "entries": [
    {
      "name": "invoice.pdf",
      "path": "downloads/invoice.pdf",
      "type": "file",
      "size": 20813,
      "mode": 420,
      "mtime": "2026-04-24T09:12:44Z"
    }
  ]
}

Error Responses

StatusDescription
400Invalid path.
401Unauthorized — invalid or missing API key.
404Session or directory not found.