Query Agent conversation history
GET/v1/aibot/bots/:botId/records
Query Agent conversation history
Request
Path Parameters
botId stringrequired
Agent ID
Example: bot-xxx
Query Parameters
sort stringrequired
Sort order by creation time, asc for ascending, desc for descending
Example: desc
pageSize number
Pagination size, defaults to 10
Example: 10
pageNumber number
Pagination page number, defaults to 1
Example: 1
Responses
- 200
- default
Returned when conversation history is queried successfully
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
recordList object[]required
Conversation history list
botId string
Agent ID
recordId string
Conversation record ID generated by the system
role string
Role in the conversation
content string
Conversation content
conversation string
User identifier
type string
Conversation data type
image string
Image URL generated in the conversation
triggerSrc string
Source of the conversation trigger
replyTo string
ID of the record being replied to
createTime string
Conversation time
total numberrequired
Total number of conversations
{
"recordList": [
{
"botId": "bot-xxx",
"recordId": "record-xxx",
"role": "user",
"content": "I am a conversation entry.",
"conversation": "user",
"type": "text",
"image": "http://xxx.image",
"triggerSrc": "TCB",
"replyTo": "record-xxx",
"createTime": "2024-07-25T12:03:59.000Z"
}
],
"total": 10
}
Returned when querying conversation history fails
- application/json
- Schema
- Example (from schema)
Schema
code string
Error code
message string
Error message
requestId string
Request ID
{
"code": "INVALID_CREDENTIALS",
"message": "Credentials are invalid",
"requestId": "6360ba4b-f672-434b-9dee-35686a5589a4"
}
Loading...