v2

latestOpenAPI 3.1.02026-07-2670186350.6 KB
knowledge

Get Document By Key

Get a document from a knowledge base by its key

get/knowledge/{knowledge_base_id}/documents/{document_key}

Path parameters

knowledge_base_idstring uuid required

The id of the knowledge base

The id of the knowledge base

document_keystring required

The key of the document to retrieve

The key of the document to retrieve

Response

Successful Response

idstring uuid required

The id of the document

keystring required

The key of the document

metadataobject nullable

The metadata of the document

Example response

{
  "key": "paris_123",
  "segments": [
    {
      "content": "The capital of France is Paris.",
      "id": "123e4567-e89b-12d3-a456-426614174000"
    },
    {
      "content": "Paris is known for the Eiffel Tower.",
      "id": "123e4567-e89b-12d3-a456-426614174001"
    }
  ],
  "metadata": {
    "category": "product",
    "price": 100
  }
}