Document Ingestion and Management
Ingest Files
Ingest files or directories into your R2R system:Response
Response
object
The response from the R2R system after ingesting the files.
Array<string | File | { path: string; name: string }>
required
An array of file paths, File objects, or objects with path and name properties to ingest.
object
Optional[Union[dict, ChunkingConfig]]
The ingestion config override parameter enables developers to customize their R2R chunking strategy at runtime.
Update Files
Update existing documents:Response
Response
object
The response from the R2R system after updating the files.
Array<File | { path: string; name: string }>
required
An array of File objects or objects with path and name properties to update.
object
required
Array<string>
required
An array of document IDs corresponding to the files being updated.
Array<Record<string, any>>
An optional array of metadata objects for the updated files.
Record<string, any>
The ingestion config override parameter enables developers to customize their R2R chunking strategy at runtime.
Documents Overview
Retrieve high-level document information, restricted to user files, except when called by a superuser where it will then return results from over all users:Response
Response
Array<object>
An array of objects containing document information.
Array<string>
An optional array of document IDs to filter the overview.
Document Chunks
Fetch chunks for a particular document:Response
Response
Array<object>
An array of objects containing chunk information.
string
required
The ID of the document to retrieve chunks for.
Delete Documents
Delete a document by its ID:Response
Response
object
The response from the R2R system after successfully deleting the documents.
{ [key: string]: string | string[] }
required
A list of logical filters to perform over input documents fields which identifies the unique set of documents to delete (e.g.,
{"document_id": {"$eq": "9fbe403b-c11c-5aae-8ade-ef22980c3ad1"}}). Logical operations might include variables such as "user_id" or "title" and filters like neq, gte, etc.
