---
title: "Switches a kind of data off and deletes it"
method: DELETE
path: "/lambdas/{privateKey}/data/{kind}"
tags: ["Data"]
---

# Switches a kind of data off and deletes it

`DELETE /lambdas/{privateKey}/data/{kind}`

## Request

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

**This cannot be undone.** Every table, file or secret of that kind is deleted, the copies of the lambda's features
included. From its next request on, code that uses it fails with an exception that says it is off. `GET …/summary`
says whether the code of the lambda uses each kind (`usesDatabase`, `usesWorkspace`, `missingSecrets`), before
switching one off. Nothing happens if it is off already.

## Path parameters

- `privateKey` string, required
- `kind` string, required

## Response `200`

The kind of data, switched off and empty

- DataStoreResponse: One kind of data of a lambda, and how full it is.
  - `Kind` string: Which kind: `database`, the SQLite database it keeps its records in; `workspace`, the files it reads and writes; or `secrets`, the API keys and passwords it reads and nobody sees
  - `Enabled` boolean: Whether the lambda has it switched on
  - `Default` boolean: Whether a lambda has it until its owner decides otherwise: the workspace does, the others do not
  - `Changed` string, date-time, nullable: When it was last switched on or off; absent while it is as it came
  - `Items` integer: What it holds: tables, for the database; files, for the workspace; values, for the secrets
  - `UsedBytes` integer: The room that takes, as the allowance counts it; zero for the secrets, which are counted in values
  - `QuotaBytes` integer: The room it may take: for the database and the workspace, the data allowance of the tier less what the other takes; zero for the secrets
  - `MaxItems` integer, nullable: How many it may hold, for a kind counted in values rather than bytes - the secrets

## Other responses

- `204`: A response containing no body
- `403`: The lambda is a demo, which anybody may read and nobody may change. Create a lambda of your own from it instead: `POST /lambdas` with the demo's id as `template`.
- `404`: No lambda has this editor key, or there is no such kind of data.

---

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