julee.api.routers.documents¶
Documents API router for the julee CEAP system.
This module provides document management API endpoints for retrieving and managing documents in the system.
Routes defined at root level: - GET / - List all documents with pagination - GET /{document_id} - Get document metadata by ID - GET /{document_id}/content - Get document content by ID
These routes are mounted with ‘/documents’ prefix in the main app.
Attributes¶
Functions¶
|
Get a single document by ID with metadata only. |
|
Get the content of a document by ID. |
|
List all documents with pagination. |
Module Contents¶
- async julee.api.routers.documents.get_document(document_id=Path(..., description='Document ID'), repository=Depends(get_document_repository))[source]¶
Get a single document by ID with metadata only.
- Parameters:
document_id (str) – Unique document identifier
repository (julee.domain.repositories.document.DocumentRepository) – Document repository dependency
- Returns:
Document with metadata only (no content)
- Raises:
HTTPException – If document not found or repository operation fails
- Return type:
- async julee.api.routers.documents.get_document_content(document_id=Path(..., description='Document ID'), repository=Depends(get_document_repository))[source]¶
Get the content of a document by ID.
- Parameters:
document_id (str) – Unique document identifier
repository (julee.domain.repositories.document.DocumentRepository) – Document repository dependency
- Returns:
Raw document content with appropriate Content-Type header
- Raises:
HTTPException – If document not found or has no content
- Return type:
fastapi.responses.Response
- async julee.api.routers.documents.list_documents(repository=Depends(get_document_repository))[source]¶
List all documents with pagination.
- Parameters:
repository (julee.domain.repositories.document.DocumentRepository) – Document repository dependency
- Returns:
Paginated list of documents
- Raises:
HTTPException – If repository operation fails
- Return type:
fastapi_pagination.Page[julee.domain.models.document.Document]