{"message":"HR Task Management API","description":"Email processing system that extracts structured data (persons, tasks, subtasks) and manages HR workflows","version":"2.0.0","endpoints":{"persons":{"get_person":{"method":"GET","path":"/api/person/{person_id}","description":"Retrieve person details (basic identity from Person table only - prenom, nomUsuel, client_id, status, employee_id)","auth":"Required (JWT)","returns":"PersonResponse (Person table fields only - use /person/{person_id}/tasks to get extracted data)"},"update_person":{"method":"PATCH","path":"/api/person/{person_id}","description":"Update person data (client_id, status, prenom, nomUsuel - Person table fields only)","auth":"Required (JWT)","body":"PersonUpdateRequest"},"get_person_tasks":{"method":"GET","path":"/api/person/{person_id}/tasks","description":"Get all tasks and subtasks for a person with required fields and completion status","auth":"Required (JWT)","returns":"Tasks with subtasks, required_fields, and can_complete flags"}},"tasks":{"update_task":{"method":"PATCH","path":"/api/tasks/{task_id}","description":"Update task information or status","auth":"Required (JWT)","body":"TaskUpdateRequest"},"update_subtask":{"method":"PATCH","path":"/api/tasks/subtasks/{subtask_id}","description":"Update subtask information or status","auth":"Required (JWT)","body":"SubtaskUpdateRequest"},"get_active_tasks":{"method":"GET","path":"/api/tasks/active","description":"Main UI endpoint: Get all tasks with person data, subtasks, missing fields, and documents","auth":"Required (JWT)","returns":"ConfirmedTasksListResponse with task.extracted_data (source of truth), ready_to_submit flags, and document links"},"get_active_tasks_debug":{"method":"GET","path":"/api/tasks/active/debug","description":"DEBUG: Get active tasks without Pydantic validation","auth":"Required (JWT)","returns":"Raw JSON with debug info and task data"}},"documents":{"download_document":{"method":"GET","path":"/api/persons/{person_id}/documents/{document_id}/download","description":"Download attachment file. Validates document belongs to person","auth":"Required (JWT)","returns":"File download (StreamingResponse)"}},"authentication":{"validate_token":{"method":"POST","path":"/api/validate-token","description":"Validate JWT token with Azure AD JWKS verification","auth":"None","body":"TokenValidationRequest {token: string}","returns":"TokenValidationResponse with decoded claims (sub, sid, dom, pf, exp, iss, aud)"}},"statistics":{"get_client_statistics":{"method":"GET","path":"/api/statistics/clients","description":"Get statistics for all authorized clients (person count and task count per client)","auth":"Required (JWT)","returns":"ClientStatisticsResponse with statistics for each client"}},"health":{"health":{"method":"GET","path":"/health","description":"Comprehensive health check (database, Databricks token, session store)"},"health_db":{"method":"GET","path":"/health/db","description":"Database connection health check"},"health_db_table_list":{"method":"GET","path":"/health/db_table_list","description":"Database connection check with table listing"},"health_connections":{"method":"GET","path":"/health/connections","description":"Show database connections from all workers (PostgreSQL only)"},"slow_query":{"method":"GET","path":"/health/slow-query","description":"Test endpoint with 10-second query (PostgreSQL only)"}}}}