Sign Up

Files

List files

GET
/files

List entries under the requested directory. Omitting path uses the sandbox’s default working directory. depth defaults to 1 and recursive listings are capped at 10,000 entries.

Query Parameters

path?string

Absolute target path: /-rooted, or on Windows also a drive or UNC path (/-rooted paths resolve against the daemon's current drive). Omitted on GET /files to use the sandbox’s default working directory. Relative and empty paths are refused with INVALID_FILE_PATH.

depth?string

Recursive listing depth for GET /files; omitted for the flat default (1).

Response Body

application/json
  1. response
[index: integer]?

One filesystem entry returned by /files and /files/info.

curl -X GET 'http://sandbox:2280/files'
[  {    "group": "string",    "isDir": true,    "modTime": "string",    "mode": "string",    "modifiedAt": "string",    "name": "string",    "owner": "string",    "path": "string",    "permissions": "string",    "size": 0  }]
DELETE
/files

Delete one file. Directories require recursive=true or recursive=1.

Query Parameters

path?string

Absolute path to remove.

recursive?string

Recursive delete flag as a string query value.

Response Body

The path was deleted.

curl -X DELETE 'http://sandbox:2280/files'
Empty

Download many files

POST
/files/bulk-download

Stream regular files at absolute paths using the sandbox user's permissions. Invalid paths, non-regular files and permission denials discovered before streaming refuse the request with 400 or 403. Other failures, including failures after streaming starts, use error parts carrying error envelopes; the outer response then stays 200.

Request Body

application/json
  1. body

JSON body for POST /files/bulk-download.

paths?array<string>

Absolute paths of regular files to stream back as multipart file or error parts. Permission denials and non-regular files discovered before streaming refuse the request.

Response Body

Multipart file and error parts with the fixed boundary DAYTONA-FILE-BOUNDARY.

multipart/form-data
curl -X POST 'http://sandbox:2280/files/bulk-download' \  -H 'Content-Type: application/json' \  -d '{}'
Empty

Upload many files

POST
/files/bulk-upload

Upload files using paired absolute files[i].path and files[i].file multipart fields. A relative or empty path, or a non-regular destination, returns 400 INVALID_FILE_PATH; non-regular destinations use <path>: not a regular file. Earlier uploads are not rolled back. Other partial success is reported per file in the JSON body. New files and directories belong to the configured sandbox user, and writes require that user’s permissions. With atomic=true, each successful file is replaced atomically; unsupported atomic replacement is reported for that file while other files continue.

Query Parameters

atomic?boolean

Replace each destination file atomically; fail that file if atomic replacement is unsupported. A replacement keeps the existing owner when the sandbox user may assign it, and is otherwise owned by the sandbox user. A non-regular destination refuses the request with 400 INVALID_FILE_PATH; earlier uploads are not rolled back.

Request Body

Multipart form using files[i].path metadata parts and files[i].file content parts.

multipart/form-data
  1. body
files[0].path*string

Destination path for the file in the matching files[0].file part. Repeat with files[1].path, files[2].path, and so on for additional files.

files[0].file*file

File content for the path in files[0].path.

Formatbinary

Response Body

application/json
  1. response

Partial-success response from POST /files/bulk-upload.

errors*array<string>

Human-readable per-part failures.

files*array<>

Successfully written files.

curl -X POST 'http://sandbox:2280/files/bulk-upload' \  -F 'files[0].path=string' \  -F 'files[0].file=string'
{  "errors": [    "string"  ],  "files": [    {      "bytes": 0,      "path": "string"    }  ]}

Download one file

GET
/files/download

Stream one regular file at an absolute path as application/octet-stream, using the sandbox user's permissions. Directories, FIFOs, sockets and devices are refused without reading them.

Query Parameters

path?string

Absolute target path: /-rooted, or on Windows also a drive or UNC path (/-rooted paths resolve against the daemon's current drive). Omitted on GET /files to use the sandbox’s default working directory. Relative and empty paths are refused with INVALID_FILE_PATH.

depth?string

Recursive listing depth for GET /files; omitted for the flat default (1).

Response Body

Raw file bytes.

application/octet-stream
curl -X GET 'http://sandbox:2280/files/download'
Empty

Find text in files

GET
/files/find

Walk the tree rooted at the absolute path as the sandbox user and return literal substring matches with one-based line numbers. Non-regular files are skipped. Directories and files below the root that the sandbox user cannot read are skipped and listed in skipped (at most 1000); only an unreadable root fails the request.

Query Parameters

path?string

Absolute root path to walk recursively.

pattern?string

Filename glob (search) or literal substring (find) pattern.

Response Body

application/json
  1. response

Literal line matches from GET /files/find.

items*array<>

Matches, in walk order.

skipped*array<string>

Absolute paths below the root that the sandbox user cannot read, so they were not searched. Empty when nothing was skipped; at most 1000 entries.

curl -X GET 'http://sandbox:2280/files/find'
{  "items": [    {      "content": "string",      "file": "string",      "line": 0    }  ],  "skipped": [    "string"  ]}

Create a folder

POST
/files/folder

Create the requested directory tree. Omitting mode uses the route default.

Query Parameters

path?string

Absolute directory path to create.

mode?string

Optional octal mode string; omitted or empty uses the route default.

Response Body

The directory exists.

curl -X POST 'http://sandbox:2280/files/folder'
Empty

Get file metadata

GET
/files/info

Return one FileInfo record for the requested path.

Query Parameters

path?string

Absolute target path: /-rooted, or on Windows also a drive or UNC path (/-rooted paths resolve against the daemon's current drive). Omitted on GET /files to use the sandbox’s default working directory. Relative and empty paths are refused with INVALID_FILE_PATH.

depth?string

Recursive listing depth for GET /files; omitted for the flat default (1).

Response Body

application/json
  1. response

One filesystem entry returned by /files and /files/info.

group*string

Numeric group id rendered as a string.

isDir*boolean

Whether the entry is a directory.

modTime*string

Last modification time as a formatted string. Prefer modifiedAt for RFC 3339 formatting.

mode*string

File mode string, for example -rw-r--r-- or drwxr-xr-x.

modifiedAt*string

RFC 3339 UTC timestamp for the last modification time.

name*string

Base name of the entry.

owner*string

Numeric owner id rendered as a string.

path*string

Absolute path to the entry, using the sandbox's path syntax.

permissions*string

Four-digit octal permissions (0644, 0755, …).

size*integer

Entry size in bytes.

Formatint64
Range0 <= value
curl -X GET 'http://sandbox:2280/files/info'
{  "group": "string",  "isDir": true,  "modTime": "string",  "mode": "string",  "modifiedAt": "string",  "name": "string",  "owner": "string",  "path": "string",  "permissions": "string",  "size": 0}

Move a file or directory

POST
/files/move

Move or rename a path, including between filesystems.

Query Parameters

source?string

Absolute source path to move.

destination?string

Absolute destination path.

Response Body

The path was moved.

curl -X POST 'http://sandbox:2280/files/move'
Empty

Change permissions

POST
/files/permissions

Change mode and, on platforms that support it, owner and group.

Query Parameters

path?string

Absolute path whose permissions should change. On Linux, ownership and permissions apply to the symlink target when the path names a symlink.

mode?string

Optional octal mode string.

owner?string

Optional owner id or name, when the platform supports chown.

group?string

Optional group id or name, when the platform supports chgrp.

Response Body

Permissions were updated.

curl -X POST 'http://sandbox:2280/files/permissions'
Empty

Replace text in files

POST
/files/replace

Replace a literal substring across regular files at absolute paths as the sandbox user. Permission denials return 403; other file-specific failures, including skipped non-regular files, stay inside the 200 response body. Earlier replacements are not rolled back when a later file fails.

Request Body

application/json
  1. body

JSON body for POST /files/replace.

files?array<string>

Absolute paths of regular files to rewrite. Non-regular files are skipped with a per-file failure; permission denials return FILE_ACCESS_DENIED.

newValue?|

Replacement text. Omitted only when the caller wants the route to reject the request.

pattern?string

Literal substring to replace.

Response Body

application/json
  1. response
[index: integer]?

One file's outcome from POST /files/replace.

curl -X POST 'http://sandbox:2280/files/replace' \  -H 'Content-Type: application/json' \  -d '{}'
[  {    "error": "string",    "file": "string",    "success": true  }]

Search filenames

GET
/files/search

Walk the tree rooted at path as the sandbox user and return absolute file paths whose base name matches the glob pattern. Directories and files below the root that the sandbox user cannot read are skipped and listed in skipped (at most 1000); only an unreadable root fails the request.

Query Parameters

path?string

Absolute root path to walk recursively.

pattern?string

Filename glob (search) or literal substring (find) pattern.

Response Body

application/json
  1. response

Recursive filename-glob search results from GET /files/search.

files*array<string>

Absolute matching file paths.

skipped*array<string>

Absolute paths below the root that the sandbox user cannot read, so their contents were not searched. Empty when nothing was skipped; at most 1000 entries.

curl -X GET 'http://sandbox:2280/files/search'
{  "files": [    "string"  ],  "skipped": [    "string"  ]}

Upload one file

POST
/files/upload

Upload the multipart part named file to the query’s absolute destination path. Existing destinations must be regular files; directories, FIFOs, sockets and devices return 400 INVALID_FILE_PATH with <path>: not a regular file, without writing to them. New files and parent directories belong to the configured sandbox user; existing files retain their ownership, except that atomic=true over a file the sandbox user cannot give back to its owner leaves the replacement owned by the sandbox user. Writes require that user’s permissions, otherwise return 403 FILE_ACCESS_DENIED without creating a destination. With atomic=true, replace the destination atomically or fail if unsupported.

Query Parameters

path?string

Absolute destination path for the uploaded file. Existing destinations must be regular files; otherwise returns 400 INVALID_FILE_PATH, <path>: not a regular file.

atomic?boolean

Replace the destination file atomically; fail if atomic replacement is unsupported. The replacement keeps the existing owner when the sandbox user may assign it, and is otherwise owned by the sandbox user.

Request Body

Multipart form with one file part named file.

multipart/form-data
  1. body
file*file

File content.

Formatbinary

Response Body

The file was uploaded.

curl -X POST 'http://sandbox:2280/files/upload' \  -F 'file=string'
Empty

Watch a directory

GET
/files/watch

Server-sent events for one absolute directory path, using the sandbox user's permissions. The stream emits start with {}, fs with WatchFsEvent, and overflow with WatchOverflowEvent. On macOS, a permission denial discovered after streaming starts emits error with an error envelope and closes the stream. follow=true is accepted and ignored for compatibility.

Query Parameters

path?string

Absolute directory path to watch.

recursive?boolean

Whether nested subdirectories should be watched too.

follow?boolean

Accepted but ignored.

Response Body

SSE stream of start, fs, and overflow events; macOS may emit a terminal error envelope after an access denial.

text/event-stream
curl -X GET 'http://sandbox:2280/files/watch'
Empty