Update layer
Update a layer by adding, changing, or removing traffic reservations for experiments, or by changing layer name or description. Updating a layer uses the semantic patch format.
To make a semantic patch request, you must append domain-model=launchdarkly.semanticpatch to your Content-Type header. To learn more, read Updates using semantic patch.
Instructions
Semantic patch requests support the following kind instructions for updating layers.
Click to expand instructions for updating layers
updateName
Updates the layer name.
Parameters
name: The new layer name.
Here’s an example:
updateDescription
Updates the layer description.
Parameters
description: The new description.
Here’s an example:
updateExperimentReservation
Adds or updates a traffic reservation for an experiment in a layer.
Parameters
experimentKey: The key of the experiment whose reservation you are adding to or updating in the layer.reservationPercent: The amount of traffic in the layer to reserve. Must be an integer. Zero is allowed until iteration start.
Here’s an example:
removeExperiment
Removes a traffic reservation for an experiment from a layer.
Parameters
experimentKey: The key of the experiment whose reservation you want to remove from the layer.
Here’s an example:
Authorizations
Path Parameters
The project key
The layer key
Body
The instructions to perform when updating. This should be an array with objects that look like {"kind": "update_action"}. Some instructions also require a value field in the array element.
"[{\"kind\": \"updateName\", \"name\": \"Updated layer name\"}]"
Optional comment describing the update
"Optional comment"
The environment key used for making environment specific updates. For example, updating the reservation of an experiment
"production"
Response
Layer response
The key of the layer
"checkout-flow"
The name of the layer
"Checkout Flow"
The description of the layer
"The checkout flow for the application"
The date and time when the layer was created
The unit of randomization for the layer
"user"
The layer configurations for each requested environment