---
title: "Changes a feature, or moves its base"
method: PATCH
path: "/lambdas/{privateKey}/features/{feature}"
tags: ["Features"]
---

# Changes a feature, or moves its base

`PATCH /lambdas/{privateKey}/features/{feature}`

## Request

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

Its name, its specification or its change. What the request leaves out stays as it is; a `specification` or `change`
sent empty is cleared. The files are not
touched.

Move the `base` only once the changes of that version are in the feature's files. Merging replaces the lambda's
files with the feature's, and nothing checks that those changes are in.

## Path parameters

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

## Request body

- UpdateFeatureRequest: Changes a feature. What is left out stays as it is.
  - `Name` string, nullable: What it is, in a few words
  - `Specification` string, nullable: What the user wants from it and why; empty clears it
  - `Change` string, nullable: What it changes, in one line - what the version it is merged into will say; empty clears it
  - `Base` integer, nullable: The version it is based on from now on. Move it only once the changes of that version are in the feature's files: only a feature based on the newest version can be merged, and nothing checks that the changes really are in.

## Response `200`

The feature afterwards

- FeatureResponse: A feature: a change being worked on beside the lambda.
  - `Key` string: What every call about it takes, and what its preview is reached by
  - `Name` string: What it is, in a few words
  - `Branch` string: The branch it is in the lambda's git repository - given when it starts, and kept when it is renamed
  - `Specification` string, nullable: What the user wants from it and why
  - `Change` string, nullable: What it changes, in one line
  - `Base` integer: The version it is based on
  - `Newest` integer, nullable: The newest version of the lambda
  - `Mergeable` boolean: Whether it can be merged: it is based on the newest version
  - `Origin` string, nullable: How it was started: `api`, `agent` or `git`
  - `Created` string, date-time: When it was started
  - `Modified` string, date-time: When it was last saved or changed
  - `Online` boolean: Whether its preview is online
  - `Current` boolean: Whether its preview is online and serves what the feature holds now, rather than an earlier save
  - `Previewed` string, date-time, nullable: When its preview was last put online, while it is
  - `PreviewPath` string: Where its preview answers on this site, whether it is online or not: `/features/{key}/`
  - `Revision` integer: How many times its files were saved, counting the ones it began with. Passed back with a save, it keeps that save from replacing one made elsewhere.

## Other responses

- `204`: A response containing no body
- `400`: The name is empty, too long or more than one line.
- `404`: No lambda has this editor key, it has no such feature, or there is no version to move the base to.

---

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