Skip to content

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.

NameInTypeRequiredDescription
directorypathstringYesDirectory path to search
qquerystringYesSearch query (case-insensitive filename match)
jsonquerystringNoReturn JSON format instead of HTML
Terminal window
curl -X GET "https://api.hoody.com/documents/?q=report&json="

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.

NameInTypeRequiredDescription
imagepathstringYesPath to image file
thumbnailquerystringYesEnable image processing
formatquerystringNoOutput format. Allowed values: jpeg, png, webp, gif, bmp. Default: "jpeg"
sizequerystringNoWidth×Height in pixels (max: 2000×2000)
widthqueryintegerNoWidth in pixels (height auto-calculated)
heightqueryintegerNoHeight in pixels (width auto-calculated)
resizequerystringNoResize mode: fit (preserve aspect, fit within), fill (exact size, crop), cover (cover area), exact (force dimensions). Default: "fit"
qualityquerystringNoResize algorithm quality: low (box filter), medium (bilinear), high (Lanczos3). Default: "medium"
qqueryintegerYesJPEG/WebP quality (1-100, higher is better quality). Default: 85
blurquerynumberNoGaussian blur radius (0-50)
grayscalequerystringNoConvert to grayscale/black-and-white
bgquerystringNoBackground color for transparency (hex RGB, e.g., ffffff for white)
Terminal window
curl -X GET "https://api.hoody.com/images/hero.jpg?thumbnail=&format=webp&width=800&quality=high"

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.

NameInTypeRequiredDescription
pathpathstringYesDirectory path to search within
patternquerystringYesGlob pattern (e.g. **/*.rs, src/**/*.{ts,tsx}, *.md)
max_resultsqueryintegerNoMaximum entries to return. Default: 1000
max_depthqueryintegerNoMaximum directory recursion depth. Default: 50
max_files_scannedqueryintegerNoMaximum filesystem entries to scan. Default: 100000
timeoutqueryintegerNoSearch timeout in seconds. Default: 30
no_ignorequerybooleanNoBypass .gitignore filtering. Default: false
sortquerystringNoSort results by: mtime (modification time), name, or size. Default: "mtime"
orderquerystringNoSort order. Default: desc for mtime, asc for name/size. Allowed values: asc, desc
Terminal window
curl -X GET "https://api.hoody.com/api/v1/files/glob/src?pattern=**/*.rs&max_results=50&sort=mtime"

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.

NameInTypeRequiredDescription
pathpathstringYesFile or directory path to search
patternquerystringYesSearch pattern (regex by default, literal if fixed_string=true)
ignore_casequerybooleanNoCase-insensitive matching. Default: false
fixed_stringquerybooleanNoTreat pattern as literal string, not regex. Default: false
globquerystringNoFilter files by glob pattern (e.g. *.rs, *.{ts,tsx})
contextqueryintegerNoNumber of context lines before and after each match. Default: 0
max_countqueryintegerNoMaximum matches per file. Default: 50
max_matchesqueryintegerNoTotal maximum matches across all files. Default: 500
max_depthqueryintegerNoMaximum directory recursion depth. Default: 50
max_filesizequeryintegerNoSkip files larger than this (bytes). Default: 10485760
timeoutqueryintegerNoSearch timeout in seconds. Default: 30
no_ignorequerybooleanNoBypass .gitignore filtering. Default: false
Terminal window
curl -X GET "https://api.hoody.com/api/v1/files/grep/src?pattern=TODO&ignore_case=true&context=2"

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.

NameInTypeRequiredDescription
pathpathstringYesFile or directory path to resolve
Terminal window
curl -X GET "https://api.hoody.com/api/v1/files/realpath/src/./utils/../lib.rs"

Get detailed metadata (stat) for a single file or directory without downloading content. Returns name, type, size, modification time, permissions, ownership, and symlink information.

NameInTypeRequiredDescription
pathpathstringYesFile or directory path
Terminal window
curl -X GET "https://api.hoody.com/api/v1/files/stat/src/main.rs"

File Operations (mkdir, extract, download, move, copy)

Section titled “File Operations (mkdir, extract, download, move, copy)”

Perform various file operations: create directory (?mkdir=), extract archive (?extract=), download from URL (?download_from=), move (?move_to=), or copy (?copy_to=).

NameInTypeRequiredDescription
pathpathstringYesTarget path for the operation
backendquerystringNoBackend ID for remote operations
mkdirquerystringNoCreate directory
extractquerystringNoExtract archive. Empty value extracts all; non-empty value is a selective path to extract (e.g. src/main.rs or lib/)
destquerystringNoDestination directory name for extraction (default: archive name without extension)
download_fromquerystringNoDownload file from remote URL
move_toquerystringNoMove file/directory to destination path
copy_toquerystringNoCopy file/directory to destination path
overwritequerystringNoAllow overwriting existing destination (for copy). Allowed values: true, false
ownerquerystringNoCreate-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.
Terminal window
# Make a directory
curl -X POST "https://api.hoody.com/api/v1/files/projects/new-app?mkdir="
# Download from URL
curl -X POST "https://api.hoody.com/api/v1/files/installer.bin?download_from=https://example.com/installer.bin"
# Move
curl -X POST "https://api.hoody.com/api/v1/files/draft/notes.md?move_to=published/notes.md"

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.

NameInTypeRequiredDescription
pathpathstringYesSource file or directory path
copy_toquerystringYesDestination path to copy the file/directory to
overwritequerystringNoAllow overwriting existing destination (default: false). Allowed values: true, false
ownerquerystringNoCreate-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.
Terminal window
curl -X POST "https://api.hoody.com/api/v1/files/copy/src/lib.rs?copy_to=backup/lib.rs"

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.

NameInTypeRequiredDescription
pathpathstringYesSource file or directory path
move_toquerystringYesDestination path to move the file/directory to
ownerquerystringNoCreate-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.
Terminal window
curl -X POST "https://api.hoody.com/api/v1/files/move/draft/notes.md?move_to=published/notes.md"

Upload a file to the server. Creates new files or overwrites existing ones.

NameInTypeRequiredDescription
pathpathstringYesDestination file path

Binary body sent as application/octet-stream containing the file contents.

Terminal window
curl -X PUT "https://api.hoody.com/uploads/photo.jpg" \
--data-binary @./photo.jpg \
-H "Content-Type: application/octet-stream"

Create an empty file if it does not exist, or update the modification time if it does. Cannot be used on directories.

NameInTypeRequiredDescription
pathpathstringYesFile path to touch
touchquerystringYesFlag to indicate touch operation
Terminal window
curl -X PUT "https://api.hoody.com/logs/today.log?touch="

Upload a file to the server or to a remote backend. Use ?append to append to an existing file instead of overwriting.

NameInTypeRequiredDescription
pathpathstringYesDestination file path
backendquerystringNoBackend ID for remote upload
appendquerystringNoAppend body to end of existing file (create if missing) instead of overwriting
ownerquerystringNoCreate-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.

Terminal window
# Upload
curl -X PUT "https://api.hoody.com/api/v1/files/uploads/photo.jpg" \
--data-binary @./photo.jpg \
-H "Content-Type: application/octet-stream"
# Append
curl -X PUT "https://api.hoody.com/api/v1/files/logs/today.log?append=" \
--data-binary @./newline.log \
-H "Content-Type: application/octet-stream"

Append binary data to the end of an existing file. Creates the file if it does not exist. Auto-creates parent directories.

NameInTypeRequiredDescription
pathpathstringYesFile path
ownerquerystringNoCreate-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.

Terminal window
curl -X PUT "https://api.hoody.com/api/v1/files/append/logs/today.log" \
--data-binary @./newline.log \
-H "Content-Type: application/octet-stream"

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.

NameInTypeRequiredDescription
pathpathstringYesFile or directory path
X-Update-RangeheaderstringNoSet 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.

Terminal window
# Chmod
curl -X PATCH "https://api.hoody.com/scripts/run.sh" \
-H "Content-Type: application/json" \
-d '{"mode":"755"}'
# Chown
curl -X PATCH "https://api.hoody.com/data/records.csv" \
-H "Content-Type: application/json" \
-d '{"owner":"alice","group":"analysts"}'
# Rename
curl -X PATCH "https://api.hoody.com/draft/notes.md" \
-H "Content-Type: application/json" \
-d '{"name":"final-notes.md"}'
# Append
curl -X PATCH "https://api.hoody.com/logs/app.log" \
-H "X-Update-Range: append" \
--data-binary @./more.log

REST API v1 modification endpoint. Supports ?chmod=755, ?chown=user:group, rename via JSON body, and cross-directory move via JSON body.

NameInTypeRequiredDescription
pathpathstringYesFile path
backendquerystringNoBackend ID for remote file operations
ownerquerystringNoCreate-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.
chmodquerystringNoSet file permissions using octal mode value (e.g., ?chmod=755)
chownquerystringNoSet 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" }).

Terminal window
# Chmod via query
curl -X PATCH "https://api.hoody.com/api/v1/files/scripts/run.sh?chmod=755"
# Chown via query
curl -X PATCH "https://api.hoody.com/api/v1/files/scripts/run.sh?chown=alice:developers"
# Move via body
curl -X PATCH "https://api.hoody.com/api/v1/files/draft/notes.md" \
-H "Content-Type: application/json" \
-d '{"move_to": "/published/notes.md"}'

Change file or directory permissions using octal mode (Unix only). Pass the mode value in the chmod query parameter, e.g., ?chmod=755.

NameInTypeRequiredDescription
pathpathstringYesFile or directory path
chmodquerystringYesOctal permission mode (e.g., 755, 644, 0755)
Terminal window
curl -X PATCH "https://api.hoody.com/api/v1/files/chmod/scripts/run.sh?chmod=755"

Change file or directory ownership (Unix only). Pass owner:group in the chown query parameter, e.g., ?chown=user:group. Group is optional.

NameInTypeRequiredDescription
pathpathstringYesFile or directory path
chownquerystringYesOwner and optional group (e.g., user:group, user, :group, or UID:GID)
Terminal window
curl -X PATCH "https://api.hoody.com/api/v1/files/chown/data/records.csv?chown=alice:analysts"

Permanently delete a file or directory.

NameInTypeRequiredDescription
pathpathstringYesPath to file or directory to delete
Terminal window
curl -X DELETE "https://api.hoody.com/temp/junk.txt"

Delete a file or directory from the server or a remote backend.

NameInTypeRequiredDescription
pathpathstringYesPath to file or directory to delete
backendquerystringNoBackend ID for remote file deletion
Terminal window
curl -X DELETE "https://api.hoody.com/api/v1/files/temp/junk.txt"