A Collection
in R2R is a logical grouping mechanism that enables organization and access control for documents and their associated chunks. Collections serve as a fundamental unit for managing permissions, sharing content, and organizing related documents across users and teams.
Collections in R2R provide:
- Organizational structure for documents
- Access control and permissions management
- Group-based content sharing
- Document categorization and management
- User collaboration capabilities
Available Endpoints
Method | Endpoint | Description |
---|---|---|
POST | /collections | Create a new collection |
GET | /collections | List collections with pagination and filtering |
GET | /collections/{id} | Get details of a specific collection |
POST | /collections/{id} | Update an existing collection |
DELETE | /collections/{id} | Delete a specific collection |
GET | /collections/{id}/documents | List documents in a collection |
POST | /collections/{id}/documents/{document_id} | Add a document to a collection |
DELETE | /collections/{id}/documents/{document_id} | Remove a document from a collection |
POST | /collections/{id}/extract | Extract entities and relationships for all unprocessed documents |
GET | /collections/{id}/users | List users with access to a collection |
POST | /collections/{id}/users/{user_id} | Add a user to a collection |
DELETE | /collections/{id}/users/{user_id} | Remove a user from a collection |
GET | /collections/name/{collection_name} | Get collection by name |