Promote a release from one deployment to another
const url = 'https://api.aetherpush.com/v1/apps/example/deployments/example/promotions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"destination":"Production","packageInfo":{"description":"Promoted from Staging after QA","rollout":25,"isMandatory":false}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.aetherpush.com/v1/apps/example/deployments/example/promotions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "destination": "Production", "packageInfo": { "description": "Promoted from Staging after QA", "rollout": 25, "isMandatory": false } }'Promotes the current release (or a specific labeled release) of the source deployment to the destination deployment. The destination deployment is identified in the request body, not the URL.
Optionally, packageInfo overrides allow modifying metadata for
the promoted package (description, rollout, isMandatory, etc.)
without re-uploading the bundle.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Name of the source deployment to promote from.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Name of the destination deployment to promote into.
Mutable package metadata. Used as the body shape for release patches and as a sub-object on promote/rollback bodies.
object
Semver version or range that this release targets.
Release notes shown to the client. The limit is counted in UTF-16 code units, so characters outside the Basic Multilingual Plane consume two units each. JSON request bodies are additionally capped at 10 KB in total and refused with 413, so a description whose UTF-8 size approaches that can only be set on the multipart release upload. Promoting carries the source release’s description over without resending it; changing one afterwards means releasing again.
SHA-256 hash of the package contents.
Percentage of clients eligible for this release.
Example
{ "destination": "Production", "packageInfo": { "description": "Promoted from Staging after QA", "rollout": 25, "isMandatory": false }}Responses
Section titled “Responses”Promotion successful.
object
object
Signed URL to download the package bundle.
Map of source package hash to diff blob info.
object
object
Signed URL to the package manifest (file hash map).
Set when releaseMethod is Promote.
Set when releaseMethod is Promote or Rollback.
Account email of the releaser.
Package size in bytes.
Unix timestamp in milliseconds.
Example
{ "package": { "appVersion": "1.0.0", "label": "v3", "releaseMethod": "Upload" }}Headers
Section titled “Headers”Missing destination, or invalid packageInfo.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}Unauthenticated, or not a collaborator.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}App, source deployment, destination deployment, or labeled release not found.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}Source has no enabled releases, destination is in an unfinished rollout, or promoted package is identical to the destination’s current release.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}