Check the current extraction status of a document.
Returns the status, timestamps, and processing details for a document’s most recent extraction job.
Args: document_id: UUID of the document to check status for. session_and_auth: Database session and auth context (injected).
Returns: DocumentStatusResponse: Current status with timestamps and processing details.
Raises: HTTPException 404: Document not found or not accessible by tenant. HTTPException 404: No extraction job exists for this document.
Edge Cases:
API Key authentication. Format: dk_test_
UUID of the document
Current extraction status with timestamps and processing details
Response for job status queries (GET /v1/documents/{job_id}).
Unique identifier for the ingestion job
Current job status
pending, processing, completed, failed GCS path to the document in Cold Vault
Job creation timestamp (ISO 8601)
Processing start timestamp (ISO 8601, null if not started)
Processing completion timestamp (ISO 8601, null if not completed)
Total processing duration in seconds (null if not completed)
Number of pages in the document (null if not processed)
Error details (only present if status is 'failed')