import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/kubernetes/chat"
payload = {
"query": "<string>",
"addon_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', addon_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/kubernetes/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/kubernetes/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"addon_name": "<string>"
}
'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Stream chat responses for cluster troubleshooting
Runs one AI chat turn about the cluster and streams the reply as server-sent events. Answers 404 when the cluster is not a live cluster of the organisation. Deprecated: responses carry Deprecation and Sunset headers, and durable chat sessions (/api/v1/chat/sessions) are the successor.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/kubernetes/chat"
payload = {
"query": "<string>",
"addon_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', addon_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/kubernetes/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/kubernetes/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"addon_name": "<string>"
}
'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
When true, this turn forks the conversation at the end of the supplied conversation_history (edit-and-resend): the server fills in the turns before it from the stored transcript and never the branch after it.
Show child attributes
Show child attributes
ask, agentic, plan Show child attributes
Show child attributes
Show child attributes
Show child attributes
The client rendering this turn. "web" is the native web chat, which can show a secure secret-entry form, so the session runner offers request_secret_input on the turn. Absent or empty keeps the default behaviour (no form is ever requested).
web Response
Streaming chat response