{"openapi":"3.1.0","info":{"title":"Sora Financial Reporting & Analytics","description":"Internal customer & transaction reporting warehouse (reporting-bi). REST API for analyst dashboards + embedded MCP interface for the finance AI copilot.","version":"2.3.1"},"paths":{"/api/v1/reports":{"get":{"tags":["reports"],"summary":"List saved reports","operationId":"list_reports_api_v1_reports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/reports/customer-financials":{"get":{"tags":["reports"],"summary":"Customer financials report","description":"Unauth: full customer records incl. SSN, tax ID, bank + routing, balances.","operationId":"customer_financials_api_v1_reports_customer_financials_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/transaction-ledger":{"get":{"tags":["reports"],"summary":"Transaction ledger report","description":"Unauth: ledger rows with the full card PAN + SSN in each enumerated row.","operationId":"transaction_ledger_api_v1_reports_transaction_ledger_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/export":{"post":{"tags":["reports"],"summary":"Export a report (returns download URL)","description":"Unauth POST → JSON containing a public S3 presigned URL.","operationId":"export_report_api_v1_reports_export_post","parameters":[{"name":"report","in":"query","required":false,"schema":{"type":"string","default":"customer_financials","title":"Report"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/schedule":{"post":{"tags":["reports"],"summary":"Schedule a report (authenticated)","operationId":"schedule_report_api_v1_reports_schedule_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{reportId}/subscribers":{"get":{"tags":["reports"],"summary":"Report subscribers (authenticated)","operationId":"report_subscribers_api_v1_reports__reportId__subscribers_get","parameters":[{"name":"reportId","in":"path","required":true,"schema":{"type":"string","title":"Reportid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{reportId}":{"put":{"tags":["reports"],"summary":"Update a report (authenticated)","operationId":"update_report_api_v1_reports__reportId__put","parameters":[{"name":"reportId","in":"path","required":true,"schema":{"type":"string","title":"Reportid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{reportId}/share":{"post":{"tags":["reports"],"summary":"Share a report (authenticated)","operationId":"share_report_api_v1_reports__reportId__share_post","parameters":[{"name":"reportId","in":"path","required":true,"schema":{"type":"string","title":"Reportid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards":{"get":{"tags":["reports"],"summary":"List dashboards (authenticated)","operationId":"dashboards_api_v1_dashboards_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/search":{"get":{"tags":["customers"],"summary":"Search customers","description":"Unauth: search by name/email/SSN; default (no q) returns ALL records.","operationId":"search_api_v1_customers_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{customerId}":{"get":{"tags":["customers"],"summary":"Get customer financial profile","description":"Unauth, never-404: full financial profile for any id (BOLA).","operationId":"get_customer_api_v1_customers__customerId__get","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","examples":["CUST-1000"],"title":"Customerid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{customerId}/statement":{"get":{"tags":["customers"],"summary":"Get customer account statement","description":"Unauth, never-404: statement incl. bank + routing + transactions.","operationId":"get_statement_api_v1_customers__customerId__statement_get","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","examples":["CUST-1000"],"title":"Customerid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users":{"get":{"tags":["customers"],"summary":"List reporting users (authenticated)","operationId":"users_api_v1_users_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections":{"get":{"tags":["customers"],"summary":"Warehouse connections (authenticated)","operationId":"connections_api_v1_connections_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit-log":{"get":{"tags":["customers"],"summary":"Audit log (authenticated)","operationId":"audit_log_api_v1_audit_log_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/actuator/env":{"get":{"tags":["admin"],"summary":"Spring-style environment dump","description":"Unauth: leaks warehouse DB URL, jwt_secret, sk_live key, AWS keys.","operationId":"actuator_env_actuator_env_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/datasources/fetch":{"get":{"tags":["admin"],"summary":"Fetch a remote data source","description":"Unauth, SSRF-prone: a BI tool fetching an arbitrary remote data-source URL.","operationId":"datasource_fetch_api_v1_datasources_fetch_get","parameters":[{"name":"url","in":"query","required":false,"schema":{"type":"string","default":"https://example.com/data.csv","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reports/purge":{"post":{"tags":["admin"],"summary":"Purge reports (admin)","description":"Sensitive admin action → 403 (sensitive-non-2XX signal).","operationId":"purge_reports_admin_reports_purge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/settings":{"get":{"tags":["admin"],"summary":"Admin settings (authenticated)","operationId":"admin_settings_api_v1_admin_settings_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"post":{"tags":["mcp"],"summary":"MCP JSON-RPC endpoint (combined)","description":"Combined MCP endpoint: dispatch by the `method` field in the JSON-RPC body.","operationId":"mcp_combined_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/tools/list":{"post":{"tags":["mcp","mcp"],"summary":"MCP tools/list","operationId":"handler_mcp_tools_list_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/tools/call":{"post":{"tags":["mcp","mcp"],"summary":"MCP tools/call (zero-arg → customer financials)","operationId":"handler_mcp_tools_call_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/resources/list":{"post":{"tags":["mcp","mcp"],"summary":"MCP resources/list","operationId":"handler_mcp_resources_list_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/resources/read":{"post":{"tags":["mcp","mcp"],"summary":"MCP resources/read (zero-arg → nightly customer export)","operationId":"handler_mcp_resources_read_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/prompts/list":{"post":{"tags":["mcp","mcp"],"summary":"MCP prompts/list","operationId":"handler_mcp_prompts_list_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}