import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/autonomy"
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}/autonomy', 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}/autonomy \
--header 'Authorization: Bearer <token>'{
"application_id": "<string>",
"storage": "seeded",
"read_state": "ok",
"read_reason": "<string>",
"unread": [
"auto_remediation_policy"
],
"environments": [
{
"environment_id": "<string>",
"name": "<string>",
"role": "<string>",
"environment_kind": "production",
"level": "you_run_it",
"is_custom": true,
"areas": [
{
"area": "keep_it_up",
"level": "you_run_it",
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
},
"seeded_from": "auto_remediation_policy"
}
],
"limits": {
"monthly_cost_increase_cents": {
"value": 123,
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
}
},
"production_downtime_seconds": {
"value": 123,
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
}
},
"non_production_downtime_seconds": {
"value": 123,
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
}
},
"may_change_data": {
"value": true,
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
}
}
}
}
]
}{
"detail": "<string>"
}Get who runs each environment
Who runs it: for each of the application’s environments, the effective autonomy level (you_run_it, together, ankra_runs_it) in every area, the rule that decided it, and the limits. Until the autonomy policy has storage of its own, the organisation layer is seeded from existing settings (auto-remediation policy, Cost Autopilot tier, push-to-deploy) and seeded_from names which; read_state is partial when one of those could not be read and unknown when the environments could not be read, in which case environments is empty and must be rendered as could-not-check, never as no environments.
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/autonomy"
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}/autonomy', 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}/autonomy \
--header 'Authorization: Bearer <token>'{
"application_id": "<string>",
"storage": "seeded",
"read_state": "ok",
"read_reason": "<string>",
"unread": [
"auto_remediation_policy"
],
"environments": [
{
"environment_id": "<string>",
"name": "<string>",
"role": "<string>",
"environment_kind": "production",
"level": "you_run_it",
"is_custom": true,
"areas": [
{
"area": "keep_it_up",
"level": "you_run_it",
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
},
"seeded_from": "auto_remediation_policy"
}
],
"limits": {
"monthly_cost_increase_cents": {
"value": 123,
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
}
},
"production_downtime_seconds": {
"value": 123,
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
}
},
"non_production_downtime_seconds": {
"value": 123,
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
}
},
"may_change_data": {
"value": true,
"source": {
"layer": "platform_default",
"detail": "default",
"widened_by_admin": true,
"clamped": true,
"clamped_layer": "<string>"
}
}
}
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
seeded: the levels are read from existing settings; the autonomy policy has no storage of its own yet.
seeded ok, partial, unknown auto_remediation_policy, cost_autopilot_tier, deploys_on_push Show child attributes
Show child attributes