Stop an environment release
Stops a release and resolves its phases according to the resolution
you specify. To learn how each resolution treats completed and pending
phases, read the resolution schema.
Requires the updateRules action on the flag in this environment, or
updateFallthrough for a historical release that ran on the default
rule. The stop is recorded in the flag’s audit log as a targeting
change that names the resolution and carries comment.
In an environment that requires approvals, this endpoint fails with
405. Tokens granted the bypassRequiredApproval action can still
call it to stop the release directly.
Stopping a release that has already completed or been stopped returns
200 and makes no changes. Returns 404 for a release that ended more
than 90 days ago.
Authorizations
Headers
Version of the endpoint.
beta Path Parameters
Body
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.
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 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.
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.
pending, in_progress, waiting, completed, reverted ID of the variation the release started from.
The value of the variation. This may be a string, boolean, number, JSON object, or array.
ID of the variation being released.
The value of the variation. This may be a string, boolean, number, JSON object, or array.
Key of the context kind the release randomizes on.
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.
remove_rules_and_update_default_rule, leave_rules_in_place Whether the release uses metric monitoring.
progressive, guarded 1Zero-based index of the active phase. Null before the first phase, between phases, and after the release reaches a terminal status.
x >= 0Whether 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.
manual, automatic Creation time in Unix milliseconds.
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.
waiting_regression_detected, waiting_phase_ended, completed_automatic, completed_manual, reverted_regression_detected, reverted_manual, reverted_discarded, reverted_insufficient_data Start of the first phase in Unix milliseconds. Absent until a phase has started.
End of the last started phase in Unix milliseconds. Present only after the release reaches a terminal status of completed or reverted.