{"openapi":"3.1.0","info":{"title":"Myriade BI API","description":"Backend API for Myriade analytics solution","version":"2.352.1"},"paths":{"/api/auth":{"get":{"tags":["auth"],"summary":"Auth","description":"Get OAuth authorization URL.\n\n`screen_hint` (\"sign-in\" or \"sign-up\") is forwarded to the proxy and\non to AuthKit. The frontend passes \"sign-in\" for explicit sign-in\nintents (button clicks, session-expired recovery); leaving it unset\nlets the proxy default to \"sign-up\" for fresh trial visitors.","operationId":"auth_api_auth_get","parameters":[{"name":"prompt","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"}},{"name":"screen_hint","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screen Hint"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/blocked-email-restart":{"get":{"tags":["auth"],"summary":"Auth Blocked Email Restart","description":"Forward to the proxy's blocked-email-restart endpoint.\n\nThe /blocked-email page calls this to break the silent re-auth loop\nAuthKit would otherwise produce: navigates through WorkOS logout (to\nclear the session cookie) and lands the user on /login, where a\nsessionStorage flag triggers an immediate fresh sign-up.","operationId":"auth_blocked_email_restart_api_auth_blocked_email_restart_get","parameters":[{"name":"sid","in":"query","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/complete":{"get":{"tags":["auth"],"summary":"Auth Complete","description":"Complete OAuth flow using intermediate callback pattern.\nReceives temporary token from proxy and exchanges it for auth data.","operationId":"auth_complete_api_auth_complete_get","parameters":[{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},{"name":"myriade_return_url","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Myriade Return Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Logout and clear session.","operationId":"logout_api_auth_logout_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user":{"get":{"tags":["auth"],"summary":"Get User","description":"Get current user information.","operationId":"get_user_api_user_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Delete Own Account","description":"Self-service account erasure (GDPR / SOC 2 P1.1).\n\nAnonymises the caller's local user record and best-effort removes them\nfrom the upstream WorkOS organisation. The session cookie is cleared so\nthe caller is logged out immediately. Idempotent: a second call on an\nalready-anonymised user returns 204.","operationId":"delete_own_account_api_user_delete","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/credits":{"get":{"tags":["auth"],"summary":"Proxy Credits","description":"Proxy credits request to auth service.","operationId":"proxy_credits_api_user_credits_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/server-url":{"get":{"tags":["mcp"],"summary":"Get Mcp Server Url","description":"Return the MCP server URL (derived from HOST config).","operationId":"get_mcp_server_url_api_mcp_server_url_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/tokens":{"post":{"tags":["mcp"],"summary":"Create Mcp Token","description":"Create a new MCP API token. The plaintext token is returned only once.","operationId":"create_mcp_token_api_mcp_tokens_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTokenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mcp"],"summary":"List Mcp Tokens","description":"List all MCP tokens for the authenticated organisation.","operationId":"list_mcp_tokens_api_mcp_tokens_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/tokens/{token_id}":{"delete":{"tags":["mcp"],"summary":"Revoke Mcp Token","description":"Revoke an MCP token (soft-delete by setting is_active=False).","operationId":"revoke_mcp_token_api_mcp_tokens__token_id__delete","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Token Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/report-alerts/slack-integrations":{"get":{"tags":["automation"],"summary":"Report Slack Integrations","operationId":"report_slack_integrations_api_report_alerts_slack_integrations_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/report-alerts/slack-integrations/{integration_id}/channels":{"get":{"tags":["automation"],"summary":"Report Slack Channels","operationId":"report_slack_channels_api_report_alerts_slack_integrations__integration_id__channels_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/automations":{"get":{"tags":["automation"],"summary":"List Automations","description":"List all automations for a database.","operationId":"list_automations_api_databases__database_id__automations_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["automation"],"summary":"Create Automation","description":"Create a new automation.","operationId":"create_automation_api_databases__database_id__automations_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/automations":{"get":{"tags":["automation"],"summary":"List Organization Automations","description":"List automations across every database the user can access.\n\nItems keep the per-database shape, plus ``database_id``/``database_name``\nfor the org-wide UI facet. ``database_id`` narrows to one database.","operationId":"list_organization_automations_api_organization_automations_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["automation"],"summary":"Create Organization Automation","description":"Create an organisation-level automation (no bound database).\n\nIts runs open an unbound conversation and the agent routes across the\norg's databases.","operationId":"create_organization_automation_api_organization_automations_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/automations/preview-next-run":{"post":{"tags":["automation"],"summary":"Preview Next Run","description":"Compute the next run time for a candidate schedule (no persistence).","operationId":"preview_next_run_api_automations_preview_next_run_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/report-templates":{"get":{"tags":["automation"],"summary":"List Report Templates","description":"Catalog of activable report templates, annotated with activation state.","operationId":"list_report_templates_api_databases__database_id__report_templates_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/report-templates":{"get":{"tags":["automation"],"summary":"List Organization Report Templates","description":"Template catalog annotated with activations across accessible databases.\n\nEach template keeps the per-database shape; ``automations`` lists every\nlive activation (one per database, each carrying ``database_id`` and\n``database_name``). ``automation`` stays populated when the scope narrows\nto exactly one database (``database_id`` param) for shape compatibility.","operationId":"list_organization_report_templates_api_organization_report_templates_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/report-templates/{template_key}":{"get":{"tags":["automation"],"summary":"Get Organization Report Template","description":"Full template, prompt included, with its activations across accessible\ndatabases — the org-altitude twin of the per-database detail endpoint.","operationId":"get_organization_report_template_api_organization_report_templates__template_key__get","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/report-templates/{template_key}":{"get":{"tags":["automation"],"summary":"Get Report Template","description":"Full template, prompt included — so users can read what a managed report\nactually does, both before activating it and afterwards (the automation's\nstored prompt is only a placeholder, the real one lives in the catalog).","operationId":"get_report_template_api_databases__database_id__report_templates__template_key__get","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/report-templates/{template_key}/activate":{"post":{"tags":["automation"],"summary":"Activate Report Template","description":"Activate a curated report template on this database.\n\nCreates the target report document and the automation (schedule from the\ntemplate's default), then fires the first run immediately so the user\ngets feedback — including missing-prerequisite feedback — in minutes,\nnot at the next scheduled slot.","operationId":"activate_report_template_api_databases__database_id__report_templates__template_key__activate_post","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/automation":{"get":{"tags":["automation"],"summary":"Get Document Automation","description":"The automation maintaining this report, or ``null``.\n\nCarries who receives its run email — how many people besides the creator\nand whether the caller is one of them — for the report page. Readable by\nwhoever can read the report.","operationId":"get_document_automation_api_documents__document_id__automation_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/automations/{automation_id}":{"get":{"tags":["automation"],"summary":"Get Automation","description":"Get automation details.","operationId":"get_automation_api_automations__automation_id__get","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["automation"],"summary":"Update Automation","description":"Update an automation.","operationId":"update_automation_api_automations__automation_id__put","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["automation"],"summary":"Delete Automation","description":"Delete an automation.","operationId":"delete_automation_api_automations__automation_id__delete","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/automations/{automation_id}/accept":{"post":{"tags":["automation"],"summary":"Accept Automation Proposal","description":"Activate an automation the chat agent proposed for a report.","operationId":"accept_automation_proposal_api_automations__automation_id__accept_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/automations/{automation_id}/dismiss":{"post":{"tags":["automation"],"summary":"Dismiss Automation Proposal","description":"Keep the decision, while removing the proposal from active surfaces.","operationId":"dismiss_automation_proposal_api_automations__automation_id__dismiss_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/automations/{automation_id}/toggle":{"post":{"tags":["automation"],"summary":"Toggle Automation","description":"Toggle automation enabled state.","operationId":"toggle_automation_api_automations__automation_id__toggle_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/automations/{automation_id}/trigger":{"post":{"tags":["automation"],"summary":"Trigger Automation","description":"Manually trigger an automation run.","operationId":"trigger_automation_api_automations__automation_id__trigger_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/automations/{automation_id}/runs":{"get":{"tags":["automation"],"summary":"List Automation Runs","description":"Get run history for an automation.","operationId":"list_automation_runs_api_automations__automation_id__runs_get","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/runs":{"post":{"tags":["audit"],"summary":"Trigger Run","description":"Trigger a run. Returns immediately with 202; the run executes in\nthe background. Poll the audit doc / new docs in `/reports` to see the\nagent's output as it lands.","operationId":"trigger_run_api_audit_runs_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRunCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/map":{"get":{"tags":["audit"],"summary":"Get Map","description":"The organisation's value map: zones, levers, counts, synthesis, runs.","operationId":"get_map_api_audit_map_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/domains/{key}":{"get":{"tags":["audit"],"summary":"Get Domain","description":"One domain: its document's synthesis, its zones and their levers.\n\nA label no domain document carries yet (zones only) still has a page.","operationId":"get_domain_api_audit_domains__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/zones/{zone_id}":{"get":{"tags":["audit"],"summary":"Get Zone","description":"One zone: its record, its figures, its levers, its document.","operationId":"get_zone_api_audit_zones__zone_id__get","parameters":[{"name":"zone_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Zone Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/levers/{lever_id}":{"get":{"tags":["audit"],"summary":"Get Lever","description":"One lever: its plan, its zone, its figures, its work item.\n\n``view=true`` (the lever page) records that the person viewed it; a chip\nor a preview fetching the lever passes nothing.","operationId":"get_lever_api_audit_levers__lever_id__get","parameters":[{"name":"lever_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lever Id"}},{"name":"view","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"View"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/levers/{lever_id}/follow-up":{"patch":{"tags":["audit"],"summary":"Set Lever Follow Up","description":"A person moves the lever along: its follow-up status and its note.\nAny active member may (a lever is the team's to-do).","operationId":"set_lever_follow_up_api_audit_levers__lever_id__follow_up_patch","parameters":[{"name":"lever_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lever Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeverFollowUpUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/levers/{lever_id}/assignee":{"put":{"tags":["audit"],"summary":"Set Lever Assignee","description":"Give the lever to a person or a team (assigning grants nothing).","operationId":"set_lever_assignee_api_audit_levers__lever_id__assignee_put","parameters":[{"name":"lever_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lever Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeverAssigneeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/create-checkout-session":{"post":{"tags":["billing"],"summary":"Create Checkout Session","description":"Get link to checkout session.","operationId":"create_checkout_session_api_billing_create_checkout_session_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/catalog/assets":{"get":{"tags":["catalog"],"summary":"Get Catalog Assets","description":"Get all catalog assets for a database.\n\n``include_archived`` surfaces retired definitions, which the catalog hides\nby default: archiving is reversible, so they have to stay reachable\nsomewhere or the only way back would be a database query.","operationId":"get_catalog_assets_api_databases__database_id__catalog_assets_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/catalog/assets":{"get":{"tags":["catalog"],"summary":"Get Org Catalog Assets","description":"Explorer skeleton across every accessible database.\n\nCOLUMN assets are excluded — they dominate the payload and load lazily\nvia /catalogs/assets/{id}/columns once a table is opened.","operationId":"get_org_catalog_assets_api_organization_catalog_assets_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/semantic-models":{"get":{"tags":["catalog"],"summary":"Get Org Semantic Models","description":"The model map (ADR 0110): every live native model the caller may read,\nwith what the map draws — domain, status, declared links, usage. Same\nreader rule as the semantic layer list (terms_readable per connection).","operationId":"get_org_semantic_models_api_organization_semantic_models_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/catalog/tags":{"get":{"tags":["catalog"],"summary":"Get Org Catalog Tags","description":"Tags across every accessible database, stamped with their connection.\n\nTags stay database-scoped rows (attaching one requires the tag and the\nasset to share a database), so each entry carries its\ndatabase_id/database_name for the client to filter on.","operationId":"get_org_catalog_tags_api_organization_catalog_tags_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/columns":{"get":{"tags":["catalog"],"summary":"Get Table Columns","description":"COLUMN assets of one table — the lazy half of the skeleton payload.","operationId":"get_table_columns_api_catalogs_assets__asset_id__columns_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/tables":{"get":{"tags":["catalog"],"summary":"Get Schema Tables","description":"Governed TABLE assets loaded when one SCHEMA node is expanded.","operationId":"get_schema_tables_api_catalogs_assets__asset_id__tables_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}":{"get":{"tags":["catalog"],"summary":"Get Catalog Asset","description":"Hydrate one governed catalog row reached outside the eager skeleton.","operationId":"get_catalog_asset_api_catalogs_assets__asset_id__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["catalog"],"summary":"Update Catalog Asset","description":"Update mutable fields of a catalog asset with validation workflow support.","operationId":"update_catalog_asset_api_catalogs_assets__asset_id__patch","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetUpdate"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/catalog/search":{"get":{"tags":["catalog"],"summary":"Search Org Catalog Assets","description":"Search across every accessible database in one call.\n\nCOLUMN matches are mapped to their parent TABLE on both response modes.\nHydrated pages additionally carry the matching columns in a side channel\nso the columnless explorer can render the hit under that table.","operationId":"search_org_catalog_assets_api_organization_catalog_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"tag_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Tag Ids"}},{"name":"statuses","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Statuses"}},{"name":"has_pending_suggestion","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Has Pending Suggestion"}},{"name":"has_open_questions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Has Open Questions"}},{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"warehouse_database","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warehouse Database"}},{"name":"schema","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema"}},{"name":"response","in":"query","required":false,"schema":{"enum":["ids","assets"],"type":"string","default":"ids","title":"Response"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Page Size"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/catalog/stats":{"get":{"tags":["catalog"],"summary":"Get Org Catalog Stats","description":"Filter-chip counts for the org-wide catalog, computed server-side.\n\nThe skeleton payload has no columns, so the client can no longer count\nthem. Aggregate in SQL so large governed catalogs do not need to load and\nserialize every asset merely to compute six counters.\n\nThe counts are faceted: every chip counts under the OTHER active filters,\nnever under its own. A chip that counted itself would report its own total\nand leave every sibling at zero; one that ignored the rest promised rows\nthe list could not deliver (\"Published 22\" landing on 4 with a tag on).\n\nStatus, pending-suggestion and open-question are already the GROUP BY of\n``_aggregate_db_stat_rows``, so their per-chip exclusion is arithmetic over\nthe returned groups. Tag and asset type narrow the SQL: the semantic layer's\nkind chips (Metrics / Models / Terms) sit in the same band as the counted\nchips, so a count that ignored them would disagree with the list next to\nit.\n\nText search deliberately does NOT reach here: matching it exactly would\nmean replaying search_catalog_page's COLUMN-to-parent fold in the\naggregate, and two copies of that predicate would drift. The client hides\nthe badges while a text query is active instead.","operationId":"get_org_catalog_stats_api_organization_catalog_stats_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"surface","in":"query","required":false,"schema":{"enum":["all","list"],"type":"string","default":"all","title":"Surface"}},{"name":"tag_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Tag Ids"}},{"name":"statuses","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Statuses"}},{"name":"has_pending_suggestion","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Has Pending Suggestion"}},{"name":"has_open_questions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Has Open Questions"}},{"name":"asset_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/catalog/overview":{"get":{"tags":["catalog"],"summary":"Get Org Catalog Overview","description":"Existing catalog-dashboard contract, aggregated under governance.","operationId":"get_org_catalog_overview_api_organization_catalog_overview_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/catalog/search":{"get":{"tags":["catalog"],"summary":"Search Catalog Assets","description":"Search catalog assets by text query and/or filters. Returns only asset IDs.","operationId":"search_catalog_assets_api_databases__database_id__catalog_search_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"asset_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"}},{"name":"tag_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Tag Ids"}},{"name":"statuses","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Statuses"}},{"name":"has_pending_suggestion","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Has Pending Suggestion"}},{"name":"has_open_questions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Has Open Questions"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/suggestions":{"post":{"tags":["catalog"],"summary":"Create Asset Suggestion","description":"Propose a change to a catalog asset. Any user who can SEE the asset may suggest.","operationId":"create_asset_suggestion_api_catalogs_assets__asset_id__suggestions_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/terms/{term_id}/suggestions":{"post":{"tags":["catalog"],"summary":"Create Term Suggestion","description":"Propose a change to an existing term's definition. Any user who can see it may suggest.","operationId":"create_term_suggestion_api_catalogs_terms__term_id__suggestions_post","parameters":[{"name":"term_id","in":"path","required":true,"schema":{"type":"string","title":"Term Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermSuggestionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/catalog/term-suggestions":{"post":{"tags":["catalog"],"summary":"Create New Term Suggestion","description":"Propose a brand-new glossary term. Approving creates it.","operationId":"create_new_term_suggestion_api_databases__database_id__catalog_term_suggestions_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTermSuggestionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/suggestions":{"get":{"tags":["catalog"],"summary":"List Suggestions","description":"Return suggestions on assets/terms the caller can edit, newest first.","operationId":"list_suggestions_api_catalogs_suggestions_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"open","title":"Status"}},{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/suggestions/{suggestion_id}":{"get":{"tags":["catalog"],"summary":"Get Suggestion","operationId":"get_suggestion_api_catalogs_suggestions__suggestion_id__get","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/suggestions/{suggestion_id}/preview-value":{"get":{"tags":["catalog"],"summary":"Get Suggestion Preview Value","description":"Governed value + trend of a definition suggestion's PROPOSED definition —\nthe reviewer's before/after impact, computed with the same gates as the\nasset's `/value` (never stored, per-reader cache).","operationId":"get_suggestion_preview_value_api_catalogs_suggestions__suggestion_id__preview_value_get","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/suggestions/{suggestion_id}/accept":{"post":{"tags":["catalog"],"summary":"Accept Suggestion","description":"Accept a catalog suggestion (apply the proposed change).","operationId":"accept_suggestion_api_catalogs_suggestions__suggestion_id__accept_post","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SuggestionResolve"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/suggestions/{suggestion_id}/reject":{"post":{"tags":["catalog"],"summary":"Reject Suggestion","description":"Reject a catalog suggestion (discard the proposed change).","operationId":"reject_suggestion_api_catalogs_suggestions__suggestion_id__reject_post","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SuggestionResolve"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/preview":{"get":{"tags":["catalog"],"summary":"Get Asset Preview","description":"Get preview data (~10 random rows) for a table asset.","operationId":"get_asset_preview_api_catalogs_assets__asset_id__preview_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":10,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/value":{"get":{"tags":["catalog"],"summary":"Get Asset Value","description":"Governed live value + recent trend for a native metric.\n\nPayload mirrors the frontend ``LiveValue`` contract: ``{queryable, value,\ndelta, grain, trend, sampled_at}``. Non-native targets (dbt metrics,\nterms…) return ``queryable: false`` so the panel quietly hides.","operationId":"get_asset_value_api_catalogs_assets__asset_id__value_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/breakdown":{"get":{"tags":["catalog"],"summary":"Get Asset Value Breakdown","description":"Governed current value of a native metric sliced by one of its declared\ndimensions — the panel's one-click breakdown.\n\nTop segments by magnitude, truncated server-side; deliberately NO \"others\"\nbucket: summing the remainder is wrong for avg/ratio measures.","operationId":"get_asset_value_breakdown_api_catalogs_assets__asset_id__breakdown_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"dimension","in":"query","required":true,"schema":{"type":"string","title":"Dimension"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/metric":{"get":{"tags":["catalog"],"summary":"Get Asset Metric Detail","description":"Detail payload for a native metric asset (the chat panel's data).","operationId":"get_asset_metric_detail_api_catalogs_assets__asset_id__metric_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/sources":{"get":{"tags":["catalog"],"summary":"Get Asset Sources","description":"Get metadata from external sources (DBT, data provider) for an asset.","operationId":"get_asset_sources_api_catalogs_assets__asset_id__sources_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/semantic":{"get":{"tags":["catalog"],"summary":"Get Asset Semantic Detail","description":"Return the dbt MetricFlow definition behind a METRIC / SEMANTIC_MODEL asset.\n\nThe rich definition (dimensions, measures, entities, metric type) is not\nstored on the asset row — it is read back on demand from the project's\nsemantic_manifest. Returns 404 for non-semantic assets or when no manifest\nentry matches.","operationId":"get_asset_semantic_detail_api_catalogs_assets__asset_id__semantic_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/dbt-source":{"get":{"tags":["catalog"],"summary":"Get Asset Dbt Source","description":"Return the dbt source (raw/compiled SQL for models, structured definition\nfor metrics & semantic models) read from the project's manifest.","operationId":"get_asset_dbt_source_api_catalogs_assets__asset_id__dbt_source_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/activities/recent":{"get":{"tags":["catalog"],"summary":"Get Recent Catalog Activities","description":"The catalog journal: latest activity across the caller's databases.\n\nPer-database governance filtering mirrors the listings: on a governed\nconnection, activity on an asset the caller cannot see stays invisible\nhere too — a journal line would leak the asset's name.","operationId":"get_recent_catalog_activities_api_catalogs_activities_recent_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":15,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/assets/{asset_id}/activities":{"get":{"tags":["catalog"],"summary":"Get Asset Activities","description":"Get activity feed for a catalog object (asset or term — one id space).","operationId":"get_asset_activities_api_catalogs_assets__asset_id__activities_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["catalog"],"summary":"Create Asset Activity","description":"Create a new activity (comment) for a catalog object (asset or term).\nIf the content contains @myriade-agent, triggers an agent conversation.","operationId":"create_asset_activity_api_catalogs_assets__asset_id__activities_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/questions":{"get":{"tags":["catalog"],"summary":"List Catalog Questions","description":"Questions the agent asked across the caller's databases, oldest first.\n\nThe inbox review queue reads this next to ``/catalogs/suggestions``: a\nquestion waiting on a person is review work exactly like a proposal is,\nso it is gated the same way — the caller must hold ``catalog_edit`` on the\nquestion's target, on top of being allowed to read it. Glossary terms that\nwere dismissed or archived drop out with their questions.","operationId":"list_catalog_questions_api_catalogs_questions_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"open","title":"Status"}},{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/questions/{activity_id}":{"get":{"tags":["catalog"],"summary":"Get Catalog Question","operationId":"get_catalog_question_api_catalogs_questions__activity_id__get","parameters":[{"name":"activity_id","in":"path","required":true,"schema":{"type":"string","title":"Activity Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/catalog/terms":{"get":{"tags":["catalog"],"summary":"Get Catalog Terms","description":"List catalog terms for a database, paginated and searchable.\n\nWhen ``q`` is provided, terms are searched server-side (full-text on\nPostgres, ILIKE fallback on SQLite) so every term is reachable regardless\nof how many the database has; otherwise terms are returned name-ordered.\nReturns an envelope with ``total`` so the UI can virtualize/scroll.","operationId":"get_catalog_terms_api_databases__database_id__catalog_terms_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["catalog"],"summary":"Create Catalog Term","description":"Create a new catalog term.","operationId":"create_catalog_term_api_databases__database_id__catalog_terms_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/terms/{term_id}":{"get":{"tags":["catalog"],"summary":"Get Catalog Term","description":"Fetch a single catalog term by id. Used by the inline term chip in chat.","operationId":"get_catalog_term_api_catalogs_terms__term_id__get","parameters":[{"name":"term_id","in":"path","required":true,"schema":{"type":"string","title":"Term Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["catalog"],"summary":"Update Catalog Term","description":"Update mutable fields of a catalog term.","operationId":"update_catalog_term_api_catalogs_terms__term_id__patch","parameters":[{"name":"term_id","in":"path","required":true,"schema":{"type":"string","title":"Term Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TermUpdate"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete Catalog Term","description":"Delete a catalog term.","operationId":"delete_catalog_term_api_catalogs_terms__term_id__delete","parameters":[{"name":"term_id","in":"path","required":true,"schema":{"type":"string","title":"Term Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/metrics/{asset_id}":{"get":{"tags":["catalog"],"summary":"Get Catalog Metric","description":"Fetch a single metric by id. Used by the inline metric chip in chat.","operationId":"get_catalog_metric_api_catalogs_metrics__asset_id__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/terms/{term_id}/archive":{"post":{"tags":["catalog"],"summary":"Archive Catalog Term","description":"Retire a definition from the catalog, or bring it back.\n\nDistinct from dismiss: dismissing turns down a proposal that never was,\narchiving withdraws a definition that served.","operationId":"archive_catalog_term_api_catalogs_terms__term_id__archive_post","parameters":[{"name":"term_id","in":"path","required":true,"schema":{"type":"string","title":"Term Id"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Archived"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/terms/{term_id}/dismiss":{"post":{"tags":["catalog"],"summary":"Dismiss Catalog Term","description":"Turn down a draft definition without deleting it.\n\nDeleting would lose the decision: the next review would propose the same\ndefinition again. A dismissed draft is hidden from the catalog and blocks\nthat name from being re-drafted.","operationId":"dismiss_catalog_term_api_catalogs_terms__term_id__dismiss_post","parameters":[{"name":"term_id","in":"path","required":true,"schema":{"type":"string","title":"Term Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/metrics/{asset_id}/dismiss":{"post":{"tags":["catalog"],"summary":"Dismiss Catalog Metric","description":"Turn down a draft metric the agent wrote, as a draft term is: kept, so\nthe name is not drafted again, but out of the catalog.","operationId":"dismiss_catalog_metric_api_catalogs_metrics__asset_id__dismiss_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/models/{asset_id}/dismiss":{"post":{"tags":["catalog"],"summary":"Dismiss Catalog Model","description":"Turn down a draft model the agent wrote, as a draft metric is: kept, so\nthe name is not drafted again, but out of the semantic layer (ADR 0110).","operationId":"dismiss_catalog_model_api_catalogs_models__asset_id__dismiss_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/terms/{term_id}/activities":{"get":{"tags":["catalog"],"summary":"Get Term Activities","description":"Get the activity feed for a catalog object (alias of the asset route —\nassets and terms share one id space).","operationId":"get_term_activities_api_catalogs_terms__term_id__activities_get","parameters":[{"name":"term_id","in":"path","required":true,"schema":{"type":"string","title":"Term Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["catalog"],"summary":"Create Term Activity","description":"Add a comment to a catalog object's feed (alias of the asset route —\nassets and terms share one id space).","operationId":"create_term_activity_api_catalogs_terms__term_id__activities_post","parameters":[{"name":"term_id","in":"path","required":true,"schema":{"type":"string","title":"Term Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/catalog/tags":{"get":{"tags":["catalog"],"summary":"Get Catalog Tags","description":"Get all available tags for a database.","operationId":"get_catalog_tags_api_databases__database_id__catalog_tags_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["catalog"],"summary":"Create Catalog Tag","description":"Create a new tag.","operationId":"create_catalog_tag_api_databases__database_id__catalog_tags_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/catalogs/tags/{tag_id}":{"patch":{"tags":["catalog"],"summary":"Update Catalog Tag","description":"Update a tag's properties.","operationId":"update_catalog_tag_api_catalogs_tags__tag_id__patch","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","title":"Tag Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TagUpdate"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete Catalog Tag","description":"Delete a tag (removes all associations).","operationId":"delete_catalog_tag_api_catalogs_tags__tag_id__delete","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","title":"Tag Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/sync-metadata":{"post":{"tags":["catalog"],"summary":"Sync Database Metadata","description":"Start background sync of database metadata to catalog.","operationId":"sync_database_metadata_api_databases__database_id__sync_metadata_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/sync-status":{"get":{"tags":["catalog"],"summary":"Get Sync Status","description":"Get the current sync status for a database from in-memory state.","operationId":"get_sync_status_api_databases__database_id__sync_status_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits":{"get":{"tags":["cockpit"],"summary":"List Cockpits","operationId":"list_cockpits_api_cockpits_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits/roster":{"get":{"tags":["cockpit"],"summary":"Cockpit Roster","description":"Org roster for the follower picker.","operationId":"cockpit_roster_api_cockpits_roster_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits/{cockpit_id}":{"get":{"tags":["cockpit"],"summary":"Get Cockpit","operationId":"get_cockpit_api_cockpits__cockpit_id__get","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["cockpit"],"summary":"Patch Cockpit","operationId":"patch_cockpit_api_cockpits__cockpit_id__patch","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CockpitPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits/{cockpit_id}/reads":{"get":{"tags":["cockpit"],"summary":"List Reads","description":"Page through read snapshots, newest first. Offset 0 is the current read.","operationId":"list_reads_api_cockpits__cockpit_id__reads_get","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits/{cockpit_id}/refresh":{"post":{"tags":["cockpit"],"summary":"Refresh Cockpit","operationId":"refresh_cockpit_api_cockpits__cockpit_id__refresh_post","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CockpitRefreshRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits/{cockpit_id}/review":{"post":{"tags":["cockpit"],"summary":"Run Review Now","operationId":"run_review_now_api_cockpits__cockpit_id__review_post","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits/{cockpit_id}/proposals/accept-all":{"post":{"tags":["cockpit"],"summary":"Accept All Proposals","operationId":"accept_all_proposals_api_cockpits__cockpit_id__proposals_accept_all_post","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits/{cockpit_id}/followers":{"put":{"tags":["cockpit"],"summary":"Put Followers","operationId":"put_followers_api_cockpits__cockpit_id__followers_put","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowersPut"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits/{cockpit_id}/logbook":{"get":{"tags":["cockpit"],"summary":"Get Logbook","description":"The agent's dated journal for this cockpit, as markdown.\n\nWritten by `log_decision` and curated by the agent between reviews; read\nhere only. Cockpit visibility is the boundary, as for notes — the document\nitself is `kind=\"memory\"` and never listed with reports.","operationId":"get_logbook_api_cockpits__cockpit_id__logbook_get","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpits/{cockpit_id}/notes":{"get":{"tags":["cockpit"],"summary":"List Notes","description":"This cockpit's durable memory, newest first.\n\nPaginated rather than capped: a note nobody can see is a note nobody can\ndelete, and the page only shows a count — this endpoint is the one place\nthe whole memory is readable.\n\nNo governance redaction, unlike the monitoring board: a cockpit note answers\nwhat Myriade wrote in the read, and cockpit visibility is already the\nboundary that decides who sees that.","operationId":"list_notes_api_cockpits__cockpit_id__notes_get","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["cockpit"],"summary":"Create Note","description":"Write a durable note on this cockpit — what Myriade must not forget.\n\nAny member who can see the cockpit may write one: a note answers what the\nagent wrote, and a follower who spots an error has to be able to say so.","operationId":"create_note_api_cockpits__cockpit_id__notes_post","parameters":[{"name":"cockpit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cockpit Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpit-notes/{note_id}":{"delete":{"tags":["cockpit"],"summary":"Delete Note","description":"Delete a cockpit note. Author, cockpit creator, or org admin.","operationId":"delete_note_api_cockpit_notes__note_id__delete","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpit-blocks/{block_id}/values":{"get":{"tags":["cockpit"],"summary":"Cockpit Block Values","operationId":"cockpit_block_values_api_cockpit_blocks__block_id__values_get","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Block Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpit-blocks/{block_id}":{"patch":{"tags":["cockpit"],"summary":"Patch Cockpit Block","operationId":"patch_cockpit_block_api_cockpit_blocks__block_id__patch","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Block Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CockpitBlockPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpit-changesets/{changeset_id}":{"get":{"tags":["cockpit"],"summary":"Get Changeset","operationId":"get_changeset_api_cockpit_changesets__changeset_id__get","parameters":[{"name":"changeset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Changeset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cockpit-changesets/{changeset_id}/undo":{"post":{"tags":["cockpit"],"summary":"Undo Changeset","operationId":"undo_changeset_api_cockpit_changesets__changeset_id__undo_post","parameters":[{"name":"changeset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Changeset Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routines/{automation_id}":{"get":{"tags":["cockpit"],"summary":"Get Routine","operationId":"get_routine_api_routines__automation_id__get","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routines/{automation_id}/reject":{"post":{"tags":["cockpit"],"summary":"Reject Routine","operationId":"reject_routine_api_routines__automation_id__reject_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routines/{automation_id}/accept":{"post":{"tags":["cockpit"],"summary":"Accept Routine","operationId":"accept_routine_api_routines__automation_id__accept_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credits":{"get":{"tags":["credits"],"summary":"Get My Credits","description":"Return the current user's credit quota for the current period.","operationId":"get_my_credits_api_credits_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credits/org":{"get":{"tags":["credits"],"summary":"Get Org Credit Summary","description":"Return org-level credit totals for the current user's organisation.\n\nUsed by the trial banner to surface remaining trial budget on\nself-hosted instances. Admin only: the proxy's\n``/organizations/{id}/credits`` endpoint authorizes admin/owner/service\nprincipals exclusively, so forwarding a member's sealed session there\njust yields a 403. Per-user details live behind /admin/credits; a\nmember's own quota is on /credits.","operationId":"get_org_credit_summary_api_credits_org_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/credits":{"get":{"tags":["credits"],"summary":"Get Admin Credits","description":"Return org-level credit summary and per-user breakdown. Admin only.","operationId":"get_admin_credits_api_admin_credits_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/credits/service-limit":{"put":{"tags":["credits"],"summary":"Update Service Credit Limit","description":"Set the service credit limit for the organization.","operationId":"update_service_credit_limit_api_admin_credits_service_limit_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/credits/users/{user_id}":{"put":{"tags":["credits"],"summary":"Update User Quota","description":"Update a user's monthly quota. Admin only.\n\nValidates that the sum of all user quotas does not exceed\nthe organisation's pool (monthly_allowance + carry_over).","operationId":"update_user_quota_api_admin_credits_users__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuotaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/credits/initialize":{"post":{"tags":["credits"],"summary":"Initialize Credits","description":"Create or update quotas for all given users with a uniform amount.\n\nAdmin only. Validates total allocation against org pool.","operationId":"initialize_credits_api_admin_credits_initialize_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitializeQuotasRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/adoption":{"get":{"tags":["adoption"],"summary":"Get Adoption","description":"Adoption of every seat in the caller's organisation.\n\nOrg scoping comes from ``auth.organization_id`` alone — the caller never\nnames the organisation, so an admin of one org cannot read another's.","operationId":"get_adoption_api_admin_adoption_get","parameters":[{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Window Days"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/ask/stream":{"post":{"tags":["chat"],"summary":"Ask Stream","description":"SSE endpoint for token-level streaming chat responses.\n\nRequest body: {\"message\": \"user question\"}\n\nSSE Events:\n- event: user_message, data: {message object}\n- event: text, data: {\"content\": \"...\"}\n- event: message, data: {complete message object}\n- event: error, data: {\"message\": \"...\"}\n- event: done, data: {}","operationId":"ask_stream_api_conversations__conversation_id__ask_stream_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/ask":{"post":{"tags":["chat"],"summary":"Ask","description":"Start agent in background. Returns immediately.\n\nRequest body: {\"message\": \"user question\", \"images\": [{\"data\": \"base64\", \"mime_type\": \"image/png\"}]}\n\nAgent runs as background task and broadcasts events to SSE room.\nClient receives events via /api/events SSE connection.","operationId":"ask_api_conversations__conversation_id__ask_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/regenerate":{"post":{"tags":["chat"],"summary":"Regenerate","description":"Regenerate conversation from a specific message.\nStarts background task and returns immediately.\n\nRequest body: {\"message_id\": \"uuid\", \"message\": \"optional new content\"}\n\nEvents are broadcast to SSE room:\n- message_updated: {updated message if content changed}\n- delete_message: {deleted message id}\n- text, tool_started, tool_delta: streaming events\n- message: {new conversation messages}\n- done: {}","operationId":"regenerate_api_conversations__conversation_id__regenerate_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/stop":{"post":{"tags":["chat"],"summary":"Stop Conversation","description":"Stop an ongoing streaming operation.","operationId":"stop_conversation_api_conversations__conversation_id__stop_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/query":{"post":{"tags":["chat"],"summary":"Execute Query","description":"Execute SQL query directly.\n\nRequest body: {\"query\": \"SELECT ...\"}\n\nReturns: {user_message: {...}, result_message: {...}}","operationId":"execute_query_api_conversations__conversation_id__query_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/confirm-write":{"post":{"tags":["chat"],"summary":"Confirm Write","description":"Confirm a write operation and continue the conversation.\nStarts background task and returns immediately.\n\nRequest body: {\"query_id\": \"uuid\"}\n\nEvents are broadcast to SSE room:\n- query_updated: {updated query}\n- result: {execution result message}\n- message: {conversation messages}\n- done: {}","operationId":"confirm_write_api_conversations__conversation_id__confirm_write_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/reject-write":{"post":{"tags":["chat"],"summary":"Reject Write","description":"Reject a write operation.\n\nRequest body: {\"query_id\": \"uuid\"}","operationId":"reject_write_api_conversations__conversation_id__reject_write_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations":{"post":{"tags":["conversation"],"summary":"Create Conversation","description":"Create a new conversation.","operationId":"create_conversation_api_conversations_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["conversation"],"summary":"Get Conversations","description":"Get a page of the current user's conversations, newest first.\n\nWithout ``kind`` only the conversations the user drove themselves are\nlisted; unattended runs (automations, reviews, briefs…) are reachable\nby asking for their kind explicitly. ``without_topic`` leaves out what\n``/conversations/by-topic`` files under a topic.","operationId":"get_conversations_api_conversations_get","parameters":[{"name":"contextId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contextid"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["updatedAt","createdAt"],"type":"string","default":"updatedAt","title":"Sort"}},{"name":"without_topic","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Without Topic"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/onboarding":{"post":{"tags":["conversation"],"summary":"Create Onboarding Conversation","description":"Create or fetch the hidden onboarding conversation for the current context.","operationId":"create_onboarding_conversation_api_conversations_onboarding_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/onboarding/status":{"get":{"tags":["conversation"],"summary":"Get Onboarding Status","operationId":"get_onboarding_status_api_conversations_onboarding_status_get","parameters":[{"name":"contextId","in":"query","required":true,"schema":{"type":"string","title":"Contextid"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/onboarding/start":{"post":{"tags":["conversation"],"summary":"Start Onboarding Exploration","operationId":"start_onboarding_exploration_api_conversations_onboarding_start_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/resumable":{"get":{"tags":["conversation"],"summary":"Get Resumable Conversations","operationId":"get_resumable_conversations_api_conversations_resumable_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/by-topic":{"get":{"tags":["conversation"],"summary":"Get Conversations By Topic","description":"The caller's latest conversations about each topic they follow,\nhowever old.\n\nOne entry per followed topic they have a conversation on, with how many\nthere are in all; the topic's name comes along so the list reads without\nthe topics themselves. Defined before /conversations/{conversation_id} so the\nliteral path wins.","operationId":"get_conversations_by_topic_api_conversations_by_topic_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":3,"title":"Limit"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["updatedAt","createdAt"],"type":"string","default":"updatedAt","title":"Sort"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/documentation-passes/last":{"get":{"tags":["conversation"],"summary":"Get Last Documentation Pass","description":"The caller's most recent documentation pass, with its closing report.\n\nIdentified by the hidden marker (never the renameable display name).\n``database_id`` narrows to one bound connection — the bound-world overview\nshows one context and must not surface another context's pass.\nDefined before /conversations/{conversation_id} so the literal path wins.","operationId":"get_last_documentation_pass_api_conversations_documentation_passes_last_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/running-statuses":{"get":{"tags":["conversation"],"summary":"Get Running Statuses","description":"Get all running conversation statuses for the current user.\n\nReturns list of {conversation_id, status} for conversations\ncurrently being processed.\n\nNote: This endpoint must be defined BEFORE /conversations/{conversation_id}\nto prevent FastAPI from matching \"running-statuses\" as a UUID.","operationId":"get_running_statuses_api_conversations_running_statuses_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}":{"get":{"tags":["conversation"],"summary":"Get Conversation","description":"Get a specific conversation with messages.","operationId":"get_conversation_api_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["conversation"],"summary":"Update Conversation","description":"Update a conversation.","operationId":"update_conversation_api_conversations__conversation_id__put","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/visibility":{"patch":{"tags":["conversation"],"summary":"Update Conversation Visibility","description":"Update a conversation's visibility. Only the owner can change it.","operationId":"update_conversation_visibility_api_conversations__conversation_id__visibility_patch","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationVisibilityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/archive":{"post":{"tags":["conversation"],"summary":"Archive Conversation","description":"Archive (or restore) a conversation.\n\nConversations are never deleted by users: an archived one leaves the\nowner's list but its messages stay so admins can monitor usage.","operationId":"archive_conversation_api_conversations__conversation_id__archive_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationArchive"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/github/changes":{"get":{"tags":["conversation"],"summary":"Get Conversation Changes","description":"Get detailed information about uncommitted changes in conversation workspace.","operationId":"get_conversation_changes_api_conversations__conversation_id__github_changes_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/github/dbt-impact":{"get":{"tags":["conversation"],"summary":"Get Conversation Dbt Impact","description":"Return lineage and schema impact for DBT models changed in the conversation workspace.","operationId":"get_conversation_dbt_impact_api_conversations__conversation_id__github_dbt_impact_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/github/pr":{"post":{"tags":["conversation"],"summary":"Create Conversation Pull Request","description":"Create a PR in a worker: ORM, agent.ask, git and GitHub HTTP are sync.","operationId":"create_conversation_pull_request_api_conversations__conversation_id__github_pr_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/files":{"post":{"tags":["conversation-files"],"summary":"Upload File To Conversation","operationId":"upload_file_to_conversation_api_conversations__conversation_id__files_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_to_conversation_api_conversations__conversation_id__files_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["conversation-files"],"summary":"List Conversation Files","operationId":"list_conversation_files_api_conversations__conversation_id__files_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationFileOut"},"title":"Response List Conversation Files Api Conversations  Conversation Id  Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/files/{file_id}":{"delete":{"tags":["conversation-files"],"summary":"Delete Conversation File","operationId":"delete_conversation_file_api_conversations__conversation_id__files__file_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/artifacts/{blob_id}":{"get":{"tags":["conversation-files"],"summary":"Get Conversation Artifact","operationId":"get_conversation_artifact_api_conversations__conversation_id__artifacts__blob_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"blob_id","in":"path","required":true,"schema":{"type":"string","title":"Blob Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/conversations/{conversation_id}":{"get":{"tags":["public-conversation"],"summary":"Get Public Conversation","description":"Get a public conversation with filtered messages (no auth required).","operationId":"get_public_conversation_api_public_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases":{"post":{"tags":["database"],"summary":"Create Database Route","description":"Create a new database and sync its metadata to the catalog.","operationId":"create_database_route_api_databases_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["database"],"summary":"Get Databases","description":"Get all databases accessible by the user.","operationId":"get_databases_api_databases_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/test-connection":{"post":{"tags":["database"],"summary":"Test Database Connection","description":"Test database connection without creating the database.","operationId":"test_database_connection_api_databases_test_connection_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}":{"delete":{"tags":["database"],"summary":"Delete Database","description":"Delete a database. Allowed for its owner or an admin of its org.","operationId":"delete_database_api_databases__database_id__delete","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["database"],"summary":"Update Database","description":"Update a database. Allowed for its owner or an admin of its org —\ncredentials and write_mode must not be rewritable by plain org members.","operationId":"update_database_api_databases__database_id__put","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/share":{"put":{"tags":["database"],"summary":"Share Database To Organisation","description":"Share or unshare a database to/from the current user's organisation.","operationId":"share_database_to_organisation_api_databases__database_id__share_put","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseShare"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/schema":{"get":{"tags":["database"],"summary":"Get Schema","description":"Get the schema/tables metadata for a database.","operationId":"get_schema_api_databases__database_id__schema_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/server-info":{"get":{"tags":["database"],"summary":"Get Server Info","description":"Get the server IP address to guide the user who needs to whitelist.","operationId":"get_server_info_api_server_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/version":{"get":{"tags":["database"],"summary":"Get Version","description":"Get the application version and check for updates.","operationId":"get_version_api_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/databases/{database_id}/memory":{"get":{"tags":["database"],"summary":"Get Database Memory","description":"Get the AI memory for a database.","operationId":"get_database_memory_api_databases__database_id__memory_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["database"],"summary":"Update Database Memory","description":"Update the AI memory for a database (owner or org admin).","operationId":"update_database_memory_api_databases__database_id__memory_put","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseMemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/documents":{"get":{"tags":["document"],"summary":"List Documents","description":"List documents for a database, paginated and filtered.\n\nReturns a chip-count summary alongside the page so the UI can render\nfilter badges without a second roundtrip.","operationId":"list_documents_api_databases__database_id__documents_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(mine|sharedWithMe)$"},{"type":"null"}],"title":"Owner"}},{"name":"published","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Published"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Archived"}},{"name":"automated","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Automated"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["document"],"summary":"Create Document","description":"Create a new empty document.","operationId":"create_document_api_databases__database_id__documents_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentCreate"},{"type":"null"}],"title":"Data"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/documents":{"get":{"tags":["document"],"summary":"List Organization Documents","description":"List the caller's organisation's report documents, org-wide.\n\nOrg-level reports (database_id IS NULL — notably the ones produced by\nunbound conversations) and database-bound ones share the listing;\n`database_id` narrows it to one connection (inaccessible id → empty,\nnever 403). A caller with no organisation sees their own orgless reports\nand those of the databases they can access. Memory/instructions/skill\ndocuments share the NULL database_id but are internal — only\nkind='report' is listed.","operationId":"list_organization_documents_api_organization_documents_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(mine|sharedWithMe)$"},{"type":"null"}],"title":"Owner"}},{"name":"published","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Published"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Archived"}},{"name":"automated","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Automated"}},{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["document"],"summary":"Create Org Document","description":"Create an org-level report (database_id IS NULL) — reports are\norg-wide, so manual creation is not bound to a connection.","operationId":"create_org_document_api_organization_documents_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentCreate"},{"type":"null"}],"title":"Data"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/documents/popular":{"get":{"tags":["document"],"summary":"Get Popular Documents","description":"Return the most-viewed documents for a database.","operationId":"get_popular_documents_api_databases__database_id__documents_popular_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":4,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}":{"get":{"tags":["document"],"summary":"Read Document","description":"Get a single document by ID, rendered on this worker thread.","operationId":"read_document_api_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["document"],"summary":"Update Document","description":"Update a document's content, title, and/or visibility.","operationId":"update_document_api_documents__document_id__put","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentUpdate"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["document"],"summary":"Delete Document","description":"Soft delete a document. Owner or org admin can delete.","operationId":"delete_document_api_documents__document_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/export/pdf":{"get":{"tags":["document"],"summary":"Export Document Pdf","description":"Export a document as a styled PDF with rendered tables and charts.","operationId":"export_document_pdf_api_documents__document_id__export_pdf_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/results/refresh":{"post":{"tags":["document"],"summary":"Refresh Document Results","operationId":"refresh_document_results_api_documents__document_id__results_refresh_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/versions":{"get":{"tags":["document"],"summary":"Get Document Versions","description":"Get version history for a document.","operationId":"get_document_versions_api_documents__document_id__versions_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/versions/{version_id}/restore":{"post":{"tags":["document"],"summary":"Restore Document Version","description":"Set the document's content back to a previous version's snapshot.\n\nNon-destructive: the pre-restore content already lives in the latest\nversion row, and the restore itself is recorded as a new version.","operationId":"restore_document_version_api_documents__document_id__versions__version_id__restore_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/activities":{"get":{"tags":["document"],"summary":"List Document Activities","description":"List non-view activities for a document (comments, agent messages, etc.).","operationId":"list_document_activities_api_documents__document_id__activities_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["document"],"summary":"Create Document Activity","description":"Post a comment on a document.","operationId":"create_document_activity_api_documents__document_id__activities_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentActivityCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/activities/{activity_id}":{"patch":{"tags":["document"],"summary":"Patch Document Activity","description":"Edit content (author only) or toggle resolved state (any doc viewer).","operationId":"patch_document_activity_api_documents__document_id__activities__activity_id__patch","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"activity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Activity Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentActivityPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/archive":{"post":{"tags":["document"],"summary":"Archive Document","description":"Archive or unarchive a document. Owner or org admin can archive.","operationId":"archive_document_api_documents__document_id__archive_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentArchive"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organisation":{"get":{"tags":["github"],"summary":"Get Organisation","description":"Get organisation information for the current user.","operationId":"get_organisation_api_organisation_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["github"],"summary":"Update Organisation","description":"Update organisation settings. Admin only.","operationId":"update_organisation_api_organisation_patch","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/settings":{"get":{"tags":["github"],"summary":"Get Database Github Settings","description":"Get GitHub settings for a database.","operationId":"get_database_github_settings_api_databases__database_id__github_settings_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["github"],"summary":"Update Database Github Settings","description":"Update GitHub settings for a database.","operationId":"update_database_github_settings_api_databases__database_id__github_settings_put","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GithubSettingsUpdate"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/repos":{"get":{"tags":["github"],"summary":"List Database Github Repos","description":"List repositories accessible via GitHub App installation.","operationId":"list_database_github_repos_api_databases__database_id__github_repos_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/install-url":{"get":{"tags":["github"],"summary":"Get Github App Install Url","description":"Get the URL to install the GitHub App.","operationId":"get_github_app_install_url_api_databases__database_id__github_app_install_url_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/connect":{"post":{"tags":["github"],"summary":"Connect Github App","description":"Connect a GitHub App installation to a database.","operationId":"connect_github_app_api_databases__database_id__github_app_connect_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubAppConnect"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos":{"get":{"tags":["github"],"summary":"List Github App Repos","description":"List repositories accessible via the GitHub App installation.","operationId":"list_github_app_repos_api_databases__database_id__github_app_repos_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["github"],"summary":"Add Github Repo","description":"Add a repository to the database's GitHub integration.","operationId":"add_github_repo_api_databases__database_id__github_app_repos_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubRepoAdd"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos/{repo_id}":{"delete":{"tags":["github"],"summary":"Remove Github Repo","description":"Remove a repository from the database's GitHub integration.","operationId":"remove_github_repo_api_databases__database_id__github_app_repos__repo_id__delete","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["github"],"summary":"Update Github Repo","description":"Update a repository's settings.","operationId":"update_github_repo_api_databases__database_id__github_app_repos__repo_id__put","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GithubRepoUpdate"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/disconnect":{"post":{"tags":["github"],"summary":"Disconnect Github App","description":"Disconnect the GitHub App from a database.","operationId":"disconnect_github_app_api_databases__database_id__github_app_disconnect_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/sync-dbt-docs":{"post":{"tags":["github"],"summary":"Trigger Dbt Docs Sync","description":"Trigger background DBT documentation generation for all projects of a database.","operationId":"trigger_dbt_docs_sync_api_databases__database_id__github_sync_dbt_docs_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/dbt-sync-status":{"get":{"tags":["github"],"summary":"Get Dbt Sync Status","description":"Get DBT documentation sync status for a database.","operationId":"get_dbt_sync_status_api_databases__database_id__github_dbt_sync_status_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos/{repo_id}/projects":{"get":{"tags":["github"],"summary":"List Dbt Projects","description":"List all DBT projects for a repository.","operationId":"list_dbt_projects_api_databases__database_id__github_app_repos__repo_id__projects_get","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["github"],"summary":"Add Dbt Project","description":"Add a new DBT project to a repository.","operationId":"add_dbt_project_api_databases__database_id__github_app_repos__repo_id__projects_post","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DBTProjectCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos/{repo_id}/projects/{project_id}/metrics":{"get":{"tags":["github"],"summary":"Get Dbt Project Metrics","description":"Return the governed metrics + semantic models for a DBT project.\n\nReads the stored MetricFlow semantic manifest and exposes it for the UI.\nEmpty lists when the project has no semantic layer.","operationId":"get_dbt_project_metrics_api_databases__database_id__github_app_repos__repo_id__projects__project_id__metrics_get","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos/{repo_id}/projects/{project_id}":{"put":{"tags":["github"],"summary":"Update Dbt Project","description":"Update a DBT project's settings.","operationId":"update_dbt_project_api_databases__database_id__github_app_repos__repo_id__projects__project_id__put","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DBTProjectUpdate"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["github"],"summary":"Delete Dbt Project","description":"Delete a DBT project from a repository.","operationId":"delete_dbt_project_api_databases__database_id__github_app_repos__repo_id__projects__project_id__delete","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos/{repo_id}/projects/{project_id}/connection":{"put":{"tags":["github"],"summary":"Configure Dbt Connection","description":"Configure or update the DBT execution connection for a project.","operationId":"configure_dbt_connection_api_databases__database_id__github_app_repos__repo_id__projects__project_id__connection_put","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DBTConnectionConfig"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["github"],"summary":"Get Dbt Connection","description":"Get the DBT execution connection details for a project.","operationId":"get_dbt_connection_api_databases__database_id__github_app_repos__repo_id__projects__project_id__connection_get","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos/{repo_id}/projects/{project_id}/test-connection":{"post":{"tags":["github"],"summary":"Test Dbt Connection","description":"Test DBT connection configuration without saving.\n\nThis endpoint validates that the connection configuration works\nbefore the user saves it, preventing errors during DBT sync.","operationId":"test_dbt_connection_api_databases__database_id__github_app_repos__repo_id__projects__project_id__test_connection_post","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DBTConnectionTestPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos/{repo_id}/projects/{project_id}/sync":{"post":{"tags":["github"],"summary":"Trigger Project Sync","description":"Trigger DBT documentation sync for a specific project.","operationId":"trigger_project_sync_api_databases__database_id__github_app_repos__repo_id__projects__project_id__sync_post","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos/{repo_id}/projects/{project_id}/status":{"get":{"tags":["github"],"summary":"Get Project Sync Status","description":"Get the sync status of a specific DBT project.","operationId":"get_project_sync_status_api_databases__database_id__github_app_repos__repo_id__projects__project_id__status_get","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/github/app/repos/{repo_id}/discover-projects":{"get":{"tags":["github"],"summary":"Discover Projects In Repo","description":"Discover DBT projects in a repository by scanning for dbt_project.yml files.","operationId":"discover_projects_in_repo_api_databases__database_id__github_app_repos__repo_id__discover_projects_get","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Repo Id"}},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instructions/organization":{"get":{"tags":["instructions"],"summary":"Get Org Instructions","operationId":"get_org_instructions_api_instructions_organization_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["instructions"],"summary":"Update Org Instructions","operationId":"update_org_instructions_api_instructions_organization_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructionsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instructions/user":{"get":{"tags":["instructions"],"summary":"Get User Instructions","operationId":"get_user_instructions_api_instructions_user_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["instructions"],"summary":"Update User Instructions","operationId":"update_user_instructions_api_instructions_user_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructionsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/issues":{"get":{"tags":["issues"],"summary":"Get Issues","description":"Get issues for a context, or org-wide when ``contextId`` is omitted.\n\nOrg-wide rows are bounded to databases the user can access within the\ncaller's organisation, and each item carries ``database_id`` and\n``database_name`` so the UI can badge/filter by connection.","operationId":"get_issues_api_issues_get","parameters":[{"name":"contextId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contextid"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/issues/{issue_id}":{"put":{"tags":["issues"],"summary":"Update Issue","description":"Update an issue.","operationId":"update_issue_api_issues__issue_id__put","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers":{"get":{"tags":["mcp-client"],"summary":"List Mcp Servers","operationId":"list_mcp_servers_api_mcp_servers_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"enum":["organisation","personal"],"type":"string","default":"organisation","title":"Scope"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["mcp-client"],"summary":"Create Mcp Server","operationId":"create_mcp_server_api_mcp_servers_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers/test":{"post":{"tags":["mcp-client"],"summary":"Test Mcp Server","description":"Probe a server before saving it: returns the live tool list, or says\nthe server asks each member to sign in (OAuth).","operationId":"test_mcp_server_api_mcp_servers_test_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers/{server_id}":{"patch":{"tags":["mcp-client"],"summary":"Update Mcp Server","operationId":"update_mcp_server_api_mcp_servers__server_id__patch","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["mcp-client"],"summary":"Delete Mcp Server","operationId":"delete_mcp_server_api_mcp_servers__server_id__delete","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers/{server_id}/refresh":{"post":{"tags":["mcp-client"],"summary":"Refresh Mcp Server","operationId":"refresh_mcp_server_api_mcp_servers__server_id__refresh_post","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers/{server_id}/tools/{tool_name}":{"patch":{"tags":["mcp-client"],"summary":"Toggle Mcp Tool","operationId":"toggle_mcp_tool_api_mcp_servers__server_id__tools__tool_name__patch","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string","title":"Tool Name"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpToolToggle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers/{server_id}/oauth/start":{"post":{"tags":["mcp-client"],"summary":"Start Mcp Oauth","description":"Open the sign-in round trip. Returns where to send the browser.","operationId":"start_mcp_oauth_api_mcp_servers__server_id__oauth_start_post","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/oauth/callback":{"get":{"tags":["mcp-client"],"summary":"Mcp Oauth Callback","description":"Where the authorization server sends the member back. Always lands\non the settings page; the outcome rides in the query.","operationId":"mcp_oauth_callback_api_mcp_oauth_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers/{server_id}/oauth":{"delete":{"tags":["mcp-client"],"summary":"Disconnect Mcp Oauth","operationId":"disconnect_mcp_oauth_api_mcp_servers__server_id__oauth_delete","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/brief":{"get":{"tags":["brief"],"summary":"Get Brief","description":"This person's brief, plus whether the agent is currently writing it.\n\n`tz` is the browser's IANA timezone: \"a new day\" is the reader's, not the\nserver's.","operationId":"get_brief_api_brief_get","parameters":[{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tz"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Brief Api Brief Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/brief/tasks":{"get":{"tags":["brief"],"summary":"Get Brief Tasks","description":"This person's to-do list, each task read from its live object.","operationId":"get_brief_tasks_api_brief_tasks_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Brief Tasks Api Brief Tasks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/brief/tasks/{task_id}/dismiss":{"post":{"tags":["brief"],"summary":"Dismiss Brief Task","description":"\"Not for me\". Someone else's task does not exist.","operationId":"dismiss_brief_task_api_brief_tasks__task_id__dismiss_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dismiss Brief Task Api Brief Tasks  Task Id  Dismiss Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/brief/tasks/{task_id}/defer":{"post":{"tags":["brief"],"summary":"Defer Brief Task","operationId":"defer_brief_task_api_brief_tasks__task_id__defer_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeferralBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Defer Brief Task Api Brief Tasks  Task Id  Defer Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/work-items":{"get":{"tags":["work"],"summary":"List Work","operationId":"list_work_api_work_items_get","parameters":[{"name":"topic_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"}},{"name":"text","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},{"name":"responsible_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Responsible To"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Domain"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Status"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/work-items/{work_id}":{"get":{"tags":["work"],"summary":"Get Work","operationId":"get_work_api_work_items__work_id__get","parameters":[{"name":"work_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Work Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/work-items":{"get":{"tags":["work"],"summary":"Topic Work","operationId":"topic_work_api_organization_topics__topic_id__work_items_get","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/work-items/{work_id}/topics/{topic_id}":{"put":{"tags":["work"],"summary":"Classify","operationId":"classify_api_work_items__work_id__topics__topic_id__put","parameters":[{"name":"work_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Work Id"}},{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkTopicLink"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/work-items/{work_id}/assignee":{"put":{"tags":["work"],"summary":"Assign Work","operationId":"assign_work_api_work_items__work_id__assignee_put","parameters":[{"name":"work_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Work Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkAssignment"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/work-items/{work_id}/discussions":{"get":{"tags":["work"],"summary":"Work Discussions Page","operationId":"work_discussions_page_api_work_items__work_id__discussions_get","parameters":[{"name":"work_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Work Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/work-items/{work_id}/discussions/{conversation_id}":{"put":{"tags":["work"],"summary":"Attach Work Discussion","operationId":"attach_work_discussion_api_work_items__work_id__discussions__conversation_id__put","parameters":[{"name":"work_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Work Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscussionSource"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/discussions":{"get":{"tags":["work"],"summary":"Topic Discussions Page","operationId":"topic_discussions_page_api_organization_topics__topic_id__discussions_get","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/discussions/{conversation_id}":{"put":{"tags":["work"],"summary":"Attach Topic Discussion","operationId":"attach_topic_discussion_api_organization_topics__topic_id__discussions__conversation_id__put","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/work-items/{work_id}/responsibility":{"get":{"tags":["work"],"summary":"Work Responsibility Page","operationId":"work_responsibility_page_api_work_items__work_id__responsibility_get","parameters":[{"name":"work_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Work Id"}},{"name":"include_directory","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Directory"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/work-items/{work_id}/activity":{"get":{"tags":["work"],"summary":"Work Activity Page","operationId":"work_activity_page_api_work_items__work_id__activity_get","parameters":[{"name":"work_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Work Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/activity":{"get":{"tags":["work"],"summary":"Topic Activity Page","operationId":"topic_activity_page_api_organization_topics__topic_id__activity_get","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/organization":{"get":{"tags":["memory"],"summary":"Get Org Memory","operationId":"get_org_memory_api_memory_organization_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["memory"],"summary":"Update Org Memory","operationId":"update_org_memory_api_memory_organization_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/organization/review":{"post":{"tags":["memory"],"summary":"Trigger Org Memory Review","operationId":"trigger_org_memory_review_api_memory_organization_review_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/user":{"get":{"tags":["memory"],"summary":"Get User Memory","operationId":"get_user_memory_api_memory_user_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["memory"],"summary":"Update User Memory","operationId":"update_user_memory_api_memory_user_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/user/reset":{"post":{"tags":["memory"],"summary":"Reset User Memory","description":"Clear the current user's own memory back to its empty scaffold.","operationId":"reset_user_memory_api_memory_user_reset_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/user/sections":{"put":{"tags":["memory"],"summary":"Update User Memory Sections","description":"Edit individual user-owned memory sections (Preferences / Roles).\n\nThe server rebuilds the document from its fixed sections, so user input can\nnever break the `## ` structure. Agent-maintained sections (Recent\nsubjects) are preserved untouched; the agent may still revise any section.","operationId":"update_user_memory_sections_api_memory_user_sections_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/personalization/summary":{"get":{"tags":["personalization"],"summary":"Get Summary","operationId":"get_summary_api_personalization_summary_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/personalization/members/{user_id}":{"get":{"tags":["personalization"],"summary":"Get Member","operationId":"get_member_api_personalization_members__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/personalization/activity":{"get":{"tags":["personalization"],"summary":"Get Activity","operationId":"get_activity_api_personalization_activity_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/personalization/members/{user_id}/reset-memory":{"post":{"tags":["personalization"],"summary":"Reset Member Memory","operationId":"reset_member_memory_api_personalization_members__user_id__reset_memory_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/checks":{"get":{"tags":["monitoring"],"summary":"List Checks","description":"List all monitoring checks for a database, with their recent run history.\n\nEach check dict carries ``recentResults`` (last 15 runs, oldest first, for\nthe run sparkline) and ``lastErrorMessage`` (the executor error of the most\nrecent run when it errored) so the board renders without per-check fetches.","operationId":"list_checks_api_databases__database_id__checks_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["monitoring"],"summary":"Create Check","description":"Create a monitoring check.","operationId":"create_check_api_databases__database_id__checks_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/checks/proposals":{"get":{"tags":["monitoring"],"summary":"List Check Proposals","description":"Pending check proposals for a database (see ``_proposals_payload``).","operationId":"list_check_proposals_api_databases__database_id__checks_proposals_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/checks/proposals":{"get":{"tags":["monitoring"],"summary":"List Organization Check Proposals","description":"Pending check proposals across every database the user can access.","operationId":"list_organization_check_proposals_api_organization_checks_proposals_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/checks":{"get":{"tags":["monitoring"],"summary":"List Organization Checks","description":"List monitoring checks across every database the user can access.\n\nSame per-item shape as the per-database board, plus ``database_id`` and\n``database_name``. ``database_id`` narrows to one database (an\ninaccessible id yields an empty list, never a leak).","operationId":"list_organization_checks_api_organization_checks_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks":{"get":{"tags":["monitoring"],"summary":"Get Checks","description":"Several checks at once — the batched form of ``GET /checks/{id}``.\n\n``ids`` is comma-separated. Items come back in request order with the\ndetail shape of the single route; an id that is unknown, malformed or on\na database the requester cannot read is simply absent (never a leak, never\na 404 that would fail the whole batch). The chat renders every check it\ncites through this route, so one conversation costs one request.","operationId":"get_checks_api_checks_get","parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string","title":"Ids"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks/{check_id}":{"get":{"tags":["monitoring"],"summary":"Get Check","description":"Get a single check (referenceable resource — also the chat proposal card).","operationId":"get_check_api_checks__check_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["monitoring"],"summary":"Update Check","description":"Update a check.","operationId":"update_check_api_checks__check_id__put","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["monitoring"],"summary":"Delete Check","description":"Delete a check: it leaves every list, its row and alerts are kept.","operationId":"delete_check_api_checks__check_id__delete","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CheckDelete"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks/{check_id}/results":{"get":{"tags":["monitoring"],"summary":"List Check Results","description":"Return the recent run history for a check.","operationId":"list_check_results_api_checks__check_id__results_get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks/{check_id}/run":{"post":{"tags":["monitoring"],"summary":"Run Check Now","description":"Run the warehouse query and its ORM unit of work in a request worker.","operationId":"run_check_now_api_checks__check_id__run_post","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks/{check_id}/discussion":{"post":{"tags":["monitoring"],"summary":"Open Check Discussion","description":"Get-or-create the discussion thread of a proposed check.\n\nThe proposal page pairs the proposal with a chat where the reader iterates\non it (\"raise the threshold\", \"run it hourly\"). Mirrors\n``open_alert_investigation``: idempotent, seeded with a hidden context\nmessage so the agent edits THIS check in place (``update_check``) instead\nof proposing a sibling, and manager-only on governed databases — the\nconversation grant (``user_can_use_check_conversation``) restricts governed\nthreads to managers, so a non-manager owning the shared thread would strand\nevery later reader.","operationId":"open_check_discussion_api_checks__check_id__discussion_post","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Open Check Discussion Api Checks  Check Id  Discussion Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks/{check_id}/accept":{"post":{"tags":["monitoring"],"summary":"Accept Check Proposal","description":"Activate an agent-proposed check.\n\nManage-gated like create_check: activation authorizes full-scope, read-only\nscheduled warehouse work. The accepter is recorded as the activating\nauthor; later runs do not borrow their identity or membership.","operationId":"accept_check_proposal_api_checks__check_id__accept_post","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks/{check_id}/dismiss":{"post":{"tags":["monitoring"],"summary":"Dismiss Check Proposal","description":"Dismiss a proposal. The row is kept so the chat card renders its state.","operationId":"dismiss_check_proposal_api_checks__check_id__dismiss_post","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/alerts":{"get":{"tags":["monitoring"],"summary":"List Alerts","description":"List alerts for a database, filtered by state ('all' for every state,\n'live' for the still-standing ones: open, acknowledged, snoozed or known,\n'past' for the closed ones: resolved or dismissed), optionally scoped to\none check (the check detail's history).","operationId":"list_alerts_api_databases__database_id__alerts_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"open","title":"State"}},{"name":"check_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/alerts":{"get":{"tags":["monitoring"],"summary":"List Organization Alerts","description":"List alerts across every database the user can access.\n\nSame per-item shape and ``state``/``check_id`` semantics as the\nper-database endpoint, plus ``database_id``/``database_name`` per item.","operationId":"list_organization_alerts_api_organization_alerts_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"open","title":"State"}},{"name":"check_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Check Id"}},{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks/{check_id}/notes":{"get":{"tags":["monitoring"],"summary":"List Check Notes","description":"Notes the agent remembers for this check (newest first, max 20).\n\nManager-only on governed databases, mirroring the timeline rule — a note\nquotes business values, so non-managers get an empty list.","operationId":"list_check_notes_api_checks__check_id__notes_get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/monitoring-notes/{note_id}":{"get":{"tags":["monitoring"],"summary":"Get Monitoring Note","description":"One note, for the card a conversation shows when the agent wrote it.","operationId":"get_monitoring_note_api_monitoring_notes__note_id__get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["monitoring"],"summary":"Delete Monitoring Note","description":"Remove a topic or connection note: its author, a topic editor, or a\nmanager of the connection.","operationId":"delete_monitoring_note_api_monitoring_notes__note_id__delete","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/alerts/{alert_id}":{"get":{"tags":["monitoring"],"summary":"Get Alert","description":"Get a single alert (referenceable resource).","operationId":"get_alert_api_alerts__alert_id__get","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["monitoring"],"summary":"Update Alert","description":"Triage an alert: change state and/or severity, with an optional reason.","operationId":"update_alert_api_alerts__alert_id__put","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/alerts/{alert_id}/investigation":{"post":{"tags":["monitoring"],"summary":"Open Alert Investigation","description":"Get-or-create the alert's investigation conversation (3c).\n\nThe mail/inbox deep link lands here: a focused follow-up thread for THIS\nalert (and the sibling checks its details reference via ``<CHECK:id>``),\ndistinct from the mixed-topic review conversation. Idempotent — re-opening\nthe same alert returns the same conversation, so a refresh or a second click\non the email never spawns a new thread.\n\nGated on read access (like ``get_alert``) — except on governed databases,\nwhere it is manager-only: the conversation-load grant\n(``user_can_use_alert_conversation``) restricts governed threads to\nmanagers, so letting a non-manager create/own the alert's single shared\nthread would strand every later reader (and seed the thread with\nredacted context). Matches the review-conversation rule.","operationId":"open_alert_investigation_api_alerts__alert_id__investigation_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Open Alert Investigation Api Alerts  Alert Id  Investigation Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/monitoring-config":{"get":{"tags":["monitoring"],"summary":"Get Monitoring Config","description":"Get (or lazily create) the agent-wake config for a database.","operationId":"get_monitoring_config_api_databases__database_id__monitoring_config_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["monitoring"],"summary":"Update Monitoring Config","description":"Update the agent-wake cadence / enablement for a database.","operationId":"update_monitoring_config_api_databases__database_id__monitoring_config_put","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/monitoring-interest":{"get":{"tags":["monitoring"],"summary":"Get Monitoring Interest","description":"The caller's own notification interest (or null) — one per person.","operationId":"get_monitoring_interest_api_databases__database_id__monitoring_interest_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["monitoring"],"summary":"Update Monitoring Interest","description":"Upsert the caller's own notification interest; blank text deletes it.\n\nSelf-service only: the body carries no user id — each member manages\ntheir own intent, never someone else's.","operationId":"update_monitoring_interest_api_databases__database_id__monitoring_interest_put","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringInterestUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks/{check_id}/notify-me":{"post":{"tags":["monitoring"],"summary":"Notify Me About Check","description":"Fold a check's subject into the caller's own notification intent.\n\nAny member who can read the check may ask — including business users who\ncannot activate it: the intent names the subject, not the check, so it\nholds whether the proposal is accepted or not. The SQL never reaches the\nmodel (it may be governed); name, description and group are what a reader\nof the proposal card already sees.","operationId":"notify_me_about_check_api_checks__check_id__notify_me_post","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/monitoring-reviews":{"get":{"tags":["monitoring"],"summary":"List Reviews","description":"List recent agent-wake reviews for a database, newest first.","operationId":"list_reviews_api_databases__database_id__monitoring_reviews_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":50,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["monitoring"],"summary":"Trigger Review","description":"Manually trigger an agent-wake review for a database.","operationId":"trigger_review_api_databases__database_id__monitoring_reviews_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/checks/draft":{"post":{"tags":["monitoring"],"summary":"Draft Check","description":"Draft a check from a natural-language description. Persists nothing.\nAny steward may draft; the SQL is held to their tables when saved.","operationId":"draft_check_api_databases__database_id__checks_draft_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckDraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databases/{database_id}/checks/test":{"post":{"tags":["monitoring"],"summary":"Run Check Sql Test","description":"Run candidate check SQL once, read-only. Persists nothing.","operationId":"run_check_sql_test_api_databases__database_id__checks_test_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/monitoring-reviews":{"get":{"tags":["monitoring"],"summary":"List Organization Reviews","description":"Recent ORG reviews (fan-out parents), each with its sub-reviews.","operationId":"list_organization_reviews_api_organization_monitoring_reviews_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":30,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["monitoring"],"summary":"Trigger Organization Review","description":"Manually trigger the org fan-out review (org admins only).","operationId":"trigger_organization_review_api_organization_monitoring_reviews_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/monitoring-config":{"get":{"tags":["monitoring"],"summary":"Get Organization Monitoring Config","description":"Get (or lazily create) the org-level schedule for the fan-out review.","operationId":"get_organization_monitoring_config_api_organization_monitoring_config_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["monitoring"],"summary":"Update Organization Monitoring Config","description":"Update the org-level review schedule (org admins only).","operationId":"update_organization_monitoring_config_api_organization_monitoring_config_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/monitoring-interest":{"get":{"tags":["monitoring"],"summary":"Get Organization Monitoring Interest","description":"The caller's own notification interest (or null).","operationId":"get_organization_monitoring_interest_api_organization_monitoring_interest_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["monitoring"],"summary":"Update Organization Monitoring Interest","description":"Write the caller's own notification interest; blank text clears it.","operationId":"update_organization_monitoring_interest_api_organization_monitoring_interest_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringInterestUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checks/{check_id}/changes":{"get":{"tags":["monitoring"],"summary":"List Check Changes","description":"The check's journal, newest first (see ``read.recent_changes``).","operationId":"list_check_changes_api_checks__check_id__changes_get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/check-changes/{change_id}":{"get":{"tags":["monitoring"],"summary":"Get Change","description":"One journal entry — what a ``<CHANGE:id>`` citation in a review renders.","operationId":"get_change_api_check_changes__change_id__get","parameters":[{"name":"change_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Change Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/check-changes/{change_id}/revert":{"post":{"tags":["monitoring"],"summary":"Revert","description":"Undo an applied change: the check takes back its ``before`` values.","operationId":"revert_api_check_changes__change_id__revert_post","parameters":[{"name":"change_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Change Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/check-changes/{change_id}/apply":{"post":{"tags":["monitoring"],"summary":"Apply","description":"Accept a change the agent proposed on a locked check.","operationId":"apply_api_check_changes__change_id__apply_post","parameters":[{"name":"change_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Change Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/check-changes/{change_id}/decline":{"post":{"tags":["monitoring"],"summary":"Decline","description":"Refuse a proposed change; the check stays as it is.","operationId":"decline_api_check_changes__change_id__decline_post","parameters":[{"name":"change_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Change Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics":{"get":{"tags":["monitoring"],"summary":"List Topics","description":"Every topic the caller sees; the existing ones worth proposing to them\ncarry ``suggestedBecause`` (why, and their ``rank``).","operationId":"list_topics_api_organization_topics_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["monitoring"],"summary":"Create","operationId":"create_api_organization_topics_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/discovery":{"get":{"tags":["monitoring"],"summary":"Get Discovery","description":"The organisation's latest \"what should we follow?\" pass, or null.","operationId":"get_discovery_api_organization_topics_discovery_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/discover":{"post":{"tags":["monitoring"],"summary":"Start Discovery Pass","description":"Start a pass over the whole organisation.","operationId":"start_discovery_pass_api_organization_topics_discover_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DiscoveryStart"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}":{"get":{"tags":["monitoring"],"summary":"Get Topic","operationId":"get_topic_api_organization_topics__topic_id__get","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["monitoring"],"summary":"Patch Topic","operationId":"patch_topic_api_organization_topics__topic_id__patch","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["monitoring"],"summary":"Archive Topic","operationId":"archive_topic_api_organization_topics__topic_id__delete","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/delivery":{"put":{"tags":["monitoring"],"summary":"Put Delivery","operationId":"put_delivery_api_organization_topics__topic_id__delivery_put","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicDeliveryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/delivery/test":{"post":{"tags":["monitoring"],"summary":"Test Delivery","description":"Mail the caller what the topic would send now, from its checks' last\nresults. Nobody else is told and nothing is recorded.","operationId":"test_delivery_api_organization_topics__topic_id__delivery_test_post","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/accept":{"post":{"tags":["monitoring"],"summary":"Accept Topic","description":"Create a proposed topic: all its drafts start, its proposed subscribers\nare enrolled. All or nothing: activating a draft authorizes scheduled\nfull-scope work on its connection, so the accepter must manage every one\n(the rule of accepting a single check).","operationId":"accept_topic_api_organization_topics__topic_id__accept_post","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/dismiss":{"post":{"tags":["monitoring"],"summary":"Dismiss Topic","operationId":"dismiss_topic_api_organization_topics__topic_id__dismiss_post","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TopicDismiss"},{"type":"null"}],"title":"Body"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/subscription":{"post":{"tags":["monitoring"],"summary":"Subscribe","description":"Subscribe yourself as a reader. Editing is granted by the owner. Lifts a\nmute: following again by hand is the only way back.","operationId":"subscribe_api_organization_topics__topic_id__subscription_post","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["monitoring"],"summary":"Unsubscribe","description":"Stop following: the direct share goes, and a mute keeps the agent from\nsubscribing you again — and leaves you out of a team's subscription. It is\nthe refusal itself, not a setting: following again lifts it.","operationId":"unsubscribe_api_organization_topics__topic_id__subscription_delete","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/readings":{"get":{"tags":["monitoring"],"summary":"List Readings","operationId":"list_readings_api_organization_topics__topic_id__readings_get","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/journal":{"get":{"tags":["monitoring"],"summary":"Get Journal","description":"Changes on the topic's checks, notifications about its alerts and its\nnotes, newest first (see ``domains.topics.journal``).","operationId":"get_journal_api_organization_topics__topic_id__journal_get","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/topics/{topic_id}/notes":{"post":{"tags":["monitoring"],"summary":"Create Note","description":"Any member who sees the topic may write to its memory (the cockpit-note\nrule, ADR 0051): a reader who spots a known cause must be able to say so.","operationId":"create_note_api_organization_topics__topic_id__notes_post","parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicNoteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/config":{"get":{"tags":["nightly-review"],"summary":"Get Config","description":"Get the nightly review config for the current organisation.","operationId":"get_config_api_nightly_review_config_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["nightly-review"],"summary":"Create Config","description":"Create or replace the nightly review config for the current organisation.","operationId":"create_config_api_nightly_review_config_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NightlyReviewConfigCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["nightly-review"],"summary":"Update Config","description":"Update the nightly review config for the current organisation.","operationId":"update_config_api_nightly_review_config_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NightlyReviewConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/config/toggle":{"post":{"tags":["nightly-review"],"summary":"Toggle Config","description":"Toggle the nightly review on/off for the current organisation.","operationId":"toggle_config_api_nightly_review_config_toggle_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/conversations":{"get":{"tags":["nightly-review"],"summary":"List Conversations With Review Status","description":"List all org conversations with their review status.","operationId":"list_conversations_with_review_status_api_nightly_review_conversations_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/trigger":{"post":{"tags":["nightly-review"],"summary":"Trigger Nightly Review","description":"Manually trigger a nightly review run for the current organisation.","operationId":"trigger_nightly_review_api_nightly_review_trigger_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerReviewRequest","default":{"limit":50}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/trigger/{conversation_id}":{"post":{"tags":["nightly-review"],"summary":"Trigger Single Review","description":"Digest one conversation and run a single-digest consolidation.","operationId":"trigger_single_review_api_nightly_review_trigger__conversation_id__post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/retry-failed":{"post":{"tags":["nightly-review"],"summary":"Retry Failed Reviews","description":"Re-digest the failed reviews of a run date and re-run its failed runs\nwhose digests are intact.","operationId":"retry_failed_reviews_api_nightly_review_retry_failed_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryFailedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/runs":{"get":{"tags":["nightly-review"],"summary":"List Reviews","description":"List recent conversation reviews for the current organisation.","operationId":"list_reviews_api_nightly_review_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/runs/{review_id}":{"get":{"tags":["nightly-review"],"summary":"Get Review","description":"Get details of a specific conversation review.","operationId":"get_review_api_nightly_review_runs__review_id__get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/nights":{"get":{"tags":["nightly-review"],"summary":"List Nights","description":"One row per night with activity in the last ``days`` days: runs,\nreviews, failures, findings and what was written (by kind).","operationId":"list_nights_api_nightly_review_nights_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":14,"title":"Days"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/reviews":{"get":{"tags":["nightly-review"],"summary":"List Reviews Paginated","description":"List reviews grouped by consolidation run, paginated.\n\nReviews digested into a run share its group (status, summary and changes\nof the run agent); legacy per-conversation reviews keep the date grouping\nand their own changes. With ``date`` (a night, local to the organisation's\nreview timezone) the whole night is returned unpaginated; ``latest=true``\nstands for the most recent night with activity, which the response names.","operationId":"list_reviews_paginated_api_nightly_review_reviews_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date"}},{"name":"latest","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Latest"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/runs/{review_id}/changes":{"get":{"tags":["nightly-review"],"summary":"Get Review Changes","description":"Detail the changes one legacy review made: memory diffs, catalog\nwrites, suggestions and questions with their live status.","operationId":"get_review_changes_api_nightly_review_runs__review_id__changes_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nightly-review/nightly-runs/{run_id}/changes":{"get":{"tags":["nightly-review"],"summary":"Get Run Changes","description":"Detail the changes one consolidation run made.","operationId":"get_run_changes_api_nightly_review_nightly_runs__run_id__changes_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications":{"get":{"tags":["notifications"],"summary":"List Notifications","description":"List notifications for the caller's organisation, newest first, paginated.","operationId":"list_notifications_api_notifications_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database Id"}},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Mine"}},{"name":"unread","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"activity_kind","in":"query","required":false,"schema":{"anyOf":[{"enum":["question","decision","alert","exchange","news"],"type":"string"},{"type":"null"}],"title":"Activity Kind"}},{"name":"activity_period","in":"query","required":false,"schema":{"anyOf":[{"enum":["recent","history"],"type":"string"},{"type":"null"}],"title":"Activity Period"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"activity_sort","in":"query","required":false,"schema":{"anyOf":[{"enum":["priority","recent"],"type":"string"},{"type":"null"}],"title":"Activity Sort"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/unread-count":{"get":{"tags":["notifications"],"summary":"Unread Count","description":"Number of unread notifications addressed to the caller (the bell badge).","operationId":"unread_count_api_notifications_unread_count_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/read-all":{"post":{"tags":["notifications"],"summary":"Mark All Read","description":"Mark all of the caller's unread notifications as read.","operationId":"mark_all_read_api_notifications_read_all_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/{notification_id}/read":{"post":{"tags":["notifications"],"summary":"Mark Read","description":"Mark a single notification (addressed to the caller) as read.","operationId":"mark_read_api_notifications__notification_id__read_post","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/stats":{"get":{"tags":["notifications"],"summary":"Notification Stats","description":"Aggregate counts by channel / status / type ('which channel, how much').","operationId":"notification_stats_api_notifications_stats_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects":{"get":{"tags":["project"],"summary":"Get Projects","description":"Projects visible to the caller per SharableMixin rules, restricted to\nthose with at least one connection the caller reaches.","operationId":"get_projects_api_projects_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["project"],"summary":"Create Project","description":"Create a new project.","operationId":"create_project_api_projects_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{project_id}":{"get":{"tags":["project"],"summary":"Get Project","description":"Get a specific project.","operationId":"get_project_api_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["project"],"summary":"Update Project","description":"Update a project.\n\nThe caller edits what they reach: connections, tables, terms and documents\nof connections they cannot reach are kept as they are.","operationId":"update_project_api_projects__project_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["project"],"summary":"Delete Project","description":"Delete a project.","operationId":"delete_project_api_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/query/{query_id}/favorite":{"post":{"tags":["project"],"summary":"Toggle Query Favorite","description":"Toggle favorite status for a query.","operationId":"toggle_query_favorite_api_query__query_id__favorite_post","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chart/{chart_id}":{"get":{"tags":["project"],"summary":"Get Chart","description":"Get a chart by ID.","operationId":"get_chart_api_chart__chart_id__get","parameters":[{"name":"chart_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chart Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chart/{chart_id}/favorite":{"post":{"tags":["project"],"summary":"Toggle Chart Favorite","description":"Toggle favorite status for a chart.","operationId":"toggle_chart_favorite_api_chart__chart_id__favorite_post","parameters":[{"name":"chart_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chart Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/favorites":{"get":{"tags":["project"],"summary":"Get Favorites","description":"Get all favorited queries and charts for the current user.\n\nWithout ``contextId`` the listing is org-wide: every favorite whose query\nlives on a database the user can access (same access rule as /queries).","operationId":"get_favorites_api_favorites_get","parameters":[{"name":"contextId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contextid"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mentions/users":{"get":{"tags":["mentions"],"summary":"Get Mention Users","description":"Org members for @user mention autocomplete. Non-admin (unlike /users).","operationId":"get_mention_users_api_mentions_users_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mentions/teams":{"get":{"tags":["mentions"],"summary":"Get Mention Teams","description":"Org teams for @team mention autocomplete. Non-admin (mirrors /mentions/users).","operationId":"get_mention_teams_api_mentions_teams_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contexts/{context_id}/mentions/recent":{"get":{"tags":["mentions"],"summary":"Get Recent Mentions","description":"Get the last 5 recently updated items of each requested type.\n\nReturns:\n    JSON with queries, charts, documents, terms, metrics and topics arrays sorted by updatedAt","operationId":"get_recent_mentions_api_contexts__context_id__mentions_recent_get","parameters":[{"name":"context_id","in":"path","required":true,"schema":{"type":"string","title":"Context Id"}},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Types"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contexts/{context_id}/mentions/search":{"get":{"tags":["mentions"],"summary":"Search Mentions","description":"Search queries, charts, documents, terms, metrics and topics by title/content.\n\nQuery Parameters:\n    - q: Search string to filter by title/SQL content (required)\n    - limit: Maximum number of results per type (default: 25, max: 50)\n    - types: Mention types to search (default: all)\n\nReturns:\n    JSON with queries, charts, documents, terms, metrics and topics arrays matching the search","operationId":"search_mentions_api_contexts__context_id__mentions_search_get","parameters":[{"name":"context_id","in":"path","required":true,"schema":{"type":"string","title":"Context Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search string","title":"Q"},"description":"Search string"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"description":"Maximum results per type","default":25,"title":"Limit"},"description":"Maximum results per type"},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Types"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/query/_run":{"post":{"tags":["query"],"summary":"Run Query","description":"Run a query against the database.\n\nReturns:\n    {\"rows\": [...], \"count\": int, \"columns\": [...]}","operationId":"run_query_api_query__run_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/query/_cancel":{"post":{"tags":["query"],"summary":"Cancel Running Query","description":"Cancel an in-flight query execution for current user.","operationId":"cancel_running_query_api_query__cancel_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/query":{"post":{"tags":["query"],"summary":"Create Query","description":"Create a new saved query.","operationId":"create_query_api_query_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/query/{query_id}":{"get":{"tags":["query"],"summary":"Get Query By Id","description":"Get a query by ID.","operationId":"get_query_by_id_api_query__query_id__get","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["query"],"summary":"Update Query By Id","description":"Update a query by ID.","operationId":"update_query_by_id_api_query__query_id__put","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/queries":{"get":{"tags":["query"],"summary":"List Queries","description":"List all queries accessible to the user's organization, paginated.","operationId":"list_queries_api_queries_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"favorites_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Favorites Only"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/query/{query_id}/results":{"get":{"tags":["query"],"summary":"Get Query Results By Id","description":"Get the results of a query.\nShould only be used for conversation.","operationId":"get_query_results_by_id_api_query__query_id__results_get","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resources/{resource_type}/{resource_id}/shares":{"get":{"tags":["sharing"],"summary":"List Shares","operationId":"list_shares_api_resources__resource_type___resource_id__shares_get","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["sharing"],"summary":"Create Share","operationId":"create_share_api_resources__resource_type___resource_id__shares_post","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resources/{resource_type}/{resource_id}/shares/{share_id}":{"delete":{"tags":["sharing"],"summary":"Revoke Share","operationId":"revoke_share_api_resources__resource_type___resource_id__shares__share_id__delete","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}},{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sharing/grantees":{"get":{"tags":["sharing"],"summary":"List Grantees","description":"Non-admin-readable directory used by the share dialog.\n\nReturns the teams and users in the caller's organisation so resource\nowners (who may not be org admins) can populate the picker. Scoped to\nthe caller's org — never crosses tenants.","operationId":"list_grantees_api_sharing_grantees_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users":{"get":{"tags":["users"],"summary":"List Users","description":"List members of the authenticated organisation, with its own roles.","operationId":"list_users_api_users_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/invitations":{"get":{"tags":["users"],"summary":"List Invitations","description":"List pending organisation invitations via proxy (WorkOS source of truth).","operationId":"list_invitations_api_users_invitations_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/invite":{"post":{"tags":["users"],"summary":"Invite User","description":"Invite a user to the organization via proxy.","operationId":"invite_user_api_users_invite_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/{user_id}/role":{"put":{"tags":["users"],"summary":"Update User Role","description":"Update a user's role in the organization via proxy.","operationId":"update_user_role_api_users__user_id__role_put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/{user_id}":{"delete":{"tags":["users"],"summary":"Remove User","description":"Remove a user from the organization via proxy.","operationId":"remove_user_api_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/policies":{"get":{"tags":["governance","governance"],"summary":"List Policies","operationId":"list_policies_api_governance_policies_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["governance","governance"],"summary":"Create Policy","operationId":"create_policy_api_governance_policies_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/policies/{policy_id}":{"patch":{"tags":["governance","governance"],"summary":"Update Policy","operationId":"update_policy_api_governance_policies__policy_id__patch","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Policy Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["governance","governance"],"summary":"Delete Policy","operationId":"delete_policy_api_governance_policies__policy_id__delete","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Policy Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/protected-columns":{"get":{"tags":["governance","governance"],"summary":"List Protected Columns","operationId":"list_protected_columns_api_governance_protected_columns_get","parameters":[{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["governance","governance"],"summary":"Protect Column","description":"Mask a column for everyone on its connection, admins and agent included.","operationId":"protect_column_api_governance_protected_columns_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtectedColumnCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/protected-columns/{protected_id}":{"delete":{"tags":["governance","governance"],"summary":"Unprotect Column","operationId":"unprotect_column_api_governance_protected_columns__protected_id__delete","parameters":[{"name":"protected_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Protected Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/grants":{"get":{"tags":["governance","governance"],"summary":"List Grants","operationId":"list_grants_api_governance_grants_get","parameters":[{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["governance","governance"],"summary":"Create Grant","operationId":"create_grant_api_governance_grants_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/grants/{grant_id}":{"delete":{"tags":["governance","governance"],"summary":"Delete Grant","operationId":"delete_grant_api_governance_grants__grant_id__delete","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Grant Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/stewardship":{"get":{"tags":["governance","governance"],"summary":"List Stewardship","description":"Per connection of the org, what ``team_id`` is steward of.","operationId":"list_stewardship_api_governance_stewardship_get","parameters":[{"name":"team_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["governance","governance"],"summary":"Set Connection Steward","description":"Make a team steward of a whole connection — every warehouse database\nits catalog knows — or take that back. Granting creates the missing\ndatabase-level policies as ``read`` (a steward reads what it answers for);\na team masked or denied anywhere on the connection is refused (400).\nRevoking clears the database-level flags only: narrower grants stay.","operationId":"set_connection_steward_api_governance_stewardship_put","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionSteward"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/mcp-servers/{server_id}/restriction":{"patch":{"tags":["governance","governance"],"summary":"Toggle Mcp Restriction","description":"Open an MCP server to the whole org, or restrict it to the teams that\nhold a grant on it.","operationId":"toggle_mcp_restriction_api_governance_mcp_servers__server_id__restriction_patch","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRestrictionToggle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/databases/{database_id}/governance":{"patch":{"tags":["governance","governance"],"summary":"Toggle Governance","description":"Enable or disable governance for a database (admin only).","operationId":"toggle_governance_api_governance_databases__database_id__governance_patch","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernanceToggle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/sync":{"post":{"tags":["governance","governance"],"summary":"Trigger Governance Sync","description":"Trigger governance import from the warehouse's RBAC system.","operationId":"trigger_governance_sync_api_governance_sync_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernanceSyncRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/sync/{database_id}/status":{"get":{"tags":["governance","governance"],"summary":"Get Governance Sync Status","description":"Check the status of a governance sync operation.","operationId":"get_governance_sync_status_api_governance_sync__database_id__status_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/directory-sync":{"post":{"tags":["governance","governance"],"summary":"Trigger Directory Sync Endpoint","description":"Sync org roster, then directory groups if enabled.\n\nPrefers the org's service token (long-lived) over the admin's sealed\nsession (short TTL, rotates on refresh) so repeat clicks don't 401.","operationId":"trigger_directory_sync_endpoint_api_governance_directory_sync_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/teams":{"get":{"tags":["governance","teams"],"summary":"List Teams","description":"List the organisation's teams, paginated.","operationId":"list_teams_api_governance_teams_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["governance","teams"],"summary":"Create Team","operationId":"create_team_api_governance_teams_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/teams/{team_id}":{"get":{"tags":["governance","teams"],"summary":"Get Team","operationId":"get_team_api_governance_teams__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["governance","teams"],"summary":"Update Team","operationId":"update_team_api_governance_teams__team_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["governance","teams"],"summary":"Delete Team","operationId":"delete_team_api_governance_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/teams/{team_id}/members":{"get":{"tags":["governance","teams"],"summary":"List Team Members","operationId":"list_team_members_api_governance_teams__team_id__members_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["governance","teams"],"summary":"Add Team Member","operationId":"add_team_member_api_governance_teams__team_id__members_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberAdd"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/teams/{team_id}/members/{user_id}":{"delete":{"tags":["governance","teams"],"summary":"Remove Team Member","operationId":"remove_team_member_api_governance_teams__team_id__members__user_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/showcases/generate":{"post":{"tags":["showcase"],"summary":"Trigger Showcase Generation","description":"Trigger showcase generation for the first public database.\n\nEnsures the org service token is provisioned, then dispatches generation.","operationId":"trigger_showcase_generation_api_showcases_generate_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat-integrations/slack/events":{"post":{"tags":["chat-integrations"],"summary":"Slack Events","operationId":"slack_events_api_chat_integrations_slack_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat-integrations/teams/messages":{"post":{"tags":["chat-integrations"],"summary":"Teams Messages","operationId":"teams_messages_api_chat_integrations_teams_messages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat-integrations":{"post":{"tags":["chat-integrations"],"summary":"Install Integration","operationId":"install_integration_api_chat_integrations_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIntegrationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIntegrationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["chat-integrations"],"summary":"List Integrations","operationId":"list_integrations_api_chat_integrations_get","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatIntegrationOut"},"title":"Response List Integrations Api Chat Integrations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat-integrations/{integration_id}":{"delete":{"tags":["chat-integrations"],"summary":"Delete Integration","operationId":"delete_integration_api_chat_integrations__integration_id__delete","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat-integrations/link/confirm":{"post":{"tags":["chat-integrations"],"summary":"Confirm Link","operationId":"confirm_link_api_chat_integrations_link_confirm_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkConfirmIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events":{"get":{"tags":["sse"],"summary":"Sse Events","description":"Unified SSE endpoint for real-time events.\n\nQuery params define room subscriptions:\n- conversation_id -> joins conversation:{id} room\n- database_id -> joins catalog:database:{id} room\n- Always joins user:{user_id} room\n\nEvents:\n- ping: Keepalive (every 30s)\n- status: Conversation status updates\n- queryUpdated: Query state changes\n- runningStatuses: Initial running conversation statuses (on connect)\n- catalog:*: Catalog events (asset updates, sync progress, etc.)\n- error: Error messages","operationId":"sse_events_api_events_get","parameters":[{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"}},{"name":"database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Id"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events/subscribe":{"post":{"tags":["sse"],"summary":"Subscribe To Room","description":"Subscribe to a room on existing SSE connection.\n\nAllows dynamic room subscription without reconnecting the SSE connection.\nThis is the recommended approach for changing rooms per SSE best practices.","operationId":"subscribe_to_room_api_events_subscribe_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events/unsubscribe":{"post":{"tags":["sse"],"summary":"Unsubscribe From Room","description":"Unsubscribe from a room on existing SSE connection.\n\nAllows dynamic room unsubscription without reconnecting the SSE connection.","operationId":"unsubscribe_from_room_api_events_unsubscribe_post","parameters":[{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["health"],"summary":"Health Check","description":"Health check endpoint for container orchestration.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sitemap.xml":{"get":{"tags":["seo"],"summary":"Sitemap Xml","description":"Generate sitemap.xml with public routes and reports.","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp-login":{"get":{"summary":"Mcp Login Page","description":"Show the MCP OAuth consent page.","operationId":"mcp_login_page_mcp_login_get","parameters":[{"name":"session","in":"query","required":false,"schema":{"type":"string","default":"","title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-login/cancel":{"post":{"summary":"Mcp Login Cancel","description":"User denied authorization — redirect back to the MCP client.","operationId":"mcp_login_cancel_mcp_login_cancel_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_mcp_login_cancel_mcp_login_cancel_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-auth/start":{"get":{"summary":"Mcp Auth Start","description":"Redirect user to infra proxy login for MCP OAuth.","operationId":"mcp_auth_start_mcp_auth_start_get","parameters":[{"name":"session","in":"query","required":false,"schema":{"type":"string","default":"","title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-auth/finalize":{"get":{"summary":"Mcp Auth Finalize","description":"Complete MCP OAuth using sealed session from /api/auth/complete.","operationId":"mcp_auth_finalize_mcp_auth_finalize_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Index","description":"Serve SPA entry point.","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/{path}":{"get":{"summary":"Static Files","description":"Serve static files or fall back to index.html for SPA routes.\n\nThis handles client-side routing by returning index.html for\nany path that doesn't match a static file.","operationId":"static_files__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActivityCreate":{"properties":{"content":{"type":"string","title":"Content"},"mentions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mentions"},"team_mentions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Team Mentions"}},"type":"object","required":["content"],"title":"ActivityCreate"},"AlertUpdate":{"properties":{"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"snoozed_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Snoozed Until"},"remember":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Remember"}},"type":"object","title":"AlertUpdate"},"AssetUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"ai_suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Suggestion"},"ai_suggested_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ai Suggested Tags"},"tag_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tag Ids"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"certified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Certified"}},"type":"object","title":"AssetUpdate"},"AuditRunCreate":{"properties":{"focus":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Focus"}},"type":"object","title":"AuditRunCreate"},"AutomationCreate":{"properties":{"name":{"type":"string","title":"Name"},"prompt":{"type":"string","maxLength":190000,"title":"Prompt"},"schedule_type":{"type":"string","title":"Schedule Type"},"schedule_time":{"type":"string","title":"Schedule Time"},"schedule_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schedule Day"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id"},"notification_settings":{"anyOf":[{"$ref":"#/components/schemas/ReportAlertSettings"},{"type":"null"}]}},"type":"object","required":["name","prompt","schedule_type","schedule_time"],"title":"AutomationCreate"},"AutomationUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"prompt":{"anyOf":[{"type":"string","maxLength":190000},{"type":"null"}],"title":"Prompt"},"schedule_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule Type"},"schedule_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule Time"},"schedule_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schedule Day"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id"},"notification_settings":{"anyOf":[{"$ref":"#/components/schemas/ReportAlertSettings"},{"type":"null"}]}},"type":"object","title":"AutomationUpdate"},"Body_mcp_login_cancel_mcp_login_cancel_post":{"properties":{"session":{"type":"string","title":"Session"}},"type":"object","required":["session"],"title":"Body_mcp_login_cancel_mcp_login_cancel_post"},"Body_upload_file_to_conversation_api_conversations__conversation_id__files_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_to_conversation_api_conversations__conversation_id__files_post"},"CancelQueryRequest":{"properties":{"executionId":{"type":"string","title":"Executionid"}},"type":"object","required":["executionId"],"title":"CancelQueryRequest"},"ChatIntegrationCreate":{"properties":{"platform":{"type":"string","title":"Platform"},"external_workspace_id":{"type":"string","title":"External Workspace Id"},"display_name":{"type":"string","title":"Display Name"},"credentials":{"additionalProperties":true,"type":"object","title":"Credentials"}},"type":"object","required":["platform","external_workspace_id","display_name","credentials"],"title":"ChatIntegrationCreate"},"ChatIntegrationOut":{"properties":{"id":{"type":"string","title":"Id"},"platform":{"type":"string","title":"Platform"},"external_workspace_id":{"type":"string","title":"External Workspace Id"},"display_name":{"type":"string","title":"Display Name"},"is_active":{"type":"boolean","title":"Is Active"},"installed_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installed By User Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"app_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Id"}},"type":"object","required":["id","platform","external_workspace_id","display_name","is_active","installed_by_user_id","createdAt"],"title":"ChatIntegrationOut"},"CheckCreate":{"properties":{"name":{"type":"string","title":"Name"},"check_sql":{"type":"string","title":"Check Sql"},"severity":{"type":"string","title":"Severity","default":"MEDIUM"},"interval_minutes":{"type":"integer","title":"Interval Minutes","default":60},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"group_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Name"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"topic_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Topic Ids"}},"type":"object","required":["name","check_sql"],"title":"CheckCreate"},"CheckDelete":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"CheckDelete"},"CheckDraftRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"draft_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Id"}},"type":"object","required":["prompt"],"title":"CheckDraftRequest"},"CheckTestRequest":{"properties":{"check_sql":{"type":"string","title":"Check Sql"}},"type":"object","required":["check_sql"],"title":"CheckTestRequest"},"CheckUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"check_sql":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Sql"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"interval_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Minutes"},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"group_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Name"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"topic_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Topic Ids"},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked"}},"type":"object","title":"CheckUpdate"},"CockpitBlockPatch":{"properties":{"status":{"type":"string","enum":["active","archived"],"title":"Status"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"width":{"anyOf":[{"type":"string","enum":["quarter","third","half","two-thirds","full"]},{"type":"null"}],"title":"Width"}},"type":"object","required":["status"],"title":"CockpitBlockPatch"},"CockpitPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"mission":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mission"},"temporaryGoal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporarygoal"},"endsAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endsat"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"},"rhythm":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rhythm"},"dataRefreshIntervalMinutes":{"anyOf":[{"type":"integer","enum":[60,360,1440]},{"type":"null"}],"title":"Datarefreshintervalminutes"}},"type":"object","title":"CockpitPatch"},"CockpitRefreshRequest":{"properties":{"force":{"type":"boolean","title":"Force","default":false}},"type":"object","title":"CockpitRefreshRequest"},"ConnectionSteward":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"steward":{"type":"boolean","title":"Steward"}},"type":"object","required":["team_id","database_id","steward"],"title":"ConnectionSteward"},"ConnectionTest":{"properties":{"engine":{"type":"string","title":"Engine"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["engine","details"],"title":"ConnectionTest"},"ConversationArchive":{"properties":{"archived":{"type":"boolean","title":"Archived","default":true}},"type":"object","title":"ConversationArchive"},"ConversationCreate":{"properties":{"contextId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contextid"},"kind":{"type":"string","title":"Kind","default":"chat"},"assetId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assetid"},"databaseIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Databaseids"}},"type":"object","title":"ConversationCreate"},"ConversationFileOut":{"properties":{"id":{"type":"string","title":"Id"},"alias":{"type":"string","title":"Alias"},"mime":{"type":"string","title":"Mime"},"original_filename":{"type":"string","title":"Original Filename"},"size_bytes":{"type":"integer","title":"Size Bytes"},"sheets":{"items":{},"type":"array","title":"Sheets"}},"type":"object","required":["id","alias","mime","original_filename","size_bytes","sheets"],"title":"ConversationFileOut"},"ConversationUpdate":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"ConversationUpdate"},"ConversationVisibilityUpdate":{"properties":{"visibility":{"type":"string","title":"Visibility"}},"type":"object","required":["visibility"],"title":"ConversationVisibilityUpdate"},"CreateQueryRequest":{"properties":{"databaseId":{"type":"string","title":"Databaseid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"sql":{"type":"string","title":"Sql"}},"type":"object","required":["databaseId","sql"],"title":"CreateQueryRequest"},"CreateTokenRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateTokenRequest"},"DBTConnectionConfig":{"properties":{"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"remove":{"type":"boolean","title":"Remove","default":false},"target_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Target Overrides"}},"type":"object","title":"DBTConnectionConfig"},"DBTConnectionTestPayload":{"properties":{"target_overrides":{"additionalProperties":true,"type":"object","title":"Target Overrides"}},"type":"object","required":["target_overrides"],"title":"DBTConnectionTestPayload"},"DBTProjectCreate":{"properties":{"project_path":{"type":"string","title":"Project Path","default":"."},"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"DBTProjectCreate"},"DBTProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"DBTProjectUpdate"},"DatabaseCreate":{"properties":{"name":{"type":"string","title":"Name"},"engine":{"type":"string","title":"Engine"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"write_mode":{"type":"string","enum":["read-only","confirmation","skip-confirmation"],"title":"Write Mode"}},"type":"object","required":["name","engine","details","write_mode"],"title":"DatabaseCreate"},"DatabaseMemoryUpdate":{"properties":{"memory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory"}},"type":"object","title":"DatabaseMemoryUpdate"},"DatabaseShare":{"properties":{"share_to_organisation":{"type":"boolean","title":"Share To Organisation","default":false}},"type":"object","title":"DatabaseShare"},"DatabaseUpdate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"engine":{"type":"string","title":"Engine"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"write_mode":{"type":"string","enum":["read-only","confirmation","skip-confirmation"],"title":"Write Mode"}},"type":"object","required":["name","description","engine","details","write_mode"],"title":"DatabaseUpdate"},"DeferralBody":{"properties":{"deferred":{"type":"boolean","title":"Deferred"}},"type":"object","required":["deferred"],"title":"DeferralBody"},"DiscoveryStart":{"properties":{"trigger":{"type":"string","pattern":"^(button|activation)$","title":"Trigger","default":"button"}},"type":"object","title":"DiscoveryStart"},"DiscussionSource":{"properties":{"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","format":"uuid","title":"Source Id"}},"type":"object","required":["source_type","source_id"],"title":"DiscussionSource"},"DocumentActivityCreate":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"section_anchor":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Section Anchor"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"mentions":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Mentions"},"quote":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Quote"}},"type":"object","required":["content"],"title":"DocumentActivityCreate"},"DocumentActivityPatch":{"properties":{"content":{"anyOf":[{"type":"string","maxLength":10000,"minLength":1},{"type":"null"}],"title":"Content"},"resolved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolved"}},"type":"object","title":"DocumentActivityPatch"},"DocumentArchive":{"properties":{"archived":{"type":"boolean","title":"Archived","default":true}},"type":"object","title":"DocumentArchive"},"DocumentCreate":{"properties":{"title":{"type":"string","title":"Title","default":"Untitled Report"}},"type":"object","title":"DocumentCreate"},"DocumentUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"change_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Description"},"visibility":{"anyOf":[{"type":"string","enum":["private","scoped","everyone"]},{"type":"null"}],"title":"Visibility"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"},"base_rev":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Base Rev"},"base_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Content"},"force_new_version":{"type":"boolean","title":"Force New Version","default":false}},"type":"object","title":"DocumentUpdate"},"FollowersPut":{"properties":{"followers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Followers"}},"type":"object","required":["followers"],"title":"FollowersPut"},"GithubAppConnect":{"properties":{"installation_id":{"type":"integer","title":"Installation Id"}},"type":"object","required":["installation_id"],"title":"GithubAppConnect"},"GithubRepoAdd":{"properties":{"owner":{"type":"string","title":"Owner"},"name":{"type":"string","title":"Name"},"default_branch":{"type":"string","title":"Default Branch","default":"main"}},"type":"object","required":["owner","name"],"title":"GithubRepoAdd"},"GithubRepoUpdate":{"properties":{"default_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Branch"}},"type":"object","title":"GithubRepoUpdate"},"GithubSettingsUpdate":{"properties":{"installation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Installation Id"}},"type":"object","title":"GithubSettingsUpdate"},"GovernanceSyncRequest":{"properties":{"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"GovernanceSyncRequest"},"GovernanceToggle":{"properties":{"governance_enabled":{"type":"boolean","title":"Governance Enabled"}},"type":"object","required":["governance_enabled"],"title":"GovernanceToggle"},"GrantCreate":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"capability":{"type":"string","title":"Capability"},"target_type":{"type":"string","title":"Target Type","default":"mcp_server"},"target_id":{"type":"string","format":"uuid","title":"Target Id"},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools"},"base_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Level"}},"type":"object","required":["team_id","capability","target_id"],"title":"GrantCreate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InitializeQuotasRequest":{"properties":{"user_ids":{"items":{"type":"string"},"type":"array","title":"User Ids"},"monthly_quota_per_user":{"type":"integer","title":"Monthly Quota Per User"},"user_emails":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"User Emails"}},"type":"object","required":["user_ids","monthly_quota_per_user"],"title":"InitializeQuotasRequest"},"InstructionsUpdate":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"InstructionsUpdate"},"InviteUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","title":"Role","default":"member"}},"type":"object","required":["email"],"title":"InviteUserRequest"},"IssueUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"IssueUpdate"},"LeverAssigneeUpdate":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"expected_version":{"type":"integer","title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"LeverAssigneeUpdate"},"LeverFollowUpUpdate":{"properties":{"follow_up":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Follow Up"},"note":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Note"}},"type":"object","title":"LeverFollowUpUpdate"},"LinkConfirmIn":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"LinkConfirmIn"},"McpAuthConfig":{"properties":{"type":{"type":"string","enum":["none","bearer","headers","oauth"],"title":"Type","default":"none"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","title":"McpAuthConfig"},"McpRestrictionToggle":{"properties":{"team_restricted":{"type":"boolean","title":"Team Restricted"}},"type":"object","required":["team_restricted"],"title":"McpRestrictionToggle"},"McpServerCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"url":{"type":"string","maxLength":2000,"minLength":1,"title":"Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/McpAuthConfig"},{"type":"null"}]},"scope":{"type":"string","enum":["organisation","personal"],"title":"Scope","default":"organisation"}},"type":"object","required":["name","url"],"title":"McpServerCreate"},"McpServerTest":{"properties":{"url":{"type":"string","maxLength":2000,"minLength":1,"title":"Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/McpAuthConfig"},{"type":"null"}]}},"type":"object","required":["url"],"title":"McpServerTest"},"McpServerUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"url":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/McpAuthConfig"},{"type":"null"}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"McpServerUpdate"},"McpToolToggle":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"McpToolToggle"},"MemoryUpdate":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"MemoryUpdate"},"MonitoringConfigUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"wake_interval_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wake Interval Minutes"},"start_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Hour"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","title":"MonitoringConfigUpdate"},"MonitoringInterestUpdate":{"properties":{"text":{"type":"string","maxLength":1000,"title":"Text"}},"type":"object","required":["text"],"title":"MonitoringInterestUpdate"},"NewTermSuggestionCreate":{"properties":{"name":{"type":"string","title":"Name"},"definition":{"type":"string","title":"Definition"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["name","definition"],"title":"NewTermSuggestionCreate"},"NightlyReviewConfigCreate":{"properties":{"schedule_time":{"type":"string","title":"Schedule Time","default":"02:00"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"lookback_hours":{"type":"integer","title":"Lookback Hours","default":24},"min_messages":{"type":"integer","title":"Min Messages","default":4}},"type":"object","title":"NightlyReviewConfigCreate"},"NightlyReviewConfigUpdate":{"properties":{"schedule_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"lookback_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lookback Hours"},"min_messages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Messages"}},"type":"object","title":"NightlyReviewConfigUpdate"},"NoteCreate":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"NoteCreate"},"OrganisationUpdate":{"properties":{"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","title":"OrganisationUpdate"},"PolicyCreate":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"scope_type":{"type":"string","title":"Scope Type"},"scope_database":{"type":"string","title":"Scope Database"},"scope_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Schema"},"scope_table":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Table"},"scope_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Column"},"permission":{"type":"string","title":"Permission"},"catalog_edit":{"type":"boolean","title":"Catalog Edit","default":false}},"type":"object","required":["team_id","database_id","scope_type","scope_database","permission"],"title":"PolicyCreate"},"PolicyUpdate":{"properties":{"permission":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permission"},"catalog_edit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Catalog Edit"}},"type":"object","title":"PolicyUpdate"},"PreviewRequest":{"properties":{"schedule_type":{"type":"string","title":"Schedule Type"},"schedule_time":{"type":"string","title":"Schedule Time"},"schedule_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schedule Day"},"timezone":{"type":"string","title":"Timezone","default":"UTC"}},"type":"object","required":["schedule_type","schedule_time"],"title":"PreviewRequest"},"ProjectCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"databaseIds":{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1,"title":"Databaseids"},"visibility":{"type":"string","enum":["private","scoped","everyone"],"title":"Visibility","default":"private"},"tables":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProjectTableCreate"},"type":"array"},{"type":"null"}],"title":"Tables"},"termIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Termids"},"documentIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Documentids"},"topicIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Topicids"}},"type":"object","required":["name","description","databaseIds"],"title":"ProjectCreate"},"ProjectTableCreate":{"properties":{"databaseId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Databaseid"},"databaseName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Databasename"},"schemaName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schemaname"},"tableName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tablename"}},"type":"object","title":"ProjectTableCreate"},"ProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"databaseIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1},{"type":"null"}],"title":"Databaseids"},"visibility":{"anyOf":[{"type":"string","enum":["private","scoped","everyone"]},{"type":"null"}],"title":"Visibility"},"tables":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProjectTableCreate"},"type":"array"},{"type":"null"}],"title":"Tables"},"termIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Termids"},"documentIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Documentids"},"topicIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Topicids"}},"type":"object","title":"ProjectUpdate"},"ProtectedColumnCreate":{"properties":{"database_id":{"type":"string","format":"uuid","title":"Database Id"},"scope_database":{"type":"string","title":"Scope Database"},"scope_schema":{"type":"string","title":"Scope Schema"},"scope_table":{"type":"string","title":"Scope Table"},"scope_column":{"type":"string","title":"Scope Column"}},"type":"object","required":["database_id","scope_database","scope_schema","scope_table","scope_column"],"title":"ProtectedColumnCreate"},"ReportAlertSettings":{"properties":{"mode":{"type":"string","enum":["significant","condition"],"title":"Mode","default":"significant"},"condition":{"type":"string","maxLength":4000,"title":"Condition","default":""},"channel":{"type":"string","enum":["email","slack"],"title":"Channel","default":"email"},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Id"},"channel_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Channel Id"},"channel_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Channel Name"}},"additionalProperties":false,"type":"object","title":"ReportAlertSettings"},"RetryFailedRequest":{"properties":{"date":{"type":"string","title":"Date"}},"type":"object","required":["date"],"title":"RetryFailedRequest"},"RunQueryRequest":{"properties":{"databaseId":{"type":"string","title":"Databaseid"},"query":{"type":"string","title":"Query"},"executionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Executionid"},"queryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queryid"}},"type":"object","required":["databaseId","query"],"title":"RunQueryRequest"},"SectionsUpdate":{"properties":{"sections":{"additionalProperties":{"type":"string"},"type":"object","title":"Sections"}},"type":"object","required":["sections"],"title":"SectionsUpdate"},"ShareCreate":{"properties":{"grantee_type":{"type":"string","enum":["user","team"],"title":"Grantee Type"},"grantee_id":{"type":"string","title":"Grantee Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["grantee_type","grantee_id"],"title":"ShareCreate"},"SubscriptionRequest":{"properties":{"room_type":{"type":"string","title":"Room Type"},"room_id":{"type":"string","title":"Room Id"},"sse_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sse Connection Id"}},"type":"object","required":["room_type","room_id"],"title":"SubscriptionRequest","description":"Request body for room subscription endpoints."},"SuggestionCreate":{"properties":{"field":{"type":"string","enum":["description","tags"],"title":"Field"},"proposed_value":{"title":"Proposed Value"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["field","proposed_value"],"title":"SuggestionCreate"},"SuggestionResolve":{"properties":{"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note"}},"type":"object","title":"SuggestionResolve"},"TagCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["name"],"title":"TagCreate"},"TagUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","title":"TagUpdate"},"TeamCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"TeamCreate"},"TeamMemberAdd":{"properties":{"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["user_id"],"title":"TeamMemberAdd"},"TeamUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"TeamUpdate"},"TermCreate":{"properties":{"name":{"type":"string","title":"Name"},"definition":{"type":"string","title":"Definition"},"synonyms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Synonyms"},"business_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Business Domains"},"related_term_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Related Term Ids"}},"type":"object","required":["name","definition"],"title":"TermCreate"},"TermSuggestionCreate":{"properties":{"proposed_value":{"type":"string","title":"Proposed Value"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["proposed_value"],"title":"TermSuggestionCreate"},"TermUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"definition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition"},"synonyms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Synonyms"},"business_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Business Domains"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"certified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Certified"},"ai_suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Suggestion"},"related_term_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Related Term Ids"}},"type":"object","title":"TermUpdate"},"TopicCreate":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name"},"charter":{"type":"string","maxLength":2000,"title":"Charter","default":""},"icon":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Icon"},"check_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Check Ids"},"visibility":{"type":"string","title":"Visibility","default":"everyone"}},"type":"object","required":["name"],"title":"TopicCreate"},"TopicDelivery":{"properties":{"days":{"type":"string","enum":["daily","weekdays","weekly"],"title":"Days","default":"weekdays"},"weekday":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Weekday","default":0},"hour":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Hour"},"timezone":{"type":"string","maxLength":64,"title":"Timezone"},"only_when_firing":{"type":"boolean","title":"Only When Firing","default":true},"email":{"type":"boolean","title":"Email","default":true}},"additionalProperties":false,"type":"object","required":["hour","timezone"],"title":"TopicDelivery"},"TopicDeliveryUpdate":{"properties":{"delivery":{"anyOf":[{"$ref":"#/components/schemas/TopicDelivery"},{"type":"null"}]}},"type":"object","required":["delivery"],"title":"TopicDeliveryUpdate"},"TopicDismiss":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Reason"}},"type":"object","title":"TopicDismiss"},"TopicNoteCreate":{"properties":{"text":{"type":"string","maxLength":1000,"title":"Text"}},"type":"object","required":["text"],"title":"TopicNoteCreate"},"TopicUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"charter":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Charter"},"icon":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Icon"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"},"add_check_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Add Check Ids"},"remove_check_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Remove Check Ids"}},"type":"object","title":"TopicUpdate"},"TriggerReviewRequest":{"properties":{"limit":{"type":"integer","title":"Limit","default":50}},"type":"object","title":"TriggerReviewRequest"},"UpdateQueryRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"sql":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sql"}},"type":"object","title":"UpdateQueryRequest"},"UpdateQuotaRequest":{"properties":{"monthly_quota":{"type":"integer","title":"Monthly Quota"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["monthly_quota"],"title":"UpdateQuotaRequest"},"UpdateRoleRequest":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"UpdateRoleRequest"},"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"},"WorkAssignment":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"expected_version":{"type":"integer","minimum":1.0,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"WorkAssignment"},"WorkTopicLink":{"properties":{"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"},"remove":{"type":"boolean","title":"Remove","default":false}},"type":"object","required":["source_type","source_id","reason"],"title":"WorkTopicLink"}}}}