Skip to main content
Use this endpoint to read the contents of any file in your application’s filesystem. The API returns the file data as a Node.js-style Buffer object — an array of byte values — which you can decode on the client side using your preferred method. This is useful for inspecting configuration files, reading logs, or programmatically verifying file contents after an upload.

Endpoint

GET https://api.virtuscloud.app/v2/apps/{app_id}/files/content

Authorization

Include your API key in the request header:
Authorization: <api_key>

Path Parameters

app_id
string
required
The unique identifier of your application. You can find this in the URL of your application’s dashboard.

Query Parameters

path
string
required
The file path relative to the root of your application. Example: src/index.js or .env.

Response

status
string
Indicates the outcome of the request. Returns "success" when the operation completes without errors.
response
object
An object representing the raw file content as a binary buffer.

Examples

curl --request GET \
  --url "https://api.virtuscloud.app/v2/apps/{app_id}/files/content?path=src/index.js" \
  --header "Authorization: <api_key>"

Response Example

{
  "status": "success",
  "response": {
    "type": "Buffer",
    "data": [
      104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100
    ]
  }
}
The data array represents raw bytes. In Node.js, reconstruct the original content with Buffer.from(response.data).toString("utf8"). For binary files such as images, omit the encoding argument to get a Buffer you can write to disk directly.