---
title: "Reads a file, base64 encoded"
method: GET
path: "/lambdas/{privateKey}/files/{path}"
tags: ["Workspace"]
---

# Reads a file, base64 encoded

`GET /lambdas/{privateKey}/files/{path}`

## Request

- Base URL: `https://genhttp.dev/api/v1`
- URL: `https://genhttp.dev/api/v1/lambdas/{privateKey}/files/{path}`
- Auth: none declared

The content travels base64 encoded in JSON, so an image or an archive reads the same way as text. Up to 32 MB; a
larger file is refused here and read as it is from `…/{path}/content`.

## Path parameters

- `privateKey` string, required
- `path` string, required

## Response `200`

The file, base64 encoded

- FileResponse: A file of a workspace, base64 encoded so anything can travel in JSON.
  - `Path` string: Its path within the workspace, with forward slashes
  - `Content` string: Its bytes, base64 encoded
  - `Size` integer: How many bytes it holds

## Other responses

- `204`: A response containing no body
- `400`: The file is larger than 32 MB, or the path is empty or leads outside of the workspace.
- `404`: No lambda has this editor key, or there is no such file.

---

[API](https://skmtc.dev/genhttp/apis/genhttp-lambda-api.md) · [All operations](https://skmtc.dev/genhttp/apis/genhttp-lambda-api/llms.txt) · [OpenAPI document](https://skmtc.dev/genhttp/apis/genhttp-lambda-api/revisions/8b36699e03df?raw)
