import requests
url = "https://platform.ankra.app/org/applications/{application_id}/rollback-targets"
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/org/applications/{application_id}/rollback-targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/applications/{application_id}/rollback-targets \
--header 'Authorization: Bearer <token>'{
"cluster_id": "<string>",
"target_kind": "<string>",
"unavailable_reason": "<string>",
"stack_name": "<string>",
"namespace": "<string>",
"image_repository": "<string>",
"current_image_tag": "<string>",
"targets": [
{
"image_tag": "<string>",
"pushed_at": "<string>",
"is_current": true,
"is_latest_build": true
}
],
"targets_reason": "<string>",
"latest_build_image_tag": "<string>",
"auto_deploy_enabled": true,
"not_reverted": [
"<string>"
],
"last_rollback": {
"id": "<string>",
"cluster_id": "<string>",
"target_kind": "<string>",
"stack_name": "<string>",
"installation_id": "<string>",
"image_tag": "<string>",
"previous_image_tag": "<string>",
"watermark_commit_sha": "<string>",
"status": "<string>",
"message": "<string>",
"requested_by": "<string>",
"requested_at": "<string>",
"not_reverted": [
"<string>"
]
}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Read an application's rollback targets
What this application’s deployment on the named cluster could be rolled back to: the shape of deployment found, the image tag it is running, the builds still in the registry, whether push-to-deploy is armed, and the list of things a rollback does NOT undo. Browser session authentication only (no bearer twin).
import requests
url = "https://platform.ankra.app/org/applications/{application_id}/rollback-targets"
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/org/applications/{application_id}/rollback-targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/applications/{application_id}/rollback-targets \
--header 'Authorization: Bearer <token>'{
"cluster_id": "<string>",
"target_kind": "<string>",
"unavailable_reason": "<string>",
"stack_name": "<string>",
"namespace": "<string>",
"image_repository": "<string>",
"current_image_tag": "<string>",
"targets": [
{
"image_tag": "<string>",
"pushed_at": "<string>",
"is_current": true,
"is_latest_build": true
}
],
"targets_reason": "<string>",
"latest_build_image_tag": "<string>",
"auto_deploy_enabled": true,
"not_reverted": [
"<string>"
],
"last_rollback": {
"id": "<string>",
"cluster_id": "<string>",
"target_kind": "<string>",
"stack_name": "<string>",
"installation_id": "<string>",
"image_tag": "<string>",
"previous_image_tag": "<string>",
"watermark_commit_sha": "<string>",
"status": "<string>",
"message": "<string>",
"requested_by": "<string>",
"requested_at": "<string>",
"not_reverted": [
"<string>"
]
}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Response
Successful Response
What a deployment could be rolled back to. target_kind is one of "stack", "installation", "none" (a successful read that found nothing deployed) or "unknown" (Ankra could not establish what runs the application); unavailable_reason explains the last two. current_image_tag is null when the running tag could not be established - a digest pin, no tag, or containers that disagree - and never means "no image". A non-null targets_reason with an empty targets list means the registry listing did not succeed, not that nothing has been published.
Show child attributes
Show child attributes
One rollback as it happened. previous_image_tag is null when Ankra could not read what was running - never that nothing was running. watermark_commit_sha names the push-to-deploy build the rollback stamped so the convergence loop would not undo it, or "" when no build had been observed. not_reverted repeats what a rollback leaves untouched.
Show child attributes
Show child attributes