Skip to main content
PUT

Authorizations

Authorization
string
header
required

Headers

LD-API-Version
enum<string>
required

Version of the endpoint.

Available options:
beta

Path Parameters

projectKey
string
required
flagKey
string
required
environmentKey
string
required
releaseId
string<uuid>
required

Body

application/json
resolution
enum<string>
required

How to resolve each phase of the release when you stop it:

  • roll_forward_all_phases: All phases serve the target variation. Pending phases stay on the flag and are enabled.
  • roll_forward_current_phase_and_remove_pending_phases: Current and completed phases serve the target variation. Pending phases are removed.
  • roll_back_all_phases_and_remove_pending_phases: Current and completed phases serve the original variation. Pending phases are removed.
  • roll_back_current_phase_and_remove_pending_phases: The current phase serves the original variation, and completed phases keep serving the target variation. Pending phases are removed.

For a single-phase release there are no completed or pending phases, so the two roll-forward values are equivalent, as are the two roll-back values.

The current_phase values return 400 if the release is between phases. Use an all_phases value instead. A terminal release returns 200 unchanged for every resolution.

Available options:
roll_forward_all_phases,
roll_forward_current_phase_and_remove_pending_phases,
roll_back_all_phases_and_remove_pending_phases,
roll_back_current_phase_and_remove_pending_phases
comment
string

Optional comment written to the flag's audit-log entry.

Response

Environment release stopped, or already in a terminal status.

A flag release in one environment, made up of one or more ordered phases. The top-level status is derived from the phases: it reflects the active phase, reports waiting between successfully completed phases, and reports the terminal outcome of the release.

id
string<uuid>
required
status
enum<string>
required

High-level status of an environment release or release phase.

  • pending: The release or phase has not started.
  • in_progress: The release or phase is progressing without requiring action.
  • waiting: The release is partially rolled out, but is paused and waiting for action from the user.
  • completed: The release or phase reached the target variation.
  • reverted: The release or phase returned to the original variation.
Available options:
pending,
in_progress,
waiting,
completed,
reverted
projectKey
string
required
environmentKey
string
required
flagKey
string
required
originalVariationId
string<uuid>
required

ID of the variation the release started from.

originalVariationValue
any
required

The value of the variation. This may be a string, boolean, number, JSON object, or array.

targetVariationId
string<uuid>
required

ID of the variation being released.

targetVariationValue
any
required

The value of the variation. This may be a string, boolean, number, JSON object, or array.

randomizationUnit
string
required

Key of the context kind the release randomizes on.

cleanupBehavior
enum<string>
required

What happens to the release rules when the final phase completes, either on its own or because a stop rolls it forward while it's running:

  • remove_rules_and_update_default_rule: The release rules are removed and the default rule serves the target variation.
  • leave_rules_in_place: The release rules stay and serve the target variation.

In every other case, including a revert, it has no effect: release rules left on the flag keep serving the variation the release ended on, ahead of rules added later without beforeRuleId.

Available options:
remove_rules_and_update_default_rule,
leave_rules_in_place
kind
enum<string>
required

Whether the release uses metric monitoring.

Available options:
progressive,
guarded
metrics
object[]
required
phases
object[]
required
Minimum array length: 1
currentPhaseIndex
integer | null
required

Zero-based index of the active phase. Null before the first phase, between phases, and after the release reaches a terminal status.

Required range: x >= 0
advancementMode
enum<string>
required

Whether a multi-phase release advances to the next phase automatically once the current phase's steps complete, or waits for an explicit advance. Has no effect on a single-phase release.

Available options:
manual,
automatic
createdAt
integer<int64>
required

Creation time in Unix milliseconds.

statusReason
enum<string>

Additional detail for a waiting, completed, or reverted status. The field may be absent for a waiting status when there is no specific reason. waiting_phase_ended appears only on the release, never on a phase. It means a phase of a multi-phase release with advancementMode manual ended and the release must be advanced to the next phase. reverted_discarded means the phase ended without a regression or a member rolling it back. A running phase is discarded when the flag changes underneath it, for example when the flag is turned off, archived, or deleted. A pending phase is discarded when the release ends before it starts, either because an earlier phase reverted or because the release was stopped with a resolution that removes pending phases. A release reports reverted_discarded only when the last phase that started was discarded.

Available options:
waiting_regression_detected,
waiting_phase_ended,
completed_automatic,
completed_manual,
reverted_regression_detected,
reverted_manual,
reverted_discarded,
reverted_insufficient_data
startedAt
integer<int64>
read-only

Start of the first phase in Unix milliseconds. Absent until a phase has started.

endedAt
integer<int64>
read-only

End of the last started phase in Unix milliseconds. Present only after the release reaches a terminal status of completed or reverted.