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.
Caller-supplied package metadata for release upload, patch, and
promote bodies. The package hash is not an input here; the server
computes it from the uploaded bytes and returns it on Package.
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.
Release selector on PATCH and promote. On upload the server
ignores a caller-supplied value and mints the next vN label.
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.
True when this release is currently held by the automatic release
halt: the package is disabled and a halt event exists at its
current auto-halt generation. Present on
GET /v1/apps/{appName}/deployments/{deploymentName}/history
(and the paginated form of that route). False after an override
re-enables the release, after a manual disable with no live halt
event, or when the package is enabled. Omitted on Package
responses that do not compute the flag.
Server-minted release id (for example v3). Omitted when the
package has no label. Never null and never an empty string.
Set when releaseMethod is Promote.
Set when releaseMethod is Promote or Rollback.
SHA-256 hash of the package contents. The server computes this from the uploaded bytes; callers do not supply it.
Percentage of devices eligible for this release (1-100).
Full rollout is always 100 in responses; the server stores
completed rollouts as null and normalises them at the REST
boundary.
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.
Standard error envelope. code is the stable machine identifier for
client branching and i18n. The wording of error is a human-readable
fallback and is not part of the contract. Specialized responses keep
narrower code enums where clients already branch on them.
object
Human-readable error message.
Stable machine code. Prefer this over matching on error. The
values this API can answer with are listed in the ApiErrorCode
schema of the raw document at
https://api.aetherpush.com/openapi.yaml. The field stays an
open string here so that a release adding a value does not
invalidate this response.
Unique identifier for the request, also exposed as the X-Request-Id response header.
object
object
Stable machine code for this field error.
Example
{ "error": "The requested resource was not found.", "code": "not_found", "requestId": "req_abc123"}Unauthenticated.
Standard error envelope. code is the stable machine identifier for
client branching and i18n. The wording of error is a human-readable
fallback and is not part of the contract. Specialized responses keep
narrower code enums where clients already branch on them.
object
Human-readable error message.
Stable machine code. Prefer this over matching on error. The
values this API can answer with are listed in the ApiErrorCode
schema of the raw document at
https://api.aetherpush.com/openapi.yaml. The field stays an
open string here so that a release adding a value does not
invalidate this response.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "code": "not_found", "requestId": "req_abc123"}The API key’s scopes do not grant deploy, which answers
required_scopes; or the caller’s role on the app does not grant
releases.promote, which answers a plain error. Access keys and
login sessions hold wildcard scope, so they never receive the
scope refusal, and a Viewer receives the role refusal. Other
refusals raised before the route, such as a request that did not
arrive through the trusted edge, also answer a plain error.
Standard error envelope. code is the stable machine identifier for
client branching and i18n. The wording of error is a human-readable
fallback and is not part of the contract. Specialized responses keep
narrower code enums where clients already branch on them.
object
Human-readable error message.
Stable machine code. Prefer this over matching on error. The
values this API can answer with are listed in the ApiErrorCode
schema of the raw document at
https://api.aetherpush.com/openapi.yaml. The field stays an
open string here so that a release adding a value does not
invalidate this response.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Returned when an API key’s scopes do not grant the scope a management
route requires. required_scopes lists what the route asked for, not
what the key holds. Access keys and login sessions carry wildcard
scope and pass the check without reaching this response, so only
apiKeyAuth callers receive it. A key whose only scope is keys gets
this on every management route, because that scope grants nothing,
which is also why keys never appears in required_scopes.
object
The scopes the route requires. Only these three appear: no
management route requires keys.
Examples
The API key's scopes do not grant deploy
{ "error": "Insufficient permissions", "code": "insufficient_scopes", "required_scopes": [ "deploy" ], "requestId": "req_abc123"}The caller's role does not grant releases.promote
{ "error": "This action requires the releases.promote permission on the app!", "code": "forbidden", "requestId": "req_abc123"}App, source deployment, destination deployment, or labeled release not found.
Standard error envelope. code is the stable machine identifier for
client branching and i18n. The wording of error is a human-readable
fallback and is not part of the contract. Specialized responses keep
narrower code enums where clients already branch on them.
object
Human-readable error message.
Stable machine code. Prefer this over matching on error. The
values this API can answer with are listed in the ApiErrorCode
schema of the raw document at
https://api.aetherpush.com/openapi.yaml. The field stays an
open string here so that a release adding a value does not
invalidate this response.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "code": "not_found", "requestId": "req_abc123"}The destination is in an unfinished rollout
(unfinished_rollout), the promoted package is identical
to the destination’s current release (duplicate_release),
the source release was disabled by the release auto-halt
and the promotion would ship its bundle enabled again
(release_halted), the next minted label already exists
on the destination (release_label_collision), or the stored
version is a range that overlaps a different release already
on the destination (promote_range_overlap). Read code
rather than error to tell them apart. The halted refusal
applies only when the committed
package would be enabled: a promotion with "isDisabled": true
goes through and can be re-enabled in the destination once it
is safe. A source release disabled by hand and never halted
promotes as usual, and so does one re-enabled after a halt and
later disabled again by hand, since re-enabling ends that
halt. A source deployment with no releases at all, or a label
not found in its history, answers 404, not 409, and a conflict
raised outside those causes answers the plain error shape,
which carries a code of its own.
Standard error envelope. code is the stable machine identifier for
client branching and i18n. The wording of error is a human-readable
fallback and is not part of the contract. Specialized responses keep
narrower code enums where clients already branch on them.
object
Human-readable error message.
Stable machine code. Prefer this over matching on error. The
values this API can answer with are listed in the ApiErrorCode
schema of the raw document at
https://api.aetherpush.com/openapi.yaml. The field stays an
open string here so that a release adding a value does not
invalidate this response.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Returned with HTTP 409 by the promotion endpoint. code names which
conflict occurred, so a caller can act on it without matching on
error, whose wording is not part of the contract.
duplicate_release means the promoted package is byte-identical to
the destination’s current release for that binary version;
unfinished_rollout means the destination’s current release is still
rolling out; release_halted means the source release is disabled
because the release auto-halt pulled it back for failed installs, and
the promotion would have shipped its bundle enabled again. Promote a
fixed release instead, or promote the halted one with
"isDisabled": true and re-enable it in the destination once it is
safe. Promotions whose committed package is disabled are not refused.
release_label_collision means the next minted label already exists on
the destination, which is data drift rather than a concurrent writer.
promote_range_overlap means the stored version is a range and the
destination already has a release, enabled or not, whose version
intersects that range and is not the same range. No destination
release was changed.
object
Examples
The promoted package is identical to the destination's current release
{ "error": "The uploaded package was not promoted because it is identical to the contents of the targeted deployment's current release.", "code": "duplicate_release", "requestId": "req_abc123"}The destination is still rolling out
{ "error": "Cannot promote to an unfinished rollout release unless it is already disabled.", "code": "unfinished_rollout", "requestId": "req_abc123"}The source release was pulled back by the release auto-halt
{ "error": "Cannot promote release \"v3\": it is disabled, and the release auto-halt halted it for failed installs. Promote a fixed release instead, or promote this one with \"isDisabled\": true and re-enable it in the destination deployment once it is safe.", "code": "release_halted", "requestId": "req_abc123"}The minted label already exists on the destination
{ "error": "This release could not finish because the minted label \"v1\" already exists on this deployment. No release was created.", "code": "release_label_collision", "requestId": "req_abc123"}The stored version range overlaps a different destination release
{ "error": "The package was not promoted because its version range overlaps a different release on the destination. No release was changed.", "code": "promote_range_overlap", "requestId": "req_abc123"}The tenant’s per-minute management API budget is spent.
Retry-After and X-RateLimit-* say when to retry. This is
not a plan quota: quota 429s use the Error envelope and do
not set Retry-After.
Returned with HTTP 429 when an endpoint-specific rate limit is hit,
including the per-tenant management API budget. Not the process-wide
address limiter (see GlobalAddressRateLimitErrorResponse).
retryAfterSeconds
indicates how long the client should wait before retrying, and matches
the Retry-After header when that header is set. code names the
limit that fired so clients can translate without matching on error.
object
Example
{ "error": "Rate limit exceeded", "code": "tenant_rate_limit_exceeded", "retryAfterSeconds": 60}Headers
Section titled “Headers”Seconds until the tenant window resets.
The promotion could not finish because of database contention
on the destination deployment or on the source release row it
verifies (lock wait expired or deadlock). The request wrote
nothing and can be retried. The body includes
retryAfterSeconds and the
response sets Retry-After to the same value.
Returned with HTTP 503 when the server could not complete an
operation for a reason it expects to pass, and says so rather than
answering as though it had. On the management API, a release or
deployment write could not finish because of database contention
(lock wait expired, deadlock, or a serialization failure) and
nothing was written, or a release
upload could not read back the package it had just stored in order
to sign its URL. On the
acquisition endpoints, a database read the request depends on
could not be completed: resolving a deployment key with nothing
cached for it, reading that deployment’s releases, or refreshing
the download URL of the release it would serve. The release and
download-URL reads answer this way for the failures the server
recognises as transient, and the deployment lookup answers this
way for any failure it cannot serve from a cached entry, so an
outage no longer produces a different status depending on which
of them it reached.
retryAfterSeconds is the minimum interval before a
retry is useful for the path that failed, and is also sent as the
Retry-After response header. Management lock-contention 503s use
the commit lock wait; acquisition and other transient-read 503s use
the deployment-cache failure grace. Those intervals are independent
and can differ. code is connection_failed on every response this
schema describes, management lock contention included. The operation
and the message are what distinguish the paths.
object
Example
{ "error": "This release could not finish because another release was committing to the same deployment. No release was created. Please try again.", "code": "connection_failed", "retryAfterSeconds": 5, "requestId": "req_abc123"}Headers
Section titled “Headers”Seconds to wait before retrying.