Cancel a durable AI chat session
import requests
url = "https://platform.ankra.app/api/v1/chat/sessions/{session_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/chat/sessions/{session_id}/cancel', 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/chat/sessions/{session_id}/cancel \
--header 'Authorization: Bearer <token>'{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Chat
Cancel a durable AI chat session
Cancels an AI chat session and stops any turn it is running. Answers 409 when the session can no longer be cancelled and 404 when it is not visible to the caller.
POST
/
api
/
v1
/
chat
/
sessions
/
{session_id}
/
cancel
Cancel a durable AI chat session
import requests
url = "https://platform.ankra.app/api/v1/chat/sessions/{session_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/chat/sessions/{session_id}/cancel', 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/chat/sessions/{session_id}/cancel \
--header 'Authorization: Bearer <token>'{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}