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. A session that has already ended is left as it is and answered with the status it keeps. Answers 404 when the session is not visible to the caller, and 409 when it disappears while being cancelled.
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>"
}
]
}