List Query Records
Lists the query records of a knowledge base, newest first. Each Run Query call saves a record once its stream opens, including a run that then fails, unless the client disconnected or the run failed with RETRIEVAL_EXECUTION_LEASE_LOST.
The list contains the records this key produced plus records produced by workflows, agents, MCP clients, and other API keys. A separate key for each tenant does not limit this list to that tenant’s runs. Retrieval tests run in Dify are never listed.
source is the only filter. Capture the x-query-run-id header of Run Query at query time to reach one run again.
For how to read a run’s chunks, conflicts, and missing chunks together, see Investigate an Answer.
Authorization
Path parameters
…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.Query parameters
service_api for API keys, workflow for workflow nodes, agent or mcp for those clients. retrieval_test is accepted but returns no records through this API.retrieval_testworkflowservice_apiagentmcp