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_document([document_id, repository])

Get a single document by ID with metadata only.

get_document_content([document_id, repository])

Get the content of a document by ID.

list_documents([repository])

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:
Returns:

Document with metadata only (no content)

Raises:

HTTPException – If document not found or repository operation fails

Return type:

julee.domain.models.document.Document

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:
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]

julee.api.routers.documents.logger[source]
julee.api.routers.documents.router[source]