Get Document
This method allows you to get a document in an index using its ID.
The document contains metadata, which tells you from which data source the document was retrieved (if any), what is the status of the document (if it has already been indexed, if indexing is pending, or if indexing may have failed), and what the system inferred to be the type of the document.
knowledge_base_id
index_id
document_id
Successful Response
{
"origin_name": "string",
"origin_ref": "string",
"custom_origin_name": "string",
"custom_origin_ref": "string",
"id": "string",
"object": "string",
"state": "string",
"media_type": "string",
"knowledge_base_id": "string",
"index_id": "string",
"data_source_id": "string",
"created_at": 0,
"last_embedded_at": 0,
"last_indexed_by_id": "string",
"size_bytes": 0,
"hash_sha256": "string",
"reindexing_needed": false
}
Name of the original document, if one was provided during indexing.
Link to the original document, if one was available during indexing.
Display name for the document. If a custom override was configured, this contains the override value; otherwise, it falls back to origin_name.
Reference URL for the document. If a custom override was configured, this contains the override value; otherwise, it falls back to origin_ref.
ID of the document.
Object type, which is always document.
Indexing state of the document.
Media type detected for the document.
ID of the Knowledge Dase of the document.
ID of the index.
ID of the data source from which the document originates (if backed by a data source).
Unix timestamp (in seconds) when the document was added to the index.
Unix timestamp (in seconds) when the document was last embedded in the index.
Most recent indexing job affecting this document. Updated once the state of this indexing becomes INDEXED.
Size in bytes of the document.
SHA256 hash of the document.
If set, the document embeddings require an indexing to guarantee they are in sync with any updates from the data source.
Invalid knowledge base or document ID.
Validation Error
{
"detail": [
{
"loc": [
{}
],
"msg": "string",
"type": "string"
}
]
}
detail
curl -H 'Authorization: <value>' https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}/indexes/{index_id}/documents/{document_id}