v46

latestOpenAPI 3.0.0MITraw.githubusercontent.com2026-08-0311978417.1 KB
Datasources

Get documents

Get documents in the data source identified by {dsId} in the workspace identified by {wId}.

get/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/documents

Path parameters

wIdstring required

ID of the workspace

spaceIdstring required

ID of the space

dsIdstring required

ID of the data source

Query parameters

document_idsstring[]

The IDs of the documents to fetch (optional)

limitinteger

Limit the number of documents returned

offsetinteger

Offset the returned documents

Response

The documents

totalinteger

Example response

{
  "documents": [
    {
      "data_source_id": "3b7d9f1e5a",
      "created": 1625097600,
      "document_id": "2c4a6e8d0f",
      "title": "Customer Support FAQ",
      "mime_type": "text/md",
      "timestamp": 1625097600,
      "tags": [
        "customer_support",
        "faq"
      ],
      "parent_id": "1234f4567c",
      "parents": [
        "7b9d1f3e5a",
        "2c4a6e8d0f"
      ],
      "source_url": "https://example.com/support/article1",
      "hash": "a1b2c3d4e5",
      "text_size": 1024,
      "chunk_count": 5,
      "chunks": [
        {
          "chunk_id": "9f1d3b5a7c",
          "text": "This is the first chunk of the document.",
          "embedding": [
            0.1,
            0.2,
            0.3,
            0.4
          ]
        },
        {
          "chunk_id": "4a2c6e8b0d",
          "text": "This is the second chunk of the document.",
          "embedding": [
            0.5,
            0.6,
            0.7,
            0.8
          ]
        }
      ],
      "text": "This is the full text content of the document. It contains multiple paragraphs and covers various topics related to customer support.",
      "token_count": 150
    }
  ]
}