Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

Retrieve and Export Feedback with the REST API

Export the feedback users gave on pipeline answers, read individual feedback entries, and get feedback statistics from your own code.


About This Task​

Feedback endpoints identify the workspace and the pipeline by their IDs, which are UUIDs, not by their names. You can get the pipeline ID with the List Pipelines endpoint. To collect feedback in your app, see Collect Feedback.

Prerequisites​

You need an API key. For details, see Generate API Keys.

Export All Feedback​

Use the Export Feedback endpoint to download all the feedback of a pipeline. Replace <WORKSPACE_ID> and <PIPELINE_ID> with the IDs and <YOUR_API_KEY> with your Haystack Platform API key:

curl --request GET \
--url https://api.cloud.deepset.ai/api/v2/workspaces/<WORKSPACE_ID>/pipelines/<PIPELINE_ID>/feedback/export \
--header 'authorization: Bearer <YOUR_API_KEY>' \
--output feedback.csv

Get Detailed Feedback​

Use the Get Paginated Feedback endpoint to read feedback entries in batches. This request returns the 10 most recent entries:

curl --request GET \
--url 'https://api.cloud.deepset.ai/api/v2/workspaces/<WORKSPACE_ID>/pipelines/<PIPELINE_ID>/feedback?limit=10&offset=0&field=created_at&order=DESC' \
--header 'accept: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>'

Use these query parameters to control the result:

  • limit: The number of entries to return. The default is 10, and the maximum is 1000.
  • offset: The number of entries to skip. Increase it by limit to get the next page.
  • after: Return only entries created after this URL-encoded ISO datetime.
  • field and order: Sort by created_at, search_history/score, or search_history/search_query, in ASC or DESC order.
  • filter: An OData filter with exact match and AND operations. For example, filter=score eq 1. You can filter on api_key, comment, created_by, query_id, result_id, score, search_history/search_query, and tags/tag_id.

Get Feedback Statistics​

Use the Get Pipeline Feedback Stats endpoint to get statistics about a pipeline's feedback, such as the number of entries, the number of users, and the average accuracy:

curl --request GET \
--url https://api.cloud.deepset.ai/api/v2/workspaces/<WORKSPACE_ID>/pipelines/<PIPELINE_ID>/feedback/stats \
--header 'accept: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>'