Skip to main content
GET
/
datasets
/
{dataset_id}
/
documents
Error
A valid request URL is required to generate request examples
{
  "data": [
    {
      "id": "a8e0e5b5-78c6-4130-a5ce-25feb0e0b4ac",
      "position": 1,
      "data_source_type": "upload_file",
      "data_source_info": {
        "upload_file_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      },
      "data_source_detail_dict": {
        "upload_file": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "name": "guide.txt",
          "size": 2048,
          "extension": "txt",
          "mime_type": "text/plain",
          "created_by": "ad313dd6-ef04-4dd1-a5b0-c0f0b9e2e7e4",
          "created_at": 1741267200
        }
      },
      "dataset_process_rule_id": "e1f2a3b4-c5d6-7890-ef12-345678901234",
      "name": "guide.txt",
      "created_from": "api",
      "created_by": "ad313dd6-ef04-4dd1-a5b0-c0f0b9e2e7e4",
      "created_at": 1741267200,
      "tokens": 512,
      "indexing_status": "completed",
      "error": null,
      "enabled": true,
      "disabled_at": null,
      "disabled_by": null,
      "archived": false,
      "display_status": "available",
      "word_count": 350,
      "hit_count": 0,
      "doc_form": "text_model",
      "doc_metadata": [],
      "summary_index_status": null,
      "need_summary": false
    }
  ],
  "has_more": false,
  "limit": 20,
  "total": 1,
  "page": 1
}

Documentation Index

Fetch the complete documentation index at: https://docs.dify.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer. Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.

Path Parameters

dataset_id
string<uuid>
required

Knowledge base ID.

Query Parameters

page
integer
default:1

Page number to retrieve.

limit
integer
default:20

Number of items per page. Server caps at 100.

keyword
string

Search keyword to filter by document name.

status
enum<string>

Filter by display status.

Available options:
queuing,
indexing,
paused,
error,
available,
disabled,
archived

Response

List of documents.

data
object[]

Array of knowledge base objects.

has_more
boolean

Whether more items exist on the next page.

limit
integer

Number of items per page.

total
integer

Total number of matching items.

page
integer

Current page number.