---
title: "Reads a version of a lambda with its files"
method: GET
path: "/admin/lambdas/{publicKey}/versions/{version}"
tags: ["Administration"]
---

# Reads a version of a lambda with its files

`GET /admin/lambdas/{publicKey}/versions/{version}`

## Request

- Base URL: `https://genhttp.dev/api/v1`
- URL: `https://genhttp.dev/api/v1/admin/lambdas/{publicKey}/versions/{version}`
- Auth: none declared. Required headers: `X-Admin-Token`

## Path parameters

- `publicKey` string, required
- `version` integer, required

## Headers

- `X-Admin-Token` string, required

## Response `200`

The version with its files

- VersionContentResponse: A version with its files.
  - `Version` integer: Its number
  - `Created` string, date-time: When it was saved
  - `Specification` string, nullable: What the user wanted and why, where whoever saved it said
  - `Change` string, nullable: What it changed, where whoever saved it said
  - `Origin` string, nullable: How it was saved: `template`, `api`, `agent`, `git`, `admin` or `system`
  - `Files` LambdaFile[]: Its files, `lambda.cs` first - all of them, or those of the folder asked for
    - `Name` string: Its path, with forward slashes: `lambda.cs`, `Store.cs`, `resources/web/index.html`, `docs/product.md`. Case sensitive, and also what the compiler's messages name.
    - `Code` string: Its content: the text itself, or base64 where `encoding` says so
    - `Encoding` string, nullable: `base64` for a file that is not text - a picture, a font; left out for text. C# files are always text.
    - `IsCompiled` boolean
    - `IsCode` boolean
    - `IsResource` boolean
    - `Bytes` string, byte

## Other responses

- `204`: A response containing no body
- `401`: The token is missing.
- `403`: The token is wrong.
- `404`: No lambda has this public key, or it has no such version.

---

[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)
