Private App Rollouts
List app rollouts
Pages the enterprise's rollouts newest first, each as the full rollout object. Filters: policy_id, status (draft, running, paused, completed, cancelled) and package_name. next_cursor is always present and null on the last page. Requires androidnexus.policies:read.
Create an app rollout
Plans a staged rollout of a private APK to a Companion-enabled policy's devices, snapshotting the audience and each stage's device count. With dry_run the would-be rollout is returned with status draft and an empty id, and nothing is stored or changed. With start the rollout is started in the same call, which adds the APK to the policy and pushes the policy to Google; if starting fails the rollout stays a draft and the START_FAILED refusal carries it in details.rollout. With replaces_rollout_id the rollout is a forward fix for the devices the replaced rollout reached; a paused replaced rollout is cancelled in the same transaction that creates the fix (never on a dry run), and a running one is refused until it is paused. Refusals carry a stable error.code: INVALID_REQUEST, VALIDATION_ERROR, INVALID_STAGES, INVALID_GATES, INVALID_TARGET, APP_NOT_FOUND, POLICY_NOT_FOUND, REPLACED_ROLLOUT_NOT_FOUND, POLICY_COMPANION_DISABLED, INVALID_REPLACEMENT, REPLACED_ROLLOUT_RUNNING (details.rollout), NO_TARGET_DEVICES, DEVICE_NOT_IN_POLICY, EMPTY_STAGE (details.stages, details.suggested_stages), WOULD_DOWNGRADE (details.devices), ROLLOUT_ALREADY_OPEN (details.rollout_id), AUDIENCE_CHANGED, START_FAILED. Requires androidnexus.policies:write.
Get an app rollout
Reads one rollout: its stages with per-stage device counts, cumulative device counts, the gate, and next_action, all evaluated at server_time. Poll this to watch a rollout. Requires androidnexus.policies:read.
Delete a draft app rollout
Deletes a draft that has not started and has no device activity, with its stages and device snapshot. The policy and the APK are unchanged. A started rollout is refused with INVALID_TRANSITION; a draft with device activity with ROLLOUT_HAS_DEVICE_ACTIVITY. Requires androidnexus.policies:write.
Start an app rollout
Starts a draft rollout: adds the APK to the policy's private-APK declarations, pushes the policy to Google and stamps the version devices must apply, then activates stage one. Only a draft can start (INVALID_TRANSITION otherwise, with details.rollout). If the policy cannot be prepared the rollout stays a draft (START_FAILED, or POLICY_COMPANION_DISABLED / POLICY_MALFORMED). Requires androidnexus.policies:write.
Advance an app rollout
Completes the active stage of a running rollout and activates the next one, or completes the rollout after its last stage. Only a running rollout advances; a draft starts with /start (INVALID_TRANSITION otherwise). A stage its gate still holds is refused with GATE_NOT_MET, carrying the rollout and its gate in details.rollout. When the stage's failure rate is above its maximum the rollout is paused instead and the answer is 200 with status paused and paused_reason failure_threshold. Requires androidnexus.policies:write.
Pause an app rollout
Pauses a running rollout (paused_reason manual). Stages do not advance while paused; devices already released keep installing. Only a running rollout can be paused (INVALID_TRANSITION otherwise, with details.rollout). Requires androidnexus.policies:write.
Resume an app rollout
Resumes a paused rollout, whatever paused it, and clears paused_reason. Only a paused rollout can be resumed (INVALID_TRANSITION otherwise, with details.rollout). Requires androidnexus.policies:write.
End an app rollout
Ends a draft, running or paused private-APK rollout. No further device receives the version: a device that installed it keeps it, and every other device gets the version the policy otherwise installs. Nothing is uninstalled. Open deployment attempts end as cancelled, and the policy and package become available for a new rollout. A rollout that has already ended is refused with INVALID_TRANSITION and details.rollout. Requires androidnexus.policies:write.
Retry failed devices in an app rollout
Gives each failed device a new install attempt. With device_ids, exactly those devices are retried and each must have failed in a stage the rollout has reached (DEVICE_NOT_RETRYABLE otherwise, with details.devices naming each device and why: not_in_rollout, stage_not_reached or not_failed). Omitted, every failed device in the reached stages is retried, and retried may be empty. Works on a running or paused rollout; retrying does not resume a paused one. Requires androidnexus.policies:write.
List an app rollout's devices
Pages the rollout's devices in stage order. Filters: status (pending, downloading, installing, installed, failed, cancelled) and stage. With include=sources each row adds what the Companion and AMAPI each last reported. next_cursor is always present and null on the last page. Requires androidnexus.policies:read.
Get a device's app rollout timeline
The device's latest deployment attempt, with its status from the one device status derivation, and every lifecycle event the Companion reported for it, oldest first. Requires androidnexus.policies:read.