Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

add endpoint of get feedbacks (#18697)

Ganondorfc76d7636393e
diff --git a/api/controllers/service_api/app/message.py b/api/controllers/service_api/app/message.py
index 1b148a97569..d90fa2081f0 100644
--- a/api/controllers/service_api/app/message.py
+++ b/api/controllers/service_api/app/message.py
@@ -93,6 +93,18 @@ class MessageFeedbackApi(Resource):
return {"result": "success"}
+class AppGetFeedbacksApi(Resource):
+ @validate_app_token
+ def get(self, app_model: App):
+ """Get All Feedbacks of an app"""
+ parser = reqparse.RequestParser()
+ parser.add_argument("page", type=int, default=1, location="args")
+ parser.add_argument("limit", type=int_range(1, 101), required=False, default=20, location="args")
+ args = parser.parse_args()
+ feedbacks = MessageService.get_all_messages_feedbacks(app_model, page=args["page"], limit=args["limit"])
+ return {"data": feedbacks}
+
+
class MessageSuggestedApi(Resource):
@validate_app_token(fetch_user_arg=FetchUserArg(fetch_from=WhereisUserArg.QUERY, required=True))
def get(self, app_model: App, end_user: EndUser, message_id):
@@ -119,3 +131,4 @@ class MessageSuggestedApi(Resource):
api.add_resource(MessageListApi, "/messages")
api.add_resource(MessageFeedbackApi, "/messages/<uuid:message_id>/feedbacks")
api.add_resource(MessageSuggestedApi, "/messages/<uuid:message_id>/suggested")
+api.add_resource(AppGetFeedbacksApi, "/app/feedbacks")
diff --git a/api/models/model.py b/api/models/model.py
index 03ecd14aee0..ab426649c56 100644
--- a/api/models/model.py
+++ b/api/models/model.py
@@ -1237,6 +1237,21 @@ class MessageFeedback(Base):
account = db.session.query(Account).filter(Account.id == self.from_account_id).first()
return account
+ def to_dict(self):
+ return {
+ "id": str(self.id),
+ "app_id": str(self.app_id),
+ "conversation_id": str(self.conversation_id),
+ "message_id": str(self.message_id),
+ "rating": self.rating,
+ "content": self.content,
+ "from_source": self.from_source,
+ "from_end_user_id": str(self.from_end_user_id) if self.from_end_user_id else None,
+ "from_account_id": str(self.from_account_id) if self.from_account_id else None,
+ "created_at": self.created_at.isoformat(),
+ "updated_at": self.updated_at.isoformat(),
+ }
+
class MessageFile(Base):
__tablename__ = "message_files"
diff --git a/api/services/message_service.py b/api/services/message_service.py
index aefab1556cd..51b070ece7e 100644
--- a/api/services/message_service.py
+++ b/api/services/message_service.py
@@ -177,6 +177,21 @@ class MessageService:
return feedback
+ @classmethod
+ def get_all_messages_feedbacks(cls, app_model: App, page: int, limit: int):
+ """Get all feedbacks of an app"""
+ offset = (page - 1) * limit
+ feedbacks = (
+ db.session.query(MessageFeedback)
+ .filter(MessageFeedback.app_id == app_model.id)
+ .order_by(MessageFeedback.created_at.desc(), MessageFeedback.id.desc())
+ .limit(limit)
+ .offset(offset)
+ .all()
+ )
+
+ return [record.to_dict() for record in feedbacks]
+
@classmethod
def get_message(cls, app_model: App, user: Optional[Union[Account, EndUser]], message_id: str):
message = (
diff --git a/web/app/components/develop/template/template.en.mdx b/web/app/components/develop/template/template.en.mdx
index 75f044f780e..43dc226107b 100755
--- a/web/app/components/develop/template/template.en.mdx
+++ b/web/app/components/develop/template/template.en.mdx
@@ -383,6 +383,69 @@ The text generation application offers non-session support and is ideal for tran
---
+<Heading
+ url='/app/feedbacks'
+ method='GET'
+ title='Get feedbacks of application'
+ name='#app-feedbacks'
+/>
+<Row>
+ <Col>
+ Get application's feedbacks.
+
+ ### Query
+ <Properties>
+ <Property name='page' type='string' key='page'>
+ (optional)pagination,default:1
+ </Property>
+ </Properties>
+
+ <Properties>
+ <Property name='limit' type='string' key='limit'>
+ (optional) records per page default:20
+ </Property>
+ </Properties>
+
+ ### Response
+ - `data` (List) return apps feedback list.
+ </Col>
+ <Col sticky>
+
+ <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
+
+ ```bash {{ title: 'cURL' }}
+ curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
+ --header 'Authorization: Bearer {api_key}' \
+ --header 'Content-Type: application/json'
+ ```
+
+ </CodeGroup>
+
+ <CodeGroup title="Response">
+ ```json {{ title: 'Response' }}
+ {
+ "data": [
+ {
+ "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
+ "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
+ "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
+ "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
+ "rating": "like",
+ "content": "message feedback information-3",
+ "from_source": "user",
+ "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
+ "from_account_id": null,
+ "created_at": "2025-04-24T09:24:38",
+ "updated_at": "2025-04-24T09:24:38"
+ }
+ ]
+ }
+ ```
+ </CodeGroup>
+ </Col>
+</Row>
+---
+
<Heading
url='/text-to-audio'
method='POST'
diff --git a/web/app/components/develop/template/template.ja.mdx b/web/app/components/develop/template/template.ja.mdx
index 50bf1e234b2..2c676e392f8 100755
--- a/web/app/components/develop/template/template.ja.mdx
+++ b/web/app/components/develop/template/template.ja.mdx
@@ -381,6 +381,69 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
</Row>
---
+<Heading
+ url='/app/feedbacks'
+ method='GET'
+ title='アプリのメッセージの「いいね」とフィードバックを取得'
+ name='#app-feedbacks'
+/>
+<Row>
+ <Col>
+ アプリのエンドユーザーからのフィードバックや「いいね」を取得します。
+
+ ### クエリ
+ <Properties>
+ <Property name='page' type='string' key='page'>
+ (任意)ページ番号。デフォルト値:1
+ </Property>
+ </Properties>
+
+ <Properties>
+ <Property name='limit' type='string' key='limit'>
+ (任意)1ページあたりの件数。デフォルト値:20
+ </Property>
+ </Properties>
+
+ ### レスポンス
+ - `data` (リスト) このアプリの「いいね」とフィードバックの一覧を返します。
+ </Col>
+ <Col sticky>
+
+ <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
+
+ ```bash {{ title: 'cURL' }}
+ curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
+ --header 'Authorization: Bearer {api_key}' \
+ --header 'Content-Type: application/json'
+ ```
+
+ </CodeGroup>
+
+ <CodeGroup title="Response">
+ ```json {{ title: 'Response' }}
+ {
+ "data": [
+ {
+ "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
+ "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
+ "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
+ "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
+ "rating": "like",
+ "content": "message feedback information-3",
+ "from_source": "user",
+ "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
+ "from_account_id": null,
+ "created_at": "2025-04-24T09:24:38",
+ "updated_at": "2025-04-24T09:24:38"
+ }
+ ]
+ }
+ ```
+ </CodeGroup>
+ </Col>
+</Row>
+---
+
<Heading
url='/text-to-audio'
method='POST'
diff --git a/web/app/components/develop/template/template.zh.mdx b/web/app/components/develop/template/template.zh.mdx
index 13aa3734855..64814e02359 100755
--- a/web/app/components/develop/template/template.zh.mdx
+++ b/web/app/components/develop/template/template.zh.mdx
@@ -355,6 +355,68 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
</Col>
</Row>
+---
+<Heading
+ url='/app/feedbacks'
+ method='GET'
+ title='Get feedbacks of application'
+ name='#app-feedbacks'
+/>
+<Row>
+ <Col>
+ Get application's feedbacks.
+
+ ### Query
+ <Properties>
+ <Property name='page' type='string' key='page'>
+ (optional)pagination,default:1
+ </Property>
+ </Properties>
+
+ <Properties>
+ <Property name='limit' type='string' key='limit'>
+ (optional) records per page default:20
+ </Property>
+ </Properties>
+
+ ### Response
+ - `data` (List) return apps feedback list.
+ </Col>
+ <Col sticky>
+
+ <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
+
+ ```bash {{ title: 'cURL' }}
+ curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
+ --header 'Authorization: Bearer {api_key}' \
+ --header 'Content-Type: application/json'
+ ```
+
+ </CodeGroup>
+
+ <CodeGroup title="Response">
+ ```json {{ title: 'Response' }}
+ {
+ "data": [
+ {
+ "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
+ "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
+ "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
+ "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
+ "rating": "like",
+ "content": "message feedback information-3",
+ "from_source": "user",
+ "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
+ "from_account_id": null,
+ "created_at": "2025-04-24T09:24:38",
+ "updated_at": "2025-04-24T09:24:38"
+ }
+ ]
+ }
+ ```
+ </CodeGroup>
+ </Col>
+</Row>
---
<Heading
@@ -845,4 +907,4 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
```
</CodeGroup>
</Col>
-</Row>
+</Row>
\ No newline at end of file
diff --git a/web/app/components/develop/template/template_advanced_chat.en.mdx b/web/app/components/develop/template/template_advanced_chat.en.mdx
index b77e0528d70..6377bfba003 100644
--- a/web/app/components/develop/template/template_advanced_chat.en.mdx
+++ b/web/app/components/develop/template/template_advanced_chat.en.mdx
@@ -487,6 +487,69 @@ Chat applications support session persistence, allowing previous chat history to
---
+<Heading
+ url='/app/feedbacks'
+ method='GET'
+ title='Get feedbacks of application'
+ name='#app-feedbacks'
+/>
+<Row>
+ <Col>
+ Get application's feedbacks.
+
+ ### Query
+ <Properties>
+ <Property name='page' type='string' key='page'>
+ (optional)pagination,default:1
+ </Property>
+ </Properties>
+
+ <Properties>
+ <Property name='limit' type='string' key='limit'>
+ (optional) records per page default:20
+ </Property>
+ </Properties>
+
+ ### Response
+ - `data` (List) return apps feedback list.
+ </Col>
+ <Col sticky>
+
+ <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
+
+ ```bash {{ title: 'cURL' }}
+ curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
+ --header 'Authorization: Bearer {api_key}' \
+ --header 'Content-Type: application/json'
+ ```
+
+ </CodeGroup>
+
+ <CodeGroup title="Response">
+ ```json {{ title: 'Response' }}
+ {
+ "data": [
+ {
+ "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
+ "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
+ "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
+ "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
+ "rating": "like",
+ "content": "message feedback information-3",
+ "from_source": "user",
+ "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
+ "from_account_id": null,
+ "created_at": "2025-04-24T09:24:38",
+ "updated_at": "2025-04-24T09:24:38"
+ }
+ ]
+ }
+ ```
+ </CodeGroup>
+ </Col>
+</Row>
+---
+
<Heading
url='/messages/{message_id}/suggested'
method='GET'
diff --git a/web/app/components/develop/template/template_advanced_chat.ja.mdx b/web/app/components/develop/template/template_advanced_chat.ja.mdx
index db9f65db5b6..9d6c99e51b7 100644
--- a/web/app/components/develop/template/template_advanced_chat.ja.mdx
+++ b/web/app/components/develop/template/template_advanced_chat.ja.mdx
@@ -487,6 +487,70 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
---
+<Heading
+ url='/app/feedbacks'
+ method='GET'
+ title='アプリのメッセージの「いいね」とフィードバックを取得'
+ name='#app-feedbacks'
+/>
+<Row>
+ <Col>
+ アプリのエンドユーザーからのフィードバックや「いいね」を取得します。
+
+ ### クエリ
+ <Properties>
+ <Property name='page' type='string' key='page'>
+ (任意)ページ番号。デフォルト値:1
+ </Property>
+ </Properties>
+
+ <Properties>
+ <Property name='limit' type='string' key='limit'>
+ (任意)1ページあたりの件数。デフォルト値:20
+ </Property>
+ </Properties>
+
+ ### レスポンス
+ - `data` (リスト) このアプリの「いいね」とフィードバックの一覧を返します。
+ </Col>
+ <Col sticky>
+
+ <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
+
+ ```bash {{ title: 'cURL' }}
+ curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
+ --header 'Authorization: Bearer {api_key}' \
+ --header 'Content-Type: application/json'
+ ```
+
+ </CodeGroup>
+
+ <CodeGroup title="Response">
+ ```json {{ title: 'Response' }}
+ {
+ "data": [
+ {
+ "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
+ "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
+ "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
+ "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
+ "rating": "like",
+ "content": "message feedback information-3",
+ "from_source": "user",
+ "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
+ "from_account_id": null,
+ "created_at": "2025-04-24T09:24:38",
+ "updated_at": "2025-04-24T09:24:38"
+ }
+ ]
+ }
+ ```
+ </CodeGroup>
+ </Col>
+</Row>
+---
+
+
<Heading
url='/messages/{message_id}/suggested'
method='GET'
diff --git a/web/app/components/develop/template/template_advanced_chat.zh.mdx b/web/app/components/develop/template/template_advanced_chat.zh.mdx
index 6d1876e4d14..f8d59349747 100755
--- a/web/app/components/develop/template/template_advanced_chat.zh.mdx
+++ b/web/app/components/develop/template/template_advanced_chat.zh.mdx
@@ -493,6 +493,71 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
---
+<Heading
+ url='/app/feedbacks'
+ method='GET'
+ title='获取APP的消息点赞和反馈'
+ name='#app-feedbacks'
+/>
+<Row>
+ <Col>
+ 获取应用的终端用户反馈、点赞。
+
+ ### Query
+ <Properties>
+ <Property name='page' type='string' key='page'>
+ (选填)分页,默认值:1
+ </Property>
+ </Properties>
+
+ <Properties>
+ <Property name='limit' type='string' key='limit'>
+ (选填)每页数量,默认值:20
+ </Property>
+ </Properties>
+
+ ### Response
+ - `data` (List) 返回该APP的点赞、反馈列表。
+ </Col>
+ <Col sticky>
+
+ <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
+
+ ```bash {{ title: 'cURL' }}
+ curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
+ --header 'Authorization: Bearer {api_key}' \
+ --header 'Content-Type: application/json'
+ ```
+
+ </CodeGroup>
+
+ <CodeGroup title="Response">
+ ```json {{ title: 'Response' }}
+ {
+ "data": [
+ {
+ "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
+ "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
+ "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
+ "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
+ "rating": "like",
+ "content": "message feedback information-3",
+ "from_source": "user",
+ "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
+ "from_account_id": null,
+ "created_at": "2025-04-24T09:24:38",
+ "updated_at": "2025-04-24T09:24:38"
+ }
+ ]
+ }
+
+ ```
+ </CodeGroup>
+ </Col>
+</Row>
+
+---
+
<Heading
url='/messages/{message_id}/suggested'
method='GET'
diff --git a/web/app/components/develop/template/template_chat.en.mdx b/web/app/components/develop/template/template_chat.en.mdx
index 2386eed0bc3..04f50602def 100644
--- a/web/app/components/develop/template/template_chat.en.mdx
+++ b/web/app/components/develop/template/template_chat.en.mdx
@@ -450,6 +450,69 @@ Chat applications support session persistence, allowing previous chat history to
---
+<Heading
+ url='/app/feedbacks'
+ method='GET'
+ title='Get feedbacks of application'
+ name='#app-feedbacks'
+/>
+<Row>
+ <Col>
+ Get application's feedbacks.
+
+ ### Query
+ <Properties>
+ <Property name='page' type='string' key='page'>
+ (optional)pagination,default:1
+ </Property>
+ </Properties>
+
+ <Properties>
+ <Property name='limit' type='string' key='limit'>
+ (optional) records per page default:20
+ </Property>
+ </Properties>
+
+ ### Response
+ - `data` (List) return apps feedback list.
+ </Col>
+ <Col sticky>
+
+ <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
+
+ ```bash {{ title: 'cURL' }}
+ curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
+ --header 'Authorization: Bearer {api_key}' \
+ --header 'Content-Type: application/json'
+ ```
+
+ </CodeGroup>
+
+ <CodeGroup title="Response">
+ ```json {{ title: 'Response' }}
+ {
+ "data": [
+ {
+ "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
+ "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
+ "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
+ "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
+ "rating": "like",
+ "content": "message feedback information-3",
+ "from_source": "user",
+ "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
+ "from_account_id": null,
+ "created_at": "2025-04-24T09:24:38",
+ "updated_at": "2025-04-24T09:24:38"
+ }
+ ]
+ }
+ ```
+ </CodeGroup>
+ </Col>
+</Row>
+---
+
<Heading
url='/messages/{message_id}/suggested'
method='GET'
diff --git a/web/app/components/develop/template/template_chat.ja.mdx b/web/app/components/develop/template/template_chat.ja.mdx
index 86ad9d21f24..069efda9824 100644
--- a/web/app/components/develop/template/template_chat.ja.mdx
+++ b/web/app/components/develop/template/template_chat.ja.mdx
@@ -450,6 +450,70 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
---
+<Heading
+ url='/app/feedbacks'
+ method='GET'
+ title='アプリのメッセージの「いいね」とフィードバックを取得'
+ name='#app-feedbacks'
+/>
+<Row>
+ <Col>
+ アプリのエンドユーザーからのフィードバックや「いいね」を取得します。
+
+ ### クエリ
+ <Properties>
+ <Property name='page' type='string' key='page'>
+ (任意)ページ番号。デフォルト値:1
+ </Property>
+ </Properties>
+
+ <Properties>
+ <Property name='limit' type='string' key='limit'>
+ (任意)1ページあたりの件数。デフォルト値:20
+ </Property>
+ </Properties>
+
+ ### レスポンス
+ - `data` (リスト) このアプリの「いいね」とフィードバックの一覧を返します。
+ </Col>
+ <Col sticky>
+
+ <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
+
+ ```bash {{ title: 'cURL' }}
+ curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
+ --header 'Authorization: Bearer {api_key}' \
+ --header 'Content-Type: application/json'
+ ```
+
+ </CodeGroup>
+
+ <CodeGroup title="Response">
+ ```json {{ title: 'Response' }}
+ {
+ "data": [
+ {
+ "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
+ "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
+ "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
+ "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
+ "rating": "like",
+ "content": "message feedback information-3",
+ "from_source": "user",
+ "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
+ "from_account_id": null,
+ "created_at": "2025-04-24T09:24:38",
+ "updated_at": "2025-04-24T09:24:38"
+ }
+ ]
+ }
+ ```
+ </CodeGroup>
+ </Col>
+</Row>
+---
+
+
<Heading
url='/messages/{message_id}/suggested'
method='GET'
diff --git a/web/app/components/develop/template/template_chat.zh.mdx b/web/app/components/develop/template/template_chat.zh.mdx
index c63f8d1c880..99c9876546d 100644
--- a/web/app/components/develop/template/template_chat.zh.mdx
+++ b/web/app/components/develop/template/template_chat.zh.mdx
@@ -464,6 +464,69 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
---
+<Heading
+ url='/app/feedbacks'
+ method='GET'
+ title='获取APP的消息点赞和反馈'
+ name='#app-feedbacks'
+/>
+<Row>
+ <Col>
+ 获取应用的终端用户反馈、点赞。
+
+ ### Query
+ <Properties>
+ <Property name='page' type='string' key='page'>
+ (选填)分页,默认值:1
+ </Property>
+ </Properties>
+
+ <Properties>
+ <Property name='limit' type='string' key='limit'>
+ (选填)每页数量,默认值:20
+ </Property>
+ </Properties>
+
+ ### Response
+ - `data` (List) 返回该APP的点赞、反馈列表。
+ </Col>
+ <Col sticky>
+
+ <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
+
+ ```bash {{ title: 'cURL' }}
+ curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
+ --header 'Authorization: Bearer {api_key}' \
+ --header 'Content-Type: application/json'
+ ```
+
+ </CodeGroup>
+
+ <CodeGroup title="Response">
+ ```json {{ title: 'Response' }}
+ {
+ "data": [
+ {
+ "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
+ "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
+ "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
+ "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
+ "rating": "like",
+ "content": "message feedback information-3",
+ "from_source": "user",
+ "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
+ "from_account_id": null,
+ "created_at": "2025-04-24T09:24:38",
+ "updated_at": "2025-04-24T09:24:38"
+ }
+ ]
+ }
+ ```
+ </CodeGroup>
+ </Col>
+</Row>
+---
+
<Heading
url='/messages/{message_id}/suggested'
method='GET'