---
title: "Reads whether the code is published"
method: GET
path: "/lambdas/{privateKey}/source"
tags: ["Open source"]
---

# Reads whether the code is published

`GET /lambdas/{privateKey}/source`

## Request

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

## Path parameters

- `privateKey` string, required

## Response `200`

What it is published under, if it ever was, and the licenses it can be published under

- OwnSourceResponse: Whether a lambda's source is published, as its owner sees it, and what it can be published under.
  - `Source` SourceSettingsResponse: What a lambda's source is published under.
    - `Published` boolean: Whether anybody may read it right now - it may have been taken down since
    - `License` LicenseResponse: A license a source can be published under.
      - `Id` string: Its SPDX identifier, which is how it is asked for: `MIT`, `Apache-2.0`, `GPL-3.0-or-later` …
      - `Name` string: Its full name
      - `Kind` string: `Permissive`, `Copyleft` or `PublicDomain` - roughly what it asks of whoever reuses the code
      - `Url` string: Where it is described in full
    - `Author` string, nullable: Who holds the copyright, where the owner named somebody
    - `Holder` string: Who the license names: the author, or the authors of the lambda
    - `Stars` integer: How many visitors starred it - kept while it is taken down
    - `PublishedAt` string, date-time: When it was published
    - `Updated` string, date-time: When what it is published under last changed
    - `Path` string: Where it is read on this site: `/source/{publicKey}`
  - `Licenses` LicenseResponse[]: The licenses on offer, the default first
    - `Id` string: Its SPDX identifier, which is how it is asked for: `MIT`, `Apache-2.0`, `GPL-3.0-or-later` …
    - `Name` string: Its full name
    - `Kind` string: `Permissive`, `Copyleft` or `PublicDomain` - roughly what it asks of whoever reuses the code
    - `Url` string: Where it is described in full
  - `Default` string: The license a source is published under unless another is asked for: `MIT`
  - `MaxAuthor` integer: How many characters the name in the license may have

## Other responses

- `204`: A response containing no body
- `404`: No lambda has this editor key. A key that never existed and the key of a deleted lambda are answered alike.

---

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