import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/promotions/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/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://platform.ankra.app/api/v1/org/applications/{application_id}/promotions/preview \
--header 'Authorization: Bearer <token>'{
"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>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Preview a promotion between two environments
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. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication).
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/promotions/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/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://platform.ankra.app/api/v1/org/applications/{application_id}/promotions/preview \
--header 'Authorization: Bearer <token>'{
"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>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
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.
ok, unknown unknown when a read behind the verdict failed (read_reason names it) - never ready.
ready, already_current, blocked, unknown What the source environment runs. image_tag and commit_sha are null when its installations disagree or carry none - never "".
Show child attributes
Show child attributes
What the target environment runs now and how it is updated.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes