Data

Switches a kind of data on

Nothing happens if it is on already. The lambda can use it from its next request on, without being deployed again.

The database is made empty, and the lambda is started again on its next request, so what it does as it starts - applying its migrations - runs against it. The secrets start empty: their values are entered with PUT …/secrets/{name}.

put/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

Path parameters

privateKeystring required

The editor key of the lambda. Holding it is what allows the call.

kindstring required

Which kind: database, workspace or secrets

Response

The kind of data, switched on

Kindstring

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

Enabledboolean

Whether the lambda has it switched on

Defaultboolean

Whether a lambda has it until its owner decides otherwise: the workspace does, the others do not

Changedstring date-time nullable

When it was last switched on or off; absent while it is as it came

Itemsinteger

What it holds: tables, for the database; files, for the workspace; values, for the secrets

UsedBytesinteger

The room that takes, as the allowance counts it; zero for the secrets, which are counted in values

QuotaBytesinteger

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

MaxItemsinteger nullable

How many it may hold, for a kind counted in values rather than bytes - the secrets

Changes

No recorded changes to this operation across all 1 revision of this API.