Promote the app to another environment of the same project.
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/promote';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"to_environment":"production","dry_run":true}'};
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://example.com/api/v1/projects/example/environments/example/apps/example/promote \ --header 'Content-Type: application/json' \ --data '{ "to_environment": "production", "dry_run": true }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Environment short name (source)
App name
Request Bodyrequired
Section titled “Request Bodyrequired”object
Target environment (short name) in the same project.
Example
productionOnly report what would change.
Responses
Section titled “Responses”object
The app did not exist in the target and was (or would be) created.
Human-readable diff; values of environment variables are never shown.
E.g. secrets referenced by the app that are missing in the target.
object
Environment short name.
Available, Progressing, RolloutFailed, Scheduled, AwaitingBuild, …
object
Cron expression of scheduled processes.
http or tcp.
Persistent volume (kept when the app is deleted, unless requested).
object
Capacity such as 5Gi. Can grow, never shrink.
Example
{ "app": { "env": [ { "name": "LOG_LEVEL" } ], "volumes": [ { "name": "data", "mount_path": "/data", "size": "5Gi" } ] }}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}