Skip to main content

rolling_releases

Creates, updates, deletes, gets or lists a rolling_releases resource.

Overview

Namerolling_releases
TypeResource
Idvercel.rolling_release.rolling_releases

Fields

The following fields are returned by SELECT queries:

Rolling release information including configuration and document details, or null if no rolling release exists

NameDatatypeDescription
queued_deployment_idstringThe ID of a deployment queued for the next rolling release (example: dpl_ghi789) (wire: queuedDeploymentId)
active_stageobjectThe currently active stage, null if the rollout is aborted (wire: activeStage)
advancement_typestringThe advancement type of the rolling release (automatic, manual-approval) (example: manual-approval) (wire: advancementType)
canary_deploymentobjectThe canary deployment being rolled out (wire: canaryDeployment)
current_canary_percentagenumberWhen set (for example while {@link substate} is PAUSED), the canary traffic percentage persisted on the rollout document — use for dashboard display when linear shift is active. (wire: currentCanaryPercentage)
current_deploymentobjectThe current deployment receiving production traffic (wire: currentDeployment)
next_stageobjectThe next stage to be activated, null if not in ACTIVE state (wire: nextStage)
stagesarrayAll stages configured for this rolling release
started_atnumberUnix timestamp in milliseconds when the rolling release started (wire: startedAt)
statestringThe current state of the rolling release (ABORTED, ACTIVE, COMPLETE) (example: ACTIVE)
substatestringWhen set to PAUSED, the rollout is frozen at the current percentage until continued. (PAUSED, )
updated_atnumberUnix timestamp in milliseconds when the rolling release was last updated (wire: updatedAt)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid_or_namestate, team_id, slugReturn the Rolling Release for a project, regardless of whether the rollout is active, aborted, or completed. If the feature is enabled but no deployment has occurred yet, null will be returned.
approve_stageexecid_or_name, nextStageIndex, canaryDeploymentIdteamId, slugAdvance a rollout to the next stage. This is only needed when rolling releases is configured to require manual approval.
startexecid_or_name, canaryDeploymentIdteamId, slugStart a rolling release for a deployment. If a rolling release is already active for the same canary deployment, returns the current state without side effects.
completeexecid_or_name, canaryDeploymentIdteamId, slugForce-complete a Rolling Release. The canary deployment will begin serving 100% of the traffic.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
id_or_namestringProject ID or project name (URL-encoded)
slugstringThe Team slug to perform the request on behalf of.
statestringFilter by rolling release state
teamIdstringThe Team identifier to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)

SELECT examples

Return the Rolling Release for a project, regardless of whether the rollout is active, aborted, or completed. If the feature is enabled but no deployment has occurred yet, null will be returned.

SELECT
queued_deployment_id,
active_stage,
advancement_type,
canary_deployment,
current_canary_percentage,
current_deployment,
next_stage,
stages,
started_at,
state,
substate,
updated_at
FROM vercel.rolling_release.rolling_releases
WHERE id_or_name = '{{ id_or_name }}' -- required
AND state = '{{ state }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;

Lifecycle Methods

EXEC variables use wire (API) names.

Advance a rollout to the next stage. This is only needed when rolling releases is configured to require manual approval.

EXEC vercel.rolling_release.rolling_releases.approve_stage
@id_or_name='{{ id_or_name }}' --required,
@teamId='{{ teamId }}',
@slug='{{ slug }}'
@@json=
'{
"nextStageIndex": {{ nextStageIndex }},
"canaryDeploymentId": "{{ canaryDeploymentId }}"
}'
;