---
title: "Lists the tables of a feature's database"
method: GET
path: "/lambdas/{privateKey}/features/{feature}/database"
tags: ["Database"]
---

# Lists the tables of a feature's database

`GET /lambdas/{privateKey}/features/{feature}/database`

## Request

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

The copy its preview reads and writes, taken when the feature was started or its data last refreshed. Its migrations may have changed its schema.

## Path parameters

- `privateKey` string, required
- `feature` string, required

## Response `200`

The feature's copy of the database and its tables

- DatabaseResponse: The database of a lambda, or a feature's copy of it.
  - `Enabled` boolean: Whether the lambda has its database switched on (`PUT …/data/database`)
  - `UsedBytes` integer: The room it takes on disk
  - `QuotaBytes` integer: How large it may grow: the data allowance of the tier less what the workspace takes
  - `Tables` DatabaseTableResponse[]: Every table and view, tables first
    - `Name` string: Its name
    - `Kind` string: `table` or `view`
    - `Rows` integer, nullable: How many rows it holds; absent where counting took too long
    - `Columns` DatabaseColumnResponse[]: Its columns, in the order they were declared
      - `Name` string: Its name
      - `Type` string: The type it was declared with, as written: `INTEGER`, `TEXT`, or anything else SQLite accepts
      - `NotNull` boolean: Whether it was declared `NOT NULL`
      - `PrimaryKey` boolean: Whether it is the primary key, or part of it
      - `Default` string, nullable: The expression it defaults to, as written
    - `Migrations` boolean: Whether it is the history Evolve keeps of the migrations it applied, rather than records of the app
  - `Used` boolean: Whether the code connects to it with `Database.GetConnection()` - in the version online and the newest one, or in the feature's files

## Other responses

- `204`: A response containing no body
- `404`: No lambda has this editor key, or the lambda has no feature with this key: it never existed, or it was merged or deleted.

---

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