Switch cluster AI insights
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/ai-insights/settings"
payload = { "ai_insights_enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ai_insights_enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/ai-insights/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/ai-insights/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ai_insights_enabled": true
}
'{
"ai_insights_enabled": true
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Clusters
Switch cluster AI insights
The bearer twin of the portal’s AI insights switch, for the Ankra app and scripts. Turns Ankra AI’s insights for the cluster on or off and answers the stored value. Requires clusters.write on the cluster.
PATCH
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
ai-insights
/
settings
Switch cluster AI insights
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/ai-insights/settings"
payload = { "ai_insights_enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ai_insights_enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/ai-insights/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/ai-insights/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ai_insights_enabled": true
}
'{
"ai_insights_enabled": true
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Body
application/json