import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/environments/{environment_id}/autonomy"
payload = {
"areas": {},
"limits": {
"monthly_cost_increase_cents": 1,
"production_downtime_seconds": 1,
"non_production_downtime_seconds": 1,
"may_change_data": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
areas: {},
limits: {
monthly_cost_increase_cents: 1,
production_downtime_seconds: 1,
non_production_downtime_seconds: 1,
may_change_data: true
}
})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/environments/{environment_id}/autonomy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/environments/{environment_id}/autonomy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"areas": {},
"limits": {
"monthly_cost_increase_cents": 1,
"production_downtime_seconds": 1,
"non_production_downtime_seconds": 1,
"may_change_data": true
}
}
'{
"application_id": "<string>",
"scope": "application",
"environment_id": "<string>",
"level": "you_run_it",
"areas": {},
"limits": {
"monthly_cost_increase_cents": 1,
"production_downtime_seconds": 1,
"non_production_downtime_seconds": 1,
"may_change_data": true
},
"widened_by_admin": true,
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Set who runs an environment
Store one environment’s “who runs it” layer, which applies over the application’s. It replaces the stored layer and follows the same rule: more than the environment inherits needs an organisation admin. Every write is audited.
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/environments/{environment_id}/autonomy"
payload = {
"areas": {},
"limits": {
"monthly_cost_increase_cents": 1,
"production_downtime_seconds": 1,
"non_production_downtime_seconds": 1,
"may_change_data": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
areas: {},
limits: {
monthly_cost_increase_cents: 1,
production_downtime_seconds: 1,
non_production_downtime_seconds: 1,
may_change_data: true
}
})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/environments/{environment_id}/autonomy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/environments/{environment_id}/autonomy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"areas": {},
"limits": {
"monthly_cost_increase_cents": 1,
"production_downtime_seconds": 1,
"non_production_downtime_seconds": 1,
"may_change_data": true
}
}
'{
"application_id": "<string>",
"scope": "application",
"environment_id": "<string>",
"level": "you_run_it",
"areas": {},
"limits": {
"monthly_cost_increase_cents": 1,
"production_downtime_seconds": 1,
"non_production_downtime_seconds": 1,
"may_change_data": true
},
"widened_by_admin": true,
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The whole layer: it replaces the stored one. Every field is required so an omitted field is never read as a cleared one.
The layer's level for every area without its own entry; null for none.
you_run_it, together, ankra_runs_it Per-area levels keyed by area: keep_it_up, ship_changes, keep_it_safe, keep_costs_down, keep_it_current, fix_my_code.
Show child attributes
Show child attributes
A layer's own limits. An omitted limit is inherited from the layer above; lower is stricter, and false is stricter for may_change_data.
Show child attributes
Show child attributes
Response
The stored layer
application, environment you_run_it, together, ankra_runs_it Per-area levels keyed by area: keep_it_up, ship_changes, keep_it_safe, keep_costs_down, keep_it_current, fix_my_code.
Show child attributes
Show child attributes
A layer's own limits. An omitted limit is inherited from the layer above; lower is stricter, and false is stricter for may_change_data.
Show child attributes
Show child attributes
True when the layer asks for more than it inherits; only an organisation admin's write can store that.