List Documents
This method allows you to list all for documents in an index.
Each 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
after
before
limit
offset
order
set_num_objects
state
data_source_id
origin_name
Successful Response
{
"object": "string",
"has_more": false,
"num_objects": 0,
"data": [
{
"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
}
],
"first_id": "string",
"last_id": "string"
}
Object type, which is always list.
True, if the server may have more objects than returned in the response.
Total number of objects that match the request. Note that this field is populated only if requested by the user (see set_num_objects request parameter).
Document.
ID of the first element in the list (if any)
ID of the last element in the list (if any)
Invalid knowledge base ID.
An invalid ID was passed for paginating results.
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