The File Operations API provides endpoints for searching, processing, uploading, modifying, and deleting files. Use these endpoints to interact with the file system programmatically — including glob and regex content search, on-the-fly image processing, resumable uploads, permission/ownership changes, and recursive delete operations.
Search a directory for files whose names match a query. Returns HTML by default; pass ?json to receive JSON instead.
Name In Type Required Description directorypath string Yes Directory path to search qquery string Yes Search query (case-insensitive filename match) jsonquery string No Return JSON format instead of HTML
curl -X GET " https://api.hoody.com/documents/?q=report&json= "
await client . files . search ({
"name" : " annual-report.pdf " ,
"error" : " Search is not allowed on this server "
Error Code Title Description Resolution SEARCH_FORBIDDENSearch operation not allowed Server is not configured to allow file searching Contact administrator to enable --allow-search flag INSUFFICIENT_PERMISSIONSInsufficient permissions User account does not have search permissions for this path Contact administrator for search permissions or authenticate with different account
On-the-fly image processing with format conversion, resizing, and effects. Supports JPEG, PNG, WebP, GIF, BMP input/output. Works for both local files and all 60+ remote cloud storage backends.
Name In Type Required Description imagepath string Yes Path to image file thumbnailquery string Yes Enable image processing formatquery string No Output format. Allowed values: jpeg, png, webp, gif, bmp. Default: "jpeg" sizequery string No Width×Height in pixels (max: 2000×2000) widthquery integer No Width in pixels (height auto-calculated) heightquery integer No Height in pixels (width auto-calculated) resizequery string No Resize mode: fit (preserve aspect, fit within), fill (exact size, crop), cover (cover area), exact (force dimensions). Default: "fit" qualityquery string No Resize algorithm quality: low (box filter), medium (bilinear), high (Lanczos3). Default: "medium" qquery integer Yes JPEG/WebP quality (1-100, higher is better quality). Default: 85 blurquery number No Gaussian blur radius (0-50) grayscalequery string No Convert to grayscale/black-and-white bgquery string No Background color for transparency (hex RGB, e.g., ffffff for white)
curl -X GET " https://api.hoody.com/images/hero.jpg?thumbnail=&format=webp&width=800&quality=high "
await client . files . images . process ({
image: " images/hero.jpg " ,
Returns the processed image binary in the requested format. The response includes Content-Type and Cache-Control: public, max-age=3600 headers.
"error" : " Invalid image or unsupported format "
Find files and directories matching a glob pattern. Supports recursive patterns (**/*.rs), brace expansion ({ts,tsx}), character classes, and standard wildcards. Results are sorted by modification time (newest first) by default and respect .gitignore.
Name In Type Required Description pathpath string Yes Directory path to search within patternquery string Yes Glob pattern (e.g. **/*.rs, src/**/*.{ts,tsx}, *.md) max_resultsquery integer No Maximum entries to return. Default: 1000 max_depthquery integer No Maximum directory recursion depth. Default: 50 max_files_scannedquery integer No Maximum filesystem entries to scan. Default: 100000 timeoutquery integer No Search timeout in seconds. Default: 30 no_ignorequery boolean No Bypass .gitignore filtering. Default: false sortquery string No Sort results by: mtime (modification time), name, or size. Default: "mtime" orderquery string No Sort order. Default: desc for mtime, asc for name/size. Allowed values: asc, desc
curl -X GET " https://api.hoody.com/api/v1/files/glob/src?pattern=**/*.rs&max_results=50&sort=mtime "
await client . files . glob ({
"error" : " Invalid glob pattern "
"error" : " Glob search is not allowed "
"error" : " Path not found: src "
"error" : " Too many concurrent searches, try again later "
Search file or directory contents using regex patterns. Powered by ripgrep with .gitignore support, binary file detection, and configurable limits. Returns matching lines with optional context.
Name In Type Required Description pathpath string Yes File or directory path to search patternquery string Yes Search pattern (regex by default, literal if fixed_string=true) ignore_casequery boolean No Case-insensitive matching. Default: false fixed_stringquery boolean No Treat pattern as literal string, not regex. Default: false globquery string No Filter files by glob pattern (e.g. *.rs, *.{ts,tsx}) contextquery integer No Number of context lines before and after each match. Default: 0 max_countquery integer No Maximum matches per file. Default: 50 max_matchesquery integer No Total maximum matches across all files. Default: 500 max_depthquery integer No Maximum directory recursion depth. Default: 50 max_filesizequery integer No Skip files larger than this (bytes). Default: 10485760 timeoutquery integer No Search timeout in seconds. Default: 30 no_ignorequery boolean No Bypass .gitignore filtering. Default: false
curl -X GET " https://api.hoody.com/api/v1/files/grep/src?pattern=TODO&ignore_case=true&context=2 "
await client . files . grep ({
"line" : " // TODO: implement retry logic " ,
" let client = build_client(); "
" let backoff = Duration::from_millis(100); "
"total_files_matched" : 1 ,
"total_files_searched" : 24 ,
"error" : " Invalid search pattern "
"error" : " Grep search is not allowed "
"error" : " Path not found: src "
"error" : " Too many concurrent searches, try again later "
Resolve a file or directory path to its canonical absolute form by following all symbolic links and resolving all ./.. segments. The returned real_path is relative to the serve root.
Name In Type Required Description pathpath string Yes File or directory path to resolve
curl -X GET " https://api.hoody.com/api/v1/files/realpath/src/./utils/../lib.rs "
await client . files . realpath ({
path: " src/./utils/../lib.rs "
"path" : " src/./utils/../lib.rs " ,
"real_path" : " src/lib.rs "
"error" : " Invalid path or symlink loop "
Error Code Title Description Resolution INVALID_PATHInvalid path Path contains invalid characters or traversal attempts Provide a valid path without invalid characters ELOOPSymlink loop Too many levels of symbolic links (circular chain) Break the symlink cycle or reduce indirection OPERATION_CONFLICTOperation conflict Cannot combine realpath with other query operations Use the realpath endpoint on its own
"error" : " Resolved path escapes serve root "
Error Code Title Description Resolution PERMISSION_DENIEDPermission denied Insufficient permissions to access the path Authenticate with appropriate credentials PATH_ESCAPEPath escapes root Resolved canonical path is outside the serve root Use a path within the serve root SEARCH_FORBIDDENSearch operation not allowed Server is not configured to allow file searching Contact administrator to enable —allow-search flag
"error" : " Path not found "
Error Code Title Description Resolution PATH_NOT_FOUNDPath not found The path does not exist or contains a broken symlink Verify the path exists and all symlinks in the chain are valid
Get detailed metadata (stat) for a single file or directory without downloading content. Returns name, type, size, modification time, permissions, ownership, and symlink information.
Name In Type Required Description pathpath string Yes File or directory path
curl -X GET " https://api.hoody.com/api/v1/files/stat/src/main.rs "
await client . files . stat ({
"error" : " File not found "
Error Code Title Description Resolution FILE_NOT_FOUNDFile not found The specified path does not exist Verify the path is correct
Perform various file operations: create directory (?mkdir=), extract archive (?extract=), download from URL (?download_from=), move (?move_to=), or copy (?copy_to=).
Name In Type Required Description pathpath string Yes Target path for the operation backendquery string No Backend ID for remote operations mkdirquery string No Create directory extractquery string No Extract archive. Empty value extracts all; non-empty value is a selective path to extract (e.g. src/main.rs or lib/) destquery string No Destination directory name for extraction (default: archive name without extension) download_fromquery string No Download file from remote URL move_toquery string No Move file/directory to destination path copy_toquery string No Copy file/directory to destination path overwritequery string No Allow overwriting existing destination (for copy). Allowed values: true, false ownerquery string No Create-time owner for newly-created inodes as user[:group] or uid[:gid]. Requires --allow-chown and must resolve to an entry in --allowed-create-owners; refuses root (uid/gid 0). Absent → the server default create owner. Applies to mkdir/extract/download_from/copy_to.
curl -X POST " https://api.hoody.com/api/v1/files/projects/new-app?mkdir= "
curl -X POST " https://api.hoody.com/api/v1/files/installer.bin?download_from=https://example.com/installer.bin "
curl -X POST " https://api.hoody.com/api/v1/files/draft/notes.md?move_to=published/notes.md "
await client . files . operate ({
path: " projects/new-app " ,
await client . files . operate ({
download_from: " https://example.com/installer.bin "
await client . files . operate ({
move_to: " published/notes.md "
"source" : " draft/notes.md " ,
"destination" : " published/notes.md " ,
"message" : " Directory created "
"error" : " Source file or directory not found "
"error" : " Destination already exists "
"error" : " Server error: could not set ownership of newly-created inode "
Copy a file or directory to a new location. Supports recursive directory copy. Auto-creates parent directories at destination. Use ?overwrite=true to replace an existing destination.
Name In Type Required Description pathpath string Yes Source file or directory path copy_toquery string Yes Destination path to copy the file/directory to overwritequery string No Allow overwriting existing destination (default: false). Allowed values: true, false ownerquery string No Create-time owner (user[:group]/uid[:gid]) for newly-created copies. Requires --allow-chown + allowlist; refuses root. Overwritten existing files preserve their owner. Absent → server default.
curl -X POST " https://api.hoody.com/api/v1/files/copy/src/lib.rs?copy_to=backup/lib.rs "
await client . files . copy ({
"destination" : " backup/lib.rs " ,
"error" : " Copy operations are not allowed "
Error Code Title Description Resolution COPY_FORBIDDENCopy not allowed Server requires --allow-upload flag for copy operations Contact administrator to enable --allow-upload flag
"error" : " Source file or directory not found "
Error Code Title Description Resolution SOURCE_NOT_FOUNDSource not found The source path does not exist Verify the source path is correct
"error" : " Destination already exists "
Error Code Title Description Resolution DESTINATION_EXISTSDestination conflict A file or directory already exists at the destination path Use ?overwrite=true to replace or choose a different destination
Move or rename a file or directory to a new location. Works across directories. Auto-creates parent directories at destination. Requires both upload and delete permissions.
Name In Type Required Description pathpath string Yes Source file or directory path move_toquery string Yes Destination path to move the file/directory to ownerquery string No Create-time owner (user[:group]/uid[:gid]) for newly-created destination PARENT directories. Requires --allow-chown + --allowed-create-owners; refuses root. The moved inode itself preserves its existing owner. Absent → server default.
curl -X POST " https://api.hoody.com/api/v1/files/move/draft/notes.md?move_to=published/notes.md "
await client . files . move ({
move_to: " published/notes.md "
"source" : " draft/notes.md " ,
"destination" : " published/notes.md " ,
"error" : " Move operations are not allowed "
Error Code Title Description Resolution MOVE_FORBIDDENMove not allowed Server requires both --allow-upload and --allow-delete flags for move operations Contact administrator to enable both flags
"error" : " Source file or directory not found "
Error Code Title Description Resolution SOURCE_NOT_FOUNDSource not found The source path does not exist Verify the source path is correct
"error" : " Destination already exists "
Error Code Title Description Resolution DESTINATION_EXISTSDestination conflict A file or directory already exists at the destination path Delete the existing file first or choose a different destination
Upload a file to the server. Creates new files or overwrites existing ones.
Name In Type Required Description pathpath string Yes Destination file path
Binary body sent as application/octet-stream containing the file contents.
curl -X PUT " https://api.hoody.com/uploads/photo.jpg " \
--data-binary @./photo.jpg \
-H " Content-Type: application/octet-stream "
await client . files . upload ({
path: " uploads/photo.jpg "
}, fs . readFileSync ( " ./photo.jpg " ));
File uploaded successfully (no response body).
"error" : " Uploads are not allowed on this server "
Error Code Title Description Resolution UPLOAD_FORBIDDENUpload operation not allowed Server is not configured to allow file uploads Contact administrator to enable --allow-upload flag
Create an empty file if it does not exist, or update the modification time if it does. Cannot be used on directories.
Name In Type Required Description pathpath string Yes File path to touch touchquery string Yes Flag to indicate touch operation
curl -X PUT " https://api.hoody.com/logs/today.log?touch= "
await client . files . touch ({
File created (did not exist) — no response body.
Modification time updated (file already existed) — no response body.
"error" : " Cannot touch a directory "
"error" : " Touch operations are not allowed "
Error Code Title Description Resolution TOUCH_FORBIDDENTouch operation not allowed Server is not configured to allow touch operations Contact administrator to enable --allow-touch flag UPLOAD_FORBIDDENUpload operation not allowed Server is not configured to allow file uploads Contact administrator to enable —allow-upload flag
Upload a file to the server or to a remote backend. Use ?append to append to an existing file instead of overwriting.
Name In Type Required Description pathpath string Yes Destination file path backendquery string No Backend ID for remote upload appendquery string No Append body to end of existing file (create if missing) instead of overwriting ownerquery string No Create-time owner (user[:group]/uid[:gid]) for a newly-created file. Requires --allow-chown + --allowed-create-owners; refuses root. Overwrites/appends to an existing file preserve its owner. Absent → server default.
Binary body sent as application/octet-stream containing the file contents.
curl -X PUT " https://api.hoody.com/api/v1/files/uploads/photo.jpg " \
--data-binary @./photo.jpg \
-H " Content-Type: application/octet-stream "
curl -X PUT " https://api.hoody.com/api/v1/files/logs/today.log?append= " \
--data-binary @./newline.log \
-H " Content-Type: application/octet-stream "
path: " uploads/photo.jpg "
}, fs . readFileSync ( " ./photo.jpg " ));
}, fs . readFileSync ( " ./newline.log " ));
"path" : " logs/today.log " ,
"message" : " File uploaded successfully " ,
"path" : " uploads/photo.jpg " ,
"error" : " Uploads are not allowed on this server "
Error Code Title Description Resolution UPLOAD_FORBIDDENUpload operation not allowed Server is not configured to allow file uploads Contact administrator to enable --allow-upload flag INSUFFICIENT_PERMISSIONSInsufficient permissions User account does not have upload permissions for this path Contact administrator for write permissions or authenticate with different account
Append binary data to the end of an existing file. Creates the file if it does not exist. Auto-creates parent directories.
Name In Type Required Description pathpath string Yes File path ownerquery string No Create-time owner (user[:group]/uid[:gid]) when this append creates a new file. Requires --allow-chown + allowlist; refuses root. Absent → server default.
Binary body sent as application/octet-stream containing the data to append.
curl -X PUT " https://api.hoody.com/api/v1/files/append/logs/today.log " \
--data-binary @./newline.log \
-H " Content-Type: application/octet-stream "
await client . files . append ({
}, fs . readFileSync ( " ./newline.log " ));
"path" : " logs/today.log " ,
"error" : " Uploads are not allowed on this server "
Error Code Title Description Resolution UPLOAD_FORBIDDENUpload not allowed Server is not configured to allow file uploads Contact administrator to enable --allow-upload flag
File operations: resumable upload, append to files (via X-Update-Range: append header), change file permissions (Unix only), change file ownership (Unix only), or rename file/directory.
Name In Type Required Description pathpath string Yes File or directory path X-Update-Rangeheader string No Set to append to append data to the end of the file. Example: curl -X PATCH -H 'X-Update-Range: append' --data-binary @data.txt http://server/file.log
For permission/ownership changes or rename, send JSON: {"mode": "755"}, {"owner": "user", "group": "users"}, or {"name": "new-filename.txt"}. For append, send binary data with the X-Update-Range: append header.
curl -X PATCH " https://api.hoody.com/scripts/run.sh " \
-H " Content-Type: application/json " \
curl -X PATCH " https://api.hoody.com/data/records.csv " \
-H " Content-Type: application/json " \
-d ' {"owner":"alice","group":"analysts"} '
curl -X PATCH " https://api.hoody.com/draft/notes.md " \
-H " Content-Type: application/json " \
-d ' {"name":"final-notes.md"} '
curl -X PATCH " https://api.hoody.com/logs/app.log " \
-H " X-Update-Range: append " \
--data-binary @./more.log
await client . files . patch ({
await client . files . patch ({
}, { name: " final-notes.md " });
Operation successful — no response body.
"error" : " Invalid operation or parameters "
Error Code Title Description Resolution INVALID_OPERATIONInvalid operation The requested operation is not valid or parameters are malformed Check request format and ensure valid operation parameters INVALID_PERMISSIONS_FORMATInvalid permissions format Chmod mode must be valid octal format (e.g., 755, 644) Use valid octal permission format
"error" : " Operation is not allowed "
Error Code Title Description Resolution OPERATION_FORBIDDENOperation not allowed Server is not configured to allow this operation (chmod/chown/rename/upload) Contact administrator to enable appropriate flags INSUFFICIENT_PERMISSIONSInsufficient permissions User account does not have permissions for this operation Contact administrator for required permissions
"error" : " File or directory already exists "
Error Code Title Description Resolution FILE_EXISTSFile already exists Cannot rename - a file or directory with the target name already exists Choose a different name or delete the existing file first NAME_CONFLICTName conflict The target filename conflicts with an existing entry Use a unique filename or remove conflicting file
REST API v1 modification endpoint. Supports ?chmod=755, ?chown=user:group, rename via JSON body, and cross-directory move via JSON body.
Name In Type Required Description pathpath string Yes File path backendquery string No Backend ID for remote file operations ownerquery string No Create-time owner (user[:group]/uid[:gid]) for newly-created destination parent directories on a JSON-body move_to. Requires --allow-chown + --allowed-create-owners; cannot be root. The moved item keeps its own owner. Absent → server default. chmodquery string No Set file permissions using octal mode value (e.g., ?chmod=755) chownquery string No Set file ownership (e.g., ?chown=user:group or ?chown=user)
JSON body matching one of: MoveRequest ({ "move_to": "/new/dir/file.txt" }) or RenameRequest ({ "name": "new-filename.txt" }).
curl -X PATCH " https://api.hoody.com/api/v1/files/scripts/run.sh?chmod=755 "
curl -X PATCH " https://api.hoody.com/api/v1/files/scripts/run.sh?chown=alice:developers "
curl -X PATCH " https://api.hoody.com/api/v1/files/draft/notes.md " \
-H " Content-Type: application/json " \
-d ' {"move_to": "/published/notes.md"} '
await client . files . patchApi ({
await client . files . patchApi ({
}, { move_to: " /published/notes.md " });
"path" : " scripts/run.sh " ,
"error" : " Invalid chmod mode "
Error Code Title Description Resolution INVALID_MODEInvalid chmod mode The chmod mode value is not valid octal notation Use octal notation like 755 or 644 (max 7777) INVALID_OWNERInvalid owner or group The specified user or group could not be resolved Verify the username/group exists on the system INVALID_OPERATIONInvalid operation The requested operation is not valid or parameters are malformed Check request format and ensure valid operation parameters INVALID_PERMISSIONS_FORMATInvalid permissions format Chmod mode must be valid octal format (e.g., 755, 644) Use valid octal permission format
"error" : " Operation is not allowed "
Error Code Title Description Resolution CHMOD_FORBIDDENChmod not allowed Server is not configured to allow chmod operations Contact administrator to enable --allow-chmod flag CHOWN_FORBIDDENChown not allowed Server is not configured to allow chown operations Contact administrator to enable --allow-chown flag OPERATION_FORBIDDENOperation not allowed Server is not configured to allow this operation (chmod/chown/rename/upload) Contact administrator to enable appropriate flags
"error" : " File or directory not found "
"error" : " Destination already exists "
Change file or directory permissions using octal mode (Unix only). Pass the mode value in the chmod query parameter, e.g., ?chmod=755.
Name In Type Required Description pathpath string Yes File or directory path chmodquery string Yes Octal permission mode (e.g., 755, 644, 0755)
curl -X PATCH " https://api.hoody.com/api/v1/files/chmod/scripts/run.sh?chmod=755 "
await client . files . chmod ({
"path" : " scripts/run.sh " ,
"error" : " Invalid chmod mode "
Error Code Title Description Resolution INVALID_MODEInvalid chmod mode The mode value is not valid octal notation Use octal notation like 755 or 644 (max 7777) UNIX_ONLYUnix only chmod is only supported on Unix systems Use a Unix-based server INVALID_OPERATIONInvalid operation The requested operation is not valid or parameters are malformed Check request format and ensure valid operation parameters INVALID_PERMISSIONS_FORMATInvalid permissions format Chmod mode must be valid octal format (e.g., 755, 644) Use valid octal permission format
"error" : " chmod is not allowed on this server "
Error Code Title Description Resolution CHMOD_FORBIDDENChmod not allowed Server is not configured to allow chmod operations Contact administrator to enable --allow-chmod flag OPERATION_FORBIDDENOperation not allowed Server is not configured to allow this operation (chmod/chown/rename/upload) Contact administrator to enable appropriate flags
"error" : " File or directory not found "
Change file or directory ownership (Unix only). Pass owner:group in the chown query parameter, e.g., ?chown=user:group. Group is optional.
Name In Type Required Description pathpath string Yes File or directory path chownquery string Yes Owner and optional group (e.g., user:group, user, :group, or UID:GID)
curl -X PATCH " https://api.hoody.com/api/v1/files/chown/data/records.csv?chown=alice:analysts "
await client . files . chown ({
path: " data/records.csv " ,
"path" : " data/records.csv " ,
"error" : " Invalid owner or group "
Error Code Title Description Resolution INVALID_OWNERInvalid owner The specified user could not be resolved Verify the username or UID exists on the system INVALID_GROUPInvalid group The specified group could not be resolved Verify the group name or GID exists on the system UNIX_ONLYUnix only chown is only supported on Unix systems Use a Unix-based server INVALID_OPERATIONInvalid operation The requested operation is not valid or parameters are malformed Check request format and ensure valid operation parameters INVALID_PERMISSIONS_FORMATInvalid permissions format Chmod mode must be valid octal format (e.g., 755, 644) Use valid octal permission format
"error" : " chown is not allowed on this server "
Error Code Title Description Resolution CHOWN_FORBIDDENChown not allowed Server is not configured to allow chown operations Contact administrator to enable --allow-chown flag OPERATION_FORBIDDENOperation not allowed Server is not configured to allow this operation (chmod/chown/rename/upload) Contact administrator to enable appropriate flags
"error" : " File or directory not found "
Permanently delete a file or directory.
Name In Type Required Description pathpath string Yes Path to file or directory to delete
curl -X DELETE " https://api.hoody.com/temp/junk.txt "
await client . files . deleteRecursive ({
"message" : " Deleted successfully "
"error" : " Delete is not allowed on this server "
Error Code Title Description Resolution DELETE_FORBIDDENDelete operation not allowed Server is not configured to allow file deletion Contact administrator to enable --allow-delete flag
"error" : " File or directory not found "
Delete a file or directory from the server or a remote backend.
Name In Type Required Description pathpath string Yes Path to file or directory to delete backendquery string No Backend ID for remote file deletion
curl -X DELETE " https://api.hoody.com/api/v1/files/temp/junk.txt "
await client . files . delete ({
"message" : " Deleted successfully "
"error" : " Delete is not allowed on this server "
Error Code Title Description Resolution DELETE_FORBIDDENDelete operation not allowed Server is not configured to allow file deletion Contact administrator to enable --allow-delete flag INSUFFICIENT_PERMISSIONSInsufficient permissions User account does not have delete permissions for this path Contact administrator for write permissions
"error" : " File or directory not found "
Error Code Title Description Resolution FILE_NOT_FOUNDFile or directory not found The specified path does not exist in storage or backend Verify the path is correct and the file exists