Patch holdout

PATCH
/api/v2/projects/:projectKey/environments/:environmentKey/holdouts/:holdoutKey

Updates an existing holdout, and returns the updated holdout. Updating holdouts 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 holdouts.

Click to expand instructions for updating holdouts

endHoldout

Ends a holdout.

Parameters

None.

Here’s an example:

1{
2 "comment": "Optional comment describing why the holdout is ending",
3 "instructions": [{
4 "kind": "endHoldout"
5 }]
6}

removeExperiment

Removes an experiment from a holdout.

Parameters
  • value: The key of the experiment to remove

Here’s an example:

1{
2 "comment": "Optional comment describing the change",
3 "instructions": [{
4 "kind": "removeExperiment",
5 "value": "experiment-key"
6 }]
7}

updateDescription

Updates the description of the holdout.

Parameters
  • value: The new description.

Here’s an example:

1{
2 "comment": "Optional comment describing the update",
3 "instructions": [{
4 "kind": "updateDescription",
5 "value": "Updated holdout description"
6 }]
7}

updateName

Updates the name of the holdout.

Parameters
  • value: The new name.

Here’s an example:

1{
2 "comment": "Optional comment describing the update",
3 "instructions": [{
4 "kind": "updateName",
5 "value": "Updated holdout name"
6 }]
7}

Path parameters

projectKeystringRequired

The project key

environmentKeystringRequired

The environment key

holdoutKeystringRequired

The holdout key

Request

This endpoint expects an object.
instructionslist of maps from strings to anyRequired

The instructions to perform when updating. This should be an array with objects that look like <code>{“kind”: “update_action”}</code>. Some instructions also require a <code>value</code> field in the array element.

commentstringOptional

Optional comment describing the update

Response

Holdout response

_idstring
statusenum
Allowed values: createdenabledrunningended
holdoutAmountstring

The percentage of traffic allocated to this holdout.

createdAtlong
updatedAtlong
baseExperimentobject
descriptionstringOptional
experimentslist of objectsOptional

Errors

Built with