<span id="查询web应用反馈统计"></span>

# Get Web App feedback statistics

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Read total feedback and rating distribution for the target Web App.


```http
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agents/{agent_id}/webapp/feedback/stats
```

<span id="调用前准备"></span>

## Before you call this API

Set `BASE_URL` to the product API prefix `https://api.moi.matrixorigin.cn/v5`; use the corresponding product API URL for a dedicated deployment.

[Prepare publication management identity and objects](objects.md#prepare).

<span id="请求"></span>

## Request

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Request example

```bash
curl --request GET \
  "$BASE_URL/workspaces/$WORKSPACE_ID/agents/$AGENT_ID/webapp/feedback/stats" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"
```

:::::
:::::{tab-item} Parameters

| Parameter | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | Path | string | Yes | Publication workspace ID in the same environment. |
| `agent_id` | Path | string | Yes | Target agent ID. |

Statistics cover this Web App's feedback collection. This entry point has no rating or date filter contract. Do not treat these statistics as the total for a preceding filtered page.

:::::
::::::
:::::::

<span id="成功响应"></span>

## Successful response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": 0,
  "data": {
    "total": 1,
    "by_rating": {
      "up": 1,
      "down": 0,
      "neutral": 0
    }
  }
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | Success code. |
| `data` | object | [Corresponding object](objects.md#responses). |

:::::
::::::
:::::::

<span id="错误响应"></span>

## Error responses

[Errors and rereads](lifecycle.md#errors) distinguishes parameters, permissions, and write outcomes for this entry point.
