Skip to main content

fileSystem

GET /file-system​

Get file system structure

Parameters​

NameTypeRequiredSourceDescription
clientIdstring✓queryThe ID of the Foundry client to connect to
pathstringqueryThe path to retrieve (relative to source)
sourcestringqueryThe source directory to use (data, systems, modules, etc.)
recursivebooleanqueryWhether to recursively list all subdirectories

Returns​

object - File system structure with files and directories

Example Request​

GET /file-system


POST /upload​

Upload a file to Foundry's file system (handles both base64 and binary data)

Parameters​

NameTypeRequiredSourceDescription
clientIdstring✓queryThe ID of the Foundry client to connect to
pathstring✓query/bodyThe directory path to upload to
filenamestring✓query/bodyThe filename to save as
sourcestringquery/bodyThe source directory to use (data, systems, modules, etc.)
mimeTypestringquery/bodyThe MIME type of the file
overwritebooleanquery/bodyWhether to overwrite an existing file
fileDatastringbodyBase64 encoded file data (if sending as JSON) 250MB limit

Returns​

object - Result of the file upload operation

Example Request​

POST /upload
Content-Type: application/json



GET /download​

Download a file from Foundry's file system

Parameters​

NameTypeRequiredSourceDescription
clientIdstring✓queryThe ID of the Foundry client to connect to
pathstring✓queryThe full path to the file to download
sourcestringqueryThe source directory to use (data, systems, modules, etc.)
formatstringqueryThe format to return the file in (binary, base64)

Returns​

binary|object - File contents in the requested format

Example Request​

GET /download