import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/promotions"
payload = {
"source_environment_id": "<string>",
"target_environment_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({source_environment_id: '<string>', target_environment_id: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/promotions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/promotions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_environment_id": "<string>",
"target_environment_id": "<string>"
}
'{
"promotion_id": "<string>",
"state": "promoted",
"image_tag": "<string>",
"commit_sha": "<string>",
"previous_image_tag": "<string>",
"operation_id": "<string>",
"source": {
"id": "<string>",
"name": "<string>",
"role": "<string>"
},
"target": {
"id": "<string>",
"name": "<string>",
"role": "<string>"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Promote a proven build into another environment
Promote the build the source environment has proven into the target environment (ankra-ryfuy.38.4). Exactly one thing moves: the image tag the source runs, written into each target installation’s stored deploy inputs and deployed through the same deploy_application job the Deploy button and push-to-deploy enqueue - never a rebuild, never configuration. The target’s push-to-deploy watermark is stamped with the promoted build and one application_promotion row records the move. Refused (409) with one of the preview’s blocker sentences verbatim: “Source environment is not serving a proven build”, “Source environment’s build cannot be identified”, “Source environment’s targets disagree on what they serve”, “Target environment follows pushes”, “Ankra could not read whether the target environment follows pushes”, “Target environment has a deploy in flight”, “Target environment is missing required secrets”. A target already running the build answers 200 with state already_current and no deploy. Held to the applications.deploy permission. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication plus the X-Ankra-CSRF double-submit header).
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/promotions"
payload = {
"source_environment_id": "<string>",
"target_environment_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({source_environment_id: '<string>', target_environment_id: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/promotions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/promotions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_environment_id": "<string>",
"target_environment_id": "<string>"
}
'{
"promotion_id": "<string>",
"state": "promoted",
"image_tag": "<string>",
"commit_sha": "<string>",
"previous_image_tag": "<string>",
"operation_id": "<string>",
"source": {
"id": "<string>",
"name": "<string>",
"role": "<string>"
},
"target": {
"id": "<string>",
"name": "<string>",
"role": "<string>"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Response
Successful Response
The write's answer. A target environment with several installations (one per namespace) is promoted as one row and one deploy execution per installation; promotion_id and operation_id are the first installation's.
null when nothing was written: the target already ran the build.
promoted, already_current What the target ran when the promotion was requested; null when that could not be read, never when nothing ran.
The deploy execution carrying the outcome; null when no deploy was enqueued.
One side of a promotion. id is the environment's id (a cluster id in wave-1 identity).
Show child attributes
Show child attributes
One side of a promotion. id is the environment's id (a cluster id in wave-1 identity).
Show child attributes
Show child attributes