add endpoint of get feedbacks (#18697)
Co-authored-by: lizb <lizb@sugon.com>
This commit is contained in:
@@ -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'
|
||||
|
Reference in New Issue
Block a user