Get the application's environments
import requests
url = "https://platform.ankra.app/org/applications/{application_id}/environments"
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}/environments', 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}/environments \
--header 'Authorization: Bearer <token>'{
"application_id": "<string>",
"read_state": "ok",
"read_reason": "<string>",
"follows_pushes": true,
"environments": [
{
"id": "<string>",
"name": "<string>",
"role": "playground",
"order": 123,
"status": "running",
"status_message": "<string>",
"follows": "pushes",
"serving": {
"commit_sha": "<string>",
"chart_version": "<string>"
},
"address": {
"host": "<string>",
"publication": "<string>"
},
"targets": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"cluster_kind": "<string>",
"namespace": "<string>",
"deployment_kind": "<string>",
"health_status": "<string>",
"sync_status": "<string>",
"pod_ready": 123,
"pod_total": 123,
"installed_version": "<string>",
"desired_version": "<string>",
"version_drift": true,
"is_draft": true,
"is_parked": true,
"installation_status": "<string>",
"failure_message": "<string>",
"last_updated_at": "<string>"
}
]
}
]
}{
"detail": "<string>"
}applications
Get the application's environments
The environment ladder: every place the application runs, one row per environment (wave 1: one per cluster), derived from the deployments read and the installation rows. status is the deployment-state ladder applied to that environment’s targets alone; read_state is unknown when the deployments read failed, and environments is then empty - which a client must render as could-not-check, never as no environments. address carries the raw ingress inputs; the verdict is the client’s existing rule.
GET
/
org
/
applications
/
{application_id}
/
environments
Get the application's environments
import requests
url = "https://platform.ankra.app/org/applications/{application_id}/environments"
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}/environments', 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}/environments \
--header 'Authorization: Bearer <token>'{
"application_id": "<string>",
"read_state": "ok",
"read_reason": "<string>",
"follows_pushes": true,
"environments": [
{
"id": "<string>",
"name": "<string>",
"role": "playground",
"order": 123,
"status": "running",
"status_message": "<string>",
"follows": "pushes",
"serving": {
"commit_sha": "<string>",
"chart_version": "<string>"
},
"address": {
"host": "<string>",
"publication": "<string>"
},
"targets": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"cluster_kind": "<string>",
"namespace": "<string>",
"deployment_kind": "<string>",
"health_status": "<string>",
"sync_status": "<string>",
"pod_ready": 123,
"pod_total": 123,
"installed_version": "<string>",
"desired_version": "<string>",
"version_drift": true,
"is_draft": true,
"is_parked": true,
"installation_status": "<string>",
"failure_message": "<string>",
"last_updated_at": "<string>"
}
]
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.