Create an app rollout
POST/app-rollouts
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.
Request
Responses
- 200
- 201
- 400
- 401
- 403
- 404
- 409
- 500
The dry-run plan; nothing was stored
The created rollout, running when start was set
Malformed request, stages, gates or target
Unauthorized
Forbidden
APK, policy or replaced rollout not found in this enterprise
The policy, audience or an open rollout refuses this plan
START_FAILED: created as a draft but not started