import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/promotions/preview"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/promotions/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/applications/{application_id}/promotions/preview \
--cookie ankra_session={
"application_id": "<string>",
"read_state": "ok",
"read_reason": "<string>",
"state": "ready",
"source": {
"id": "<string>",
"name": "<string>",
"role": "<string>",
"image_tag": "<string>",
"commit_sha": "<string>",
"status": "<string>"
},
"target": {
"id": "<string>",
"name": "<string>",
"role": "<string>",
"image_tag": "<string>",
"commit_sha": "<string>",
"status": "<string>",
"follows": "pushes",
"drift": "in_sync"
},
"blockers": [
{
"reason": "source_not_proven",
"detail": "<string>",
"fix_path": "none"
}
],
"secrets": {
"state": "known",
"missing_keys": [
"<string>"
],
"target_apply_state": "<string>"
},
"config_differences": [
{
"key": "<string>",
"source_value": "<string>",
"target_value": "<string>"
}
],
"review_fingerprint": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Preview a promotion between two environments (browser session)
What promoting the source environment’s build into the target would do (ankra-ryfuy.38.4): the build that would move, what the target serves now, the deploy options that differ and stay as they are, the secrets check, the target’s manifest-revision drift verdict, and every reason the promotion would be refused, with a fix path each. state is ready, already_current, blocked, or unknown when a read behind the verdict failed - never ready on a guess. Environment ids are the ids the environments read answers with. Held to the applications.deploy permission, as the write is; secrets.missing_keys is null unless the caller also holds applications.write, the env-secrets endpoints’ permission.
import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/promotions/preview"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/promotions/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/applications/{application_id}/promotions/preview \
--cookie ankra_session={
"application_id": "<string>",
"read_state": "ok",
"read_reason": "<string>",
"state": "ready",
"source": {
"id": "<string>",
"name": "<string>",
"role": "<string>",
"image_tag": "<string>",
"commit_sha": "<string>",
"status": "<string>"
},
"target": {
"id": "<string>",
"name": "<string>",
"role": "<string>",
"image_tag": "<string>",
"commit_sha": "<string>",
"status": "<string>",
"follows": "pushes",
"drift": "in_sync"
},
"blockers": [
{
"reason": "source_not_proven",
"detail": "<string>",
"fix_path": "none"
}
],
"secrets": {
"state": "known",
"missing_keys": [
"<string>"
],
"target_apply_state": "<string>"
},
"config_differences": [
{
"key": "<string>",
"source_value": "<string>",
"target_value": "<string>"
}
],
"review_fingerprint": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Response
Successful Response
The confirmation's data: what would move, what the target serves now, what differs and stays, and every reason the promotion would be refused. Three-valued throughout.