获取应用的消息反馈
适用于:Chatflow、聊天助手、旧版 Agent、文本生成应用。
返回此应用所有消息反馈的分页列表,包括终端用户和管理员提交的反馈。
1 min read
get/app/feedbacks
Request example
curl --request GET \
--url https://api.dify.ai/v1/app/feedbacks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dify.ai/v1/app/feedbacks"
headers = {
"Authorization": "Bearer <token>",
}
response = requests.request("GET", url, headers=headers)
print(response.text)const response = await fetch('https://api.dify.ai/v1/app/feedbacks', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
console.log(data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.dify.ai/v1/app/feedbacks',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.dify.ai/v1/app/feedbacks"
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))
}HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dify.ai/v1/app/feedbacks"))
.header("Authorization", "Bearer <token>")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());require 'uri'
require 'net/http'
url = URI('https://api.dify.ai/v1/app/feedbacks')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = url.scheme == 'https'
request = Net::HTTP::Get.new(url)
request['Authorization'] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyResponse
{
"data": [
{
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"content": "The response accurately answered my question about product specifications.",
"conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2",
"created_at": "2025-01-16T14:30:29Z",
"from_account_id": null,
"from_end_user_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"from_source": "user",
"id": "b7e2f8a1-3c4d-5e6f-7890-abcdef123456",
"message_id": "9da23599-e713-473b-982c-4328d4f5c78a",
"rating": "like",
"updated_at": "2025-01-16T14:30:29Z"
},
{
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"content": "The answer was too vague and did not address the specific pricing question.",
"conversation_id": "56812a93-9229-5cd6-9f0c-75673b666603",
"created_at": "2025-01-15T09:12:45Z",
"from_account_id": null,
"from_end_user_id": "d2c1b0a9-8765-4321-fedc-ba9876543210",
"from_source": "user",
"id": "c8f3a9b2-4d5e-6f70-8901-bcdef2345678",
"message_id": "ae24b5c0-f814-584d-a493-5439e5d6b7b1",
"rating": "dislike",
"updated_at": "2025-01-15T09:12:45Z"
}
]
}get/app/feedbacks
Authorization
Query parameters
Responses
application/json
200
应用反馈列表。
反馈项列表。
Show child attributesHide child attributes
应用 ID。
可选的文字反馈。
会话 ID。
创建时间戳。
提交反馈的账户 ID。当
from_source 为 admin 时存在。提交反馈的终端用户 ID。当
from_source 为 user 时存在。反馈来源。
user 为终端用户通过 API 提交的反馈,admin 为从控制台提交的反馈。反馈 ID。
消息 ID。
反馈评分。
like 为正面,dislike 为负面。最后更新时间戳。