File System
Read box file
Reads the contents of a file inside the box and returns it as a string. Supports absolute or relative paths, with workingDir as the base for relative paths.
get/boxes/{boxId}/fs/read
Path parameters
boxIdstring required
Example:c9bdc193-b54b-4ddb-a035-5ac0c598d32d
Box ID
Query parameters
workingDirstring
Example:/home/user/documents
Working directory. If not provided, the file will be read from the box.config.workingDir directory.
pathstring required
Example:/home/user/documents/config.json
Target path in the box. If the path does not start with '/', the file will be read from the working directory.
Response
Read file
Example response
{
"content": "{\n \"name\": \"My Project\",\n \"version\": \"1.0.0\"\n}"
}