import requests
url = "https://platform.ankra.app/api/v1/org/ai-environment"
payload = {
"staging_cluster_id": "<string>",
"workspace_ttl_hours": 123,
"demo_ttl_hours": 123,
"default_gateway_mode": "<string>",
"demo_ttl_role_caps": {},
"demo_base_domain": "<string>",
"demo_ingress_class_name": "<string>",
"demo_tls_secret_name": "<string>",
"demo_cert_issuer_name": "<string>",
"dns_root_domain": "<string>",
"home_slack_channel_id": "<string>",
"home_slack_channel_name": "<string>"
}
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({
staging_cluster_id: '<string>',
workspace_ttl_hours: 123,
demo_ttl_hours: 123,
default_gateway_mode: '<string>',
demo_ttl_role_caps: {},
demo_base_domain: '<string>',
demo_ingress_class_name: '<string>',
demo_tls_secret_name: '<string>',
demo_cert_issuer_name: '<string>',
dns_root_domain: '<string>',
home_slack_channel_id: '<string>',
home_slack_channel_name: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/ai-environment', 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/ai-environment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"staging_cluster_id": "<string>",
"workspace_ttl_hours": 123,
"demo_ttl_hours": 123,
"default_gateway_mode": "<string>",
"demo_ttl_role_caps": {},
"demo_base_domain": "<string>",
"demo_ingress_class_name": "<string>",
"demo_tls_secret_name": "<string>",
"demo_cert_issuer_name": "<string>",
"dns_root_domain": "<string>",
"home_slack_channel_id": "<string>",
"home_slack_channel_name": "<string>"
}
'{
"dns_root_domain": "<string>",
"dns_root_domain_default": "<string>",
"staging_cluster_id": "<string>",
"staging_cluster_name": "<string>",
"staging_cluster_online": true,
"workspace_ttl_hours": 123,
"demo_ttl_hours": 123,
"default_gateway_mode": "<string>",
"demo_ttl_role_caps": {},
"demo_base_domain": "<string>",
"demo_ingress_class_name": "<string>",
"demo_tls_secret_name": "<string>",
"demo_cert_issuer_name": "<string>",
"demo_preview_tls_warning": "<string>",
"demo_preview_dns_warning": "<string>",
"home_slack_channel_id": "<string>",
"home_slack_channel_name": "<string>",
"home_slack_team_id": "<string>"
}{
"detail": "<string>",
"blocking_cluster_zones": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"fqdn": "<string>",
"state": "<string>"
}
],
"blocking_cluster_zones_truncated": true,
"blocking_dns_records": [
{
"id": "<string>",
"name": "<string>",
"record_type": "<string>",
"state": "<string>"
}
],
"blocking_dns_records_truncated": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Ai Environment Api Endpoint
Update the organisation’s AI environment settings (organisation admin only). Only the members present in the body are changed. Setting dns_root_domain registers the organisation’s own Ankra root domain; it must be a bare domain the organisation owns, already delegated to the Ankra nameservers, and held by no other organisation. The switch is refused with 400 while cluster DNS zones or DNS records still live under the old domain - the response’s blocking_cluster_zones and blocking_dns_records members list exactly what to remove first, each capped at 100 entries with a matching *_truncated flag set to true when more exist (read the full lists from /api/v1/org/dns/cluster-zones and /api/v1/org/dns/records).
import requests
url = "https://platform.ankra.app/api/v1/org/ai-environment"
payload = {
"staging_cluster_id": "<string>",
"workspace_ttl_hours": 123,
"demo_ttl_hours": 123,
"default_gateway_mode": "<string>",
"demo_ttl_role_caps": {},
"demo_base_domain": "<string>",
"demo_ingress_class_name": "<string>",
"demo_tls_secret_name": "<string>",
"demo_cert_issuer_name": "<string>",
"dns_root_domain": "<string>",
"home_slack_channel_id": "<string>",
"home_slack_channel_name": "<string>"
}
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({
staging_cluster_id: '<string>',
workspace_ttl_hours: 123,
demo_ttl_hours: 123,
default_gateway_mode: '<string>',
demo_ttl_role_caps: {},
demo_base_domain: '<string>',
demo_ingress_class_name: '<string>',
demo_tls_secret_name: '<string>',
demo_cert_issuer_name: '<string>',
dns_root_domain: '<string>',
home_slack_channel_id: '<string>',
home_slack_channel_name: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/ai-environment', 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/ai-environment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"staging_cluster_id": "<string>",
"workspace_ttl_hours": 123,
"demo_ttl_hours": 123,
"default_gateway_mode": "<string>",
"demo_ttl_role_caps": {},
"demo_base_domain": "<string>",
"demo_ingress_class_name": "<string>",
"demo_tls_secret_name": "<string>",
"demo_cert_issuer_name": "<string>",
"dns_root_domain": "<string>",
"home_slack_channel_id": "<string>",
"home_slack_channel_name": "<string>"
}
'{
"dns_root_domain": "<string>",
"dns_root_domain_default": "<string>",
"staging_cluster_id": "<string>",
"staging_cluster_name": "<string>",
"staging_cluster_online": true,
"workspace_ttl_hours": 123,
"demo_ttl_hours": 123,
"default_gateway_mode": "<string>",
"demo_ttl_role_caps": {},
"demo_base_domain": "<string>",
"demo_ingress_class_name": "<string>",
"demo_tls_secret_name": "<string>",
"demo_cert_issuer_name": "<string>",
"demo_preview_tls_warning": "<string>",
"demo_preview_dns_warning": "<string>",
"home_slack_channel_id": "<string>",
"home_slack_channel_name": "<string>",
"home_slack_team_id": "<string>"
}{
"detail": "<string>",
"blocking_cluster_zones": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"fqdn": "<string>",
"state": "<string>"
}
],
"blocking_cluster_zones_truncated": true,
"blocking_dns_records": [
{
"id": "<string>",
"name": "<string>",
"record_type": "<string>",
"state": "<string>"
}
],
"blocking_dns_records_truncated": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes