Get Conversation
curl --request GET \
--url https://api.reportify.cn/v1/agent/conversations/{conversation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reportify.cn/v1/agent/conversations/{conversation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reportify.cn/v1/agent/conversations/{conversation_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/agent/conversations/{conversation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/agent/conversations/{conversation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reportify.cn/v1/agent/conversations/{conversation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/agent/conversations/{conversation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123456789,
"user_id": 987654321,
"agent_id": 11887655289749510,
"type": "agent_chat",
"title": "nvidia 最新业绩分析",
"status": "active",
"created_at": 1765851195760,
"updated_at": 1765851195768
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}智能体接口
Conversation Detail
Get agent conversation details
GET
/
v1
/
agent
/
conversations
/
{conversation_id}
Get Conversation
curl --request GET \
--url https://api.reportify.cn/v1/agent/conversations/{conversation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reportify.cn/v1/agent/conversations/{conversation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reportify.cn/v1/agent/conversations/{conversation_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/agent/conversations/{conversation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/agent/conversations/{conversation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reportify.cn/v1/agent/conversations/{conversation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/agent/conversations/{conversation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123456789,
"user_id": 987654321,
"agent_id": 11887655289749510,
"type": "agent_chat",
"title": "nvidia 最新业绩分析",
"status": "active",
"created_at": 1765851195760,
"updated_at": 1765851195768
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}获取智能体对话详情
URL:/v1/agent/conversations/{conversation_id}方法:
GET描述: 获取指定智能体对话的详细信息。
路径参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| conversation_id | integer | 是 | 对话 ID |
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| id | integer | 对话 ID |
| user_id | integer | 用户 ID |
| agent_id | integer | 智能体 ID |
| type | string | 对话类型 |
| title | string | 对话标题 |
| status | string | 对话状态 |
| meta | object | 元数据 |
| created_at | integer | 创建时间戳(毫秒) |
| updated_at | integer | 更新时间戳(毫秒) |
| last_message | object | 最后一条消息 |
示例代码
cURL 示例
curl -X GET "https://api.reportify.cn/v1/agent/conversations/683242877840089" \
-H "Authorization: Bearer YOUR_API_KEY"
Python 示例
import requests
url = "https://api.reportify.cn/v1/agent/conversations/683242877840089"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
print(f"对话标题: {data['title']}")
print(f"对话状态: {data['status']}")
print(f"创建时间: {data['created_at']}")
响应示例
{
"id": 683242877840089,
"user_id": 987654321,
"agent_id": 11887655289749510,
"type": "agent_chat",
"title": "nvidia 最新业绩分析",
"status": "active",
"meta": {},
"created_at": 1765851195760,
"updated_at": 1765851195768,
"last_message": {
"id": 123,
"role": "assistant",
"content": "...",
"created_at": 1765851195768
}
}
注意事项
conversation_id可从创建对话接口的响应中获取created_at和updated_at为毫秒级时间戳last_message字段包含对话中最后一条消息的信息
Authorizations
Enter your Bearer token
Path Parameters
对话 ID
Response
Successful Response
Agent 对话详情
对话 ID
Example:
123456789
用户 ID
Example:
987654321
智能体 ID
Example:
11887655289749510
对话类型
Example:
"agent_chat"
对话状态
Example:
"active"
创建时间戳(毫秒)
Example:
1765851195760
更新时间戳(毫秒)
Example:
1765851195768
对话标题
Example:
"nvidia 最新业绩分析"
元数据
最后一条消息
⌘I
