GET
/datasets/{dataset_id}/documentsList Documents
Returns a paginated list of documents in a knowledge base.
dataset_idstringrequired
Knowledge base ID, from [List Knowledge Bases](/en/api-reference/knowledge-bases/list-knowledge-bases). For a scoped key, [copy the ID from the Dify URL](/en/api-reference/guides/knowledge#knowledge-base-id).
pageintegeroptional
Page number. Values below `1` are treated as `1`.
limitintegeroptional
Number of items per page. Server caps at `100`, and values below `1` are treated as `1`.
keywordstringoptional
Search keyword to filter by document name.
statusstringoptional
Filter by display status.
200List of documents.
dataarray<object>optional
Array of document objects.
has_morebooleanoptional
Whether more items exist on the next page.
limitintegeroptional
Number of items per page.
pageintegeroptional
Current page number.
totalintegeroptional
Total number of matching items.
403- `forbidden` : Knowledge base API access is not enabled.
- `forbidden` : The API key is scoped to specific knowledge bases, and this knowledge base is not one of them.
One documented failure
forbiddenDataset api access is not enabled.
forbidden (api access)
404`not_found` : Knowledge base not found.
One documented failure
not_foundDataset not found.
not_found
Error handling
A 403 is returned: - forbidden : Knowledge base API access is not enabled.
forbidden: The API key is scoped to specific knowledge bases, and this knowledge base is not one of them. A 404 is returned:not_found: Knowledge base not found.