Skip to main content
GET
/
api
/
v1
/
chat
/
general
/
history
List general chat conversations
import requests

url = "https://platform.ankra.app/api/v1/chat/general/history"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://platform.ankra.app/api/v1/chat/general/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request GET \
--url https://platform.ankra.app/api/v1/chat/general/history \
--header 'Authorization: Bearer <token>'
{
  "conversations": [
    {
      "cluster_id": "<string>",
      "context_summary": {},
      "created_at": "2023-11-07T05:31:56Z",
      "id": "<string>",
      "messages": [
        {
          "content": "<string>",
          "role": "<string>",
          "actionResult": {},
          "complete": {},
          "context": {},
          "id": "<string>",
          "parts": [
            {}
          ],
          "pendingActions": [
            {}
          ],
          "pendingQuestion": {},
          "plan": {},
          "redactions": {},
          "structuredBlocks": [
            {}
          ],
          "timestamp": "2023-11-07T05:31:56Z",
          "toolsUsed": [
            {
              "id": "<string>",
              "status": "<string>",
              "toolName": "<string>",
              "category": "<string>",
              "durationMs": 123,
              "error": "<string>",
              "parametersPreview": {},
              "resultCount": 123,
              "resultPreview": "<unknown>"
            }
          ],
          "triage": {},
          "verificationMismatch": {}
        }
      ],
      "organisation_id": "<string>",
      "question_type": "<string>",
      "title": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "user_id": "<string>",
      "cluster_name": "<string>",
      "message_count": 123
    }
  ],
  "total_count": 123
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Query Parameters

show_all
boolean
default:true

Show all conversations including deleted

Example:

true

limit
integer
default:50

Maximum number of conversations to return

Required range: 1 <= x <= 1000
Example:

50

offset
integer
default:0

Number of conversations to skip

Required range: x >= 0
Example:

0

metadata_only
boolean
default:false

Return conversation metadata with empty messages and a message_count

Example:

false

Response

Chat conversations retrieved successfully

conversations
ChatConversation · object[]
required
total_count
integer
required