Query Agent Historical Conversation Information
GET/v1/aibot/bots/:botId/records
Query Agent Historical Conversation Information
Request
Path Parameters
botId stringrequired
Agent ID
Example: bot-xxx
Query Parameters
sort stringrequired
Sort by creation time in ascending (asc) or descending (desc) order
Example: desc
pageSize number
Pagination parameter, default to 10
Example: 10
pageNumber number
Pagination parameter, default to 1
Example: 1
Responses
- 200
- default
Returned when chat records are successfully queried
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
recordList object[]required
Historical Conversation List
botId string
Agent ID
recordId string
Conversation 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 link generated by the conversation
triggerSrc string
Conversation initiation source
replyTo string
Record ID of the conversation reply
createTime string
Conversation time
total numberrequired
Total number of conversations
{
"recordList": [
{
"botId": "bot-xxx",
"recordId": "record-xxx",
"role": "user",
"content": "I am a piece of content",
"conversation": "user",
"type": "text",
"image": "http://xxx.image",
"triggerSrc": "TCB",
"replyTo": "record-xxx",
"createTime": "2024-07-25T12:03:59.000Z"
}
],
"total": 10
}
Returned when chat records fail to be queried
- 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...