Read an application file
Read one file of up to 10 MB from an application with GET /v2/apps/:app_id/files/content. Send encoding=base64, since the Buffer format is deprecated.
GET
Read an application file
The API key for your account. You can find this in your account settings.
files:read scope.
Read File returns a single file inside a running application as JSON. Send ?encoding=base64 to get the file as a base64 string. It is meant for inspecting or downloading individual files (configs, logs, small assets) of up to 10 MB through the API, not for bulk transfers: use Create Snapshot to pull a full copy of the application instead.
To see what is available before reading, call List Files first. To write a file back, use Create/Modify File, which takes the same base64 content with encoding: "base64".
On workspace-shared applications the caller needs the maintain or admin role, and members without the restricted-files permission cannot read the application’s restricted files (every .env file, such as .env.local, in any folder, and the configuration file), the request is rejected with PERMISSION_DENIED before the file is touched.
Parameters
The ID of the application. You can find this in the URL of your application’s dashboard.
The path to the file you want to read, relative to the root of your application. Up to 256 characters.
Send
base64 to receive the file as a base64 string. Any other value answers INVALID_ENCODING. Without it, the response uses the deprecated Buffer format.Response
Decodedata to get the file’s bytes:
Common errors
Related
- CLI:
squarecloud app file read - SDKs:
api.apps.files.read()(JavaScript),client.apps.files.read()(Python),c.Apps.Files.Read()(Go)

