The directory listing endpoints let you browse, create, and manage directories in a container, preview and extract archive files (ZIP, TAR, and compressed TAR variants), and download directories as ZIP archives. Use these endpoints when you need to inspect archive contents without extracting, perform full or selective extractions, or package directories for download.
All requests target the container-scoped files service at https://{projectId}-{containerId}-files-1.{server}.containers.hoody.icu.
Note
The archive endpoints support ZIP, TAR, tar.gz, tar.bz2, and tar.xz formats. Extraction is subject to size, file-count, and compression-ratio limits configured on the server. Pass an empty ?extract to extract everything from an archive, or a relative path (for example src/) to perform a selective extraction.
Creates a new directory at the specified path using the WebDAV MKCOL method.
Name In Type Required Description pathpath string Yes Directory path to create
Directory created successfully. No response body.
" error " : " Server is not configured to allow directory creation "
Error Code Title Description Resolution UPLOAD_FORBIDDENDirectory creation not allowed Server is not configured to allow directory creation Contact administrator to enable —allow-upload flag INSUFFICIENT_PERMISSIONSInsufficient permissions User account does not have write permissions for this path Contact administrator for write permissions
" error " : " Directory 'projects/web-app' already exists "
Error Code Title Description Resolution DIRECTORY_EXISTSDirectory already exists A directory with this name already exists at the specified path Choose a different name or delete the existing directory first
await client . files . directories . create ( ' projects/web-app ' )
curl -X MKCOL https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/projects/web-app
Packages a directory into a ZIP archive and returns the binary content.
Name In Type Required Description directorypath string Yes Directory path to package zipquery string Yes Marker flag; must be present (empty value)
Returns the ZIP archive as application/zip binary content. Save the response body to a .zip file.
" error " : " Archive download is not allowed "
const zipBlob = await client . files . archives . downloadAsZip ( ' projects/web-app ' , { zip : '' })
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/projects/web-app?zip " -o web-app.zip
Lists the entries inside an archive without extracting it. With an empty ?preview value, returns a JSON listing of all entries. With ?preview=<path>, returns the raw content of that specific file. The ?contents parameter is an alias for ?preview.
Name In Type Required Description archivepath string Yes Path to archive file previewquery string No Empty value lists archive contents; non-empty value reads a specific file from the archive (alias: ?contents) contentsquery string No Alias for ?preview
" total_compressed_size " : 8388608 ,
" modified_time " : 1705312800 ,
" entry_type " : " directory "
" modified_time " : 1705312800 ,
" modified_time " : 1705312800 ,
" link_target " : " /var/cache/output "
" error " : " File is not a valid ZIP, TAR, or compressed TAR archive "
Error Code Title Description Resolution INVALID_ARCHIVE_FORMATInvalid archive format File is not a valid ZIP, TAR, or compressed TAR archive Verify file is a valid archive and format is supported (zip, tar, tar.gz, tar.bz2, tar.xz) CORRUPTED_ARCHIVECorrupted archive Archive file is corrupted or incomplete Re-download or re-upload the archive file
" error " : " Archive entry is password-protected "
" error " : " Archive file or entry not found "
" error " : " File exceeds 100MB preview limit "
const contents = await client . files . archives . preview ( ' backup-2024-01-15.zip ' , { preview : '' })
// Read a specific file from the archive
const readme = await client . files . archives . preview ( ' backup-2024-01-15.zip ' , { preview : ' README.md ' })
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/backup-2024-01-15.zip?preview "
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/backup-2024-01-15.zip?preview=README.md "
Reads and returns a single file from inside an archive without extracting the entire archive. Returns the raw file content with an auto-detected MIME type. Use this endpoint to inspect individual files before deciding to extract the whole archive.
Name In Type Required Description archivepath string Yes Path to archive file previewquery string Yes Path of the file inside the archive to view (e.g. src/ or README.md)
Returns the file content as application/octet-stream binary data. The MIME type is auto-detected based on the file extension when possible.
" error " : " The entry path is invalid (empty, absolute, contains traversal, or null bytes) "
Error Code Title Description Resolution INVALID_ARCHIVE_FORMATInvalid archive format File is not a valid ZIP, TAR, or compressed TAR archive Verify file is a valid archive and format is supported (zip, tar, tar.gz, tar.bz2, tar.xz) INVALID_SELECTIVE_PATHInvalid entry path The entry path is invalid (empty, absolute, contains traversal, or null bytes) Use a relative path without .. components (e.g. src/)
" error " : " Archive entry is password-protected "
" error " : " Archive file or entry not found "
" error " : " File exceeds preview size limit "
const fileData = await client . files . archives . viewFile ( ' backup-2024-01-15.zip ' , { preview : ' README.md ' })
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/backup-2024-01-15.zip?view_file&preview=README.md "
Extracts a ZIP, TAR, or compressed TAR archive to a destination directory. Pass an empty ?extract value to extract everything, or pass ?extract=<path> to perform a selective extraction of matching entries.
Name In Type Required Description archivepath string Yes Path to archive file extractquery string Yes Empty for full extraction; path for selective (e.g. src/ or lib/) destquery string No Destination directory name (default: archive name)
" message " : " Archive extracted successfully " ,
" extraction_id " : " 550e8400-e29b-41d4-a716-446655440000 " ,
" destination " : " backup-2024-01-15 " ,
" extracted_bytes " : 15728640 ,
" message " : " Archive contains files attempting to escape extraction directory " ,
" extraction_id " : " 550e8400-e29b-41d4-a716-446655440000 " ,
" destination " : " backup-2024-01-15 " ,
" error " : " Path traversal attempt detected in archive entry " ,
Error Code Title Description Resolution INVALID_ARCHIVE_FORMATInvalid archive format File is not a valid archive or format is unsupported Verify file is a supported archive format (zip, tar, tar.gz, tar.bz2, tar.xz) ARCHIVE_TOO_LARGEArchive exceeds size limit Archive total size exceeds configured maximum extraction size Contact administrator to increase extraction size limit or extract manually TOO_MANY_FILESToo many files in archive Archive contains more files than allowed maximum Contact administrator to increase file count limit or extract in smaller batches ZIP_BOMB_DETECTEDPotential zip bomb detected Archive has suspicious compression ratio indicating potential zip bomb Verify archive source is trusted, contact administrator if legitimate PATH_TRAVERSAL_BLOCKEDPath traversal attempt blocked Archive contains files attempting to escape extraction directory Archive may be malicious, verify source and re-create archive without path traversal
" error " : " Server is not configured to allow archive extraction "
Error Code Title Description Resolution EXTRACTION_FORBIDDENExtraction not allowed Server is not configured to allow archive extraction Contact administrator to enable —allow-extract flag
const result = await client . files . archives . extract ( ' backup-2024-01-15.zip ' , { extract : '' , dest : ' restored-backup ' })
const selective = await client . files . archives . extract ( ' source.tar.gz ' , { extract : ' src/ ' })
# Full extraction to default destination
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/backup-2024-01-15.zip?extract "
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/source.tar.gz?extract&extract=src/ "
Extracts a single file or directory from inside a ZIP, TAR, or compressed TAR archive to a destination directory. Only the specified entry (and its children if a directory) is extracted, leaving other archive contents untouched.
Name In Type Required Description archivepath string Yes Path to archive file extractquery string Yes Path of the file or directory inside the archive to extract (e.g. src/ or lib/) destquery string No Destination directory name (default: archive name)
" message " : " Selected entries extracted successfully " ,
" extraction_id " : " 550e8400-e29b-41d4-a716-446655440000 " ,
" extracted_bytes " : 1048576 ,
" message " : " No entries matched the specified path " ,
" extraction_id " : " 550e8400-e29b-41d4-a716-446655440000 " ,
" error " : " No matching entries in archive " ,
" selective_path " : " missing/ "
Error Code Title Description Resolution INVALID_ARCHIVE_FORMATInvalid archive format File is not a valid archive or format is unsupported Verify file is a supported archive format (zip, tar, tar.gz, tar.bz2, tar.xz) INVALID_SELECTIVE_PATHInvalid entry path The entry path is invalid (empty, absolute, contains traversal, or null bytes) Use a relative path without .. components (e.g. src/ or lib/) NO_MATCHING_ENTRIESNo matching entries No entries in the archive matched the specified path Use previewArchive to list archive contents and verify the entry path PATH_TRAVERSAL_BLOCKEDPath traversal attempt blocked Archive contains files attempting to escape extraction directory Archive may be malicious, verify source and re-create archive without path traversal
" error " : " Server is not configured to allow archive extraction "
Error Code Title Description Resolution EXTRACTION_FORBIDDENExtraction not allowed Server is not configured to allow archive extraction Contact administrator to enable —allow-extract flag
" error " : " Archive file not found "
const result = await client . files . archives . extractFile ( ' source.tar.gz ' , { extract : ' src/ ' , dest : ' source ' })
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/source.tar.gz?extract_file&extract=src/ "
Returns a history of past extractions, including both successful and failed operations.
Name In Type Required Description extraction_historyquery string Yes Marker flag; must be present (empty value)
" id " : " 550e8400-e29b-41d4-a716-446655440000 " ,
" archive_path " : " backup-2024-01-15.zip " ,
" dest_path " : " backup-2024-01-15 " ,
" start_time " : 1705312800 ,
" extracted_bytes " : 15728640 ,
" id " : " 660e8400-e29b-41d4-a716-446655440001 " ,
" archive_path " : " broken-archive.tar.gz " ,
" dest_path " : " broken-archive " ,
" selective_path " : " data/ " ,
" start_time " : 1705226400 ,
" error " : " Path traversal attempt blocked "
const history = await client . files . archives . getHistory ({ extraction_history : '' })
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/?extraction_history "
Returns progress information for currently running archive extractions.
Name In Type Required Description extractionsquery string Yes Marker flag; must be present (empty value)
" id " : " 770e8400-e29b-41d4-a716-446655440002 " ,
" archive_path " : " large-dataset.zip " ,
" dest_path " : " large-dataset " ,
" start_time " : 1705312800 ,
" extracted_bytes " : 7340032 ,
const active = await client . files . archives . listActive ({ extractions : '' })
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/?extractions "
Returns progress information for currently running archive extractions via the versioned API path.
This endpoint takes no parameters.
" id " : " 770e8400-e29b-41d4-a716-446655440002 " ,
" archive_path " : " large-dataset.zip " ,
" dest_path " : " large-dataset " ,
" start_time " : 1705312800 ,
" extracted_bytes " : 7340032 ,
const active = await client . files . archives . listGlobal ()
curl -X GET " https://prj_8f3a2b1c-ctn_4d5e6f7a-files-1.us-east-1.containers.hoody.icu/api/v1/extractions "