{"openapi":"3.1.0","info":{"title":"Plan-Act Agent","version":"0.1.0"},"paths":{"/api/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginBody"}}},"required":true},"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","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/oauth/providers":{"get":{"tags":["auth"],"summary":"List Oauth Providers","description":"List available OAuth providers.","operationId":"list_oauth_providers_api_auth_oauth_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/oauth/{provider}/start":{"get":{"tags":["auth"],"summary":"Oauth Start","description":"Start OAuth flow - redirects to provider's authorization page.\n\nQuery params:\n    next: URL to redirect to after successful login (default: /workbooks)","operationId":"oauth_start_api_auth_oauth__provider__start_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/oauth/{provider}/callback":{"get":{"tags":["auth"],"summary":"Oauth Callback","description":"OAuth callback - exchanges code for token and creates/links user.\n\nThis endpoint handles the redirect from the OAuth provider after the user\nauthorizes (or denies) the application.","operationId":"oauth_callback_api_auth_oauth__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"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":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["mcp-oauth"],"summary":"Protected Resource Metadata","description":"OAuth 2.0 Protected Resource Metadata.\n\nTells MCP clients where to find our authorization server.","operationId":"protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["mcp-oauth"],"summary":"Authorization Server Metadata","description":"OAuth 2.0 Authorization Server Metadata.\n\nProvides discovery information for MCP clients.","operationId":"authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/oauth/register":{"post":{"tags":["mcp-oauth"],"summary":"Register Client","description":"Dynamic Client Registration endpoint.\n\nAccepts client registration and stores the client with its redirect_uris\nfor later validation during authorization.","operationId":"register_client_mcp_oauth_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/oauth/authorize":{"get":{"tags":["mcp-oauth"],"summary":"Authorize","description":"OAuth 2.0 Authorization Endpoint.\n\nHandles the authorization request from Claude.\nIf user is logged in, auto-approves (for PoC).\nIf not logged in, redirects to login.","operationId":"authorize_mcp_oauth_authorize_get","parameters":[{"name":"response_type","in":"query","required":true,"schema":{"type":"string","title":"Response Type"}},{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","title":"State"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","title":"Scope"}},{"name":"code_challenge","in":"query","required":false,"schema":{"type":"string","title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"type":"string","title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/oauth/authorize/continue":{"get":{"tags":["mcp-oauth"],"summary":"Authorize Continue","description":"Continue authorization after login.\n\nCalled after user logs in via Google OAuth.\nRedirects to consent screen (which uses stored OAuth params).","operationId":"authorize_continue_mcp_oauth_authorize_continue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/oauth/consent":{"post":{"tags":["mcp-oauth"],"summary":"Consent","description":"Handle consent form submission.\n\nIssues authorization code if user consents, or returns error if denied.","operationId":"consent_mcp_oauth_consent_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_consent_mcp_oauth_consent_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/oauth/approve":{"post":{"tags":["mcp-oauth"],"summary":"Approve","description":"Approve MCP OAuth connection (legacy endpoint).\n\nDeprecated: Use /mcp/oauth/consent instead.\nThis endpoint now requires proper authentication.","operationId":"approve_mcp_oauth_approve_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_approve_mcp_oauth_approve_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/oauth/token":{"post":{"tags":["mcp-oauth"],"summary":"Token","description":"OAuth 2.0 Token Endpoint.\n\nExchanges authorization code for access token.","operationId":"token_mcp_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token_mcp_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Home Page","operationId":"home_page__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"tags":["mcp"],"summary":"Mcp Endpoint","description":"Main MCP JSON-RPC 2.0 endpoint.\n\nHandles all MCP protocol messages from Claude.","operationId":"mcp_endpoint__post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp":{"get":{"tags":["mcp"],"summary":"Mcp Discovery","description":"MCP discovery endpoint.\n\nSome clients GET /mcp to discover server capabilities.","operationId":"mcp_discovery_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["mcp"],"summary":"Mcp Endpoint","description":"Main MCP JSON-RPC 2.0 endpoint.\n\nHandles all MCP protocol messages from Claude.","operationId":"mcp_endpoint_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/debug/recent-tools":{"get":{"tags":["mcp"],"summary":"Recent Tools","description":"In-process view of recent MCP tool call sizes.\n\nBackstop for LFG-1569's trim — regressions show up here as\ncreeping byte counts. Local triage only, not a metrics pipeline.","operationId":"recent_tools_debug_recent_tools_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/upload-file":{"post":{"tags":["data"],"summary":"Upload File","description":"Upload a file (CSV, TSV, JSON, JSONL, Parquet) into the workbook as a Parquet table.","operationId":"upload_file_api_workbooks__workbook_id__upload_file_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_workbooks__workbook_id__upload_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/uploads/raw/{token}":{"put":{"tags":["uploads"],"summary":"Put Upload","description":"Stream the request body to the staging file for ``token``.\n\nAuth is the token. Body size is capped at the token's ``max_bytes``;\na request that overruns is aborted before the staging file is\npromoted to ``state=uploaded``. ``Content-Length``, when sent,\nshort-circuits oversized uploads before any bytes are written.","operationId":"put_upload_api_uploads_raw__token__put","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/uploads/chunk/{token}":{"put":{"tags":["uploads"],"summary":"Put Chunk","description":"Append one chunk to the staging file at offset ``index * chunk_size``.\n\nEach chunk PUT is at most ``CHUNK_SIZE_BYTES`` of body — small\nenough to slip under any HTTP proxy cap, so a 1 GB upload arrives\nas many small requests instead of one big one. The sidecar\n``{token}.meta.json`` records which indices have arrived so a\nclient that drops mid-upload can resume from the last successful\nchunk.\n\nThe ``final=1`` chunk is the last one for the file. After its\nbytes are written, this route flips the token state from\n``pending`` to ``uploaded`` so the existing finalize_upload path\nworks unchanged regardless of whether the file arrived in one\nrequest or many.","operationId":"put_chunk_api_uploads_chunk__token__put","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"index","in":"query","required":true,"schema":{"type":"integer","title":"Index"}},{"name":"final","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Final"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["uploads"],"summary":"Cancel Chunk Upload","description":"Cancel an in-progress chunked upload: discard the staging file\nand the chunk sidecar. Idempotent — safe to call multiple times.","operationId":"cancel_chunk_upload_api_uploads_chunk__token__delete","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/uploads/chunk/{token}/status":{"get":{"tags":["uploads"],"summary":"Chunk Status","description":"Resume helper: report which chunk indices have arrived.\n\nClients call this after a connection drop to figure out which\nchunks need to be retried. No body changes happen here.","operationId":"chunk_status_api_uploads_chunk__token__status_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps":{"get":{"tags":["apps"],"summary":"List Apps","operationId":"list_apps_api_apps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["apps"],"summary":"Create App","operationId":"create_app_api_apps_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAppRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}":{"get":{"tags":["apps"],"summary":"Get App","operationId":"get_app_api_apps__app_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["apps"],"summary":"Patch App","operationId":"patch_app_api_apps__app_id__patch","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAppRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["apps"],"summary":"Delete App","operationId":"delete_app_api_apps__app_id__delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/frontend":{"patch":{"tags":["apps"],"summary":"Set Frontend","operationId":"set_frontend_api_apps__app_id__frontend_patch","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetFrontendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/visibility":{"patch":{"tags":["apps"],"summary":"Set Visibility","operationId":"set_visibility_api_apps__app_id__visibility_patch","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetVisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/blocks/{block_id}":{"patch":{"tags":["apps"],"summary":"Patch Block","description":"Update title / displayed / source on one block.\n\nOwner-only in general — title/displayed/source on authoring\nblocks all stay behind ``_require_owner``. The one exception is\na variable change: an editor-grant holder can patch the\n``source`` of a control block (``param-enum`` /\n``filter-daterange``) because that's how the FE persists a\nviewer's filter pick. Title/displayed on control blocks, and\nevery field on every other block, remain owner-only.","operationId":"patch_block_api_apps__app_id__blocks__block_id__patch","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["apps"],"summary":"Delete Block","description":"Hard-delete one block from the app.\n\nOwner-only. Drops the block's layout entry on the dashboard\nsurface so the forest invariant stays clean. The block's\noutputs in the parquet store are not GC'd here; that's the\nblock-engine's housekeeping path (eventually).","operationId":"delete_block_api_apps__app_id__blocks__block_id__delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/layout":{"put":{"tags":["apps"],"summary":"Put Layout","description":"Replace the dashboard's full row layout (user drag / resize).\n\nMirrors `dashboard_set_layout` on the MCP side so the user's\ndrag / resize and the agent's layout calls share one write path\n(last write wins). Dashboard-surface only; calling on canvas or\nworkbook surfaces returns 400.","operationId":"put_layout_api_apps__app_id__layout_put","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutLayoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/blocks/{block_id}/run":{"post":{"tags":["apps"],"summary":"Run Block","operationId":"run_block_api_apps__app_id__blocks__block_id__run_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAppBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/refresh":{"post":{"tags":["apps"],"summary":"Refresh","description":"Re-run every addressable block in the app and return the\nfresh snapshot. Backs the iframe's `<bb-refresh>` primitive —\nthe server determines what to re-run; the client just asks.","operationId":"refresh_api_apps__app_id__refresh_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/uploads/begin":{"post":{"tags":["apps"],"summary":"Uploads Begin","operationId":"uploads_begin_api_apps__app_id__uploads_begin_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadBeginRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/uploads/finalize":{"post":{"tags":["apps"],"summary":"Uploads Finalize","operationId":"uploads_finalize_api_apps__app_id__uploads_finalize_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFinalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/update":{"post":{"tags":["apps"],"summary":"Update Dashboard","operationId":"update_dashboard_api_apps__app_id__update_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/delete-blocks":{"post":{"tags":["apps"],"summary":"Delete Blocks","operationId":"delete_blocks_api_apps__app_id__delete_blocks_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardDeleteBlocksRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/grants":{"get":{"tags":["apps"],"summary":"List Grants Slim","operationId":"list_grants_slim_api_apps__app_id__grants_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/shares":{"get":{"tags":["apps"],"summary":"List App Shares","operationId":"list_app_shares_api_apps__app_id__shares_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["apps"],"summary":"Create App Share","operationId":"create_app_share_api_apps__app_id__shares_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppShareInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/shares/{email}":{"delete":{"tags":["apps"],"summary":"Revoke App Share","operationId":"revoke_app_share_api_apps__app_id__shares__email__delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stripe/checkout":{"get":{"summary":"Stripe Checkout","description":"Create Stripe Checkout session and redirect to payment page.","operationId":"stripe_checkout_api_stripe_checkout_get","parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pricing":{"get":{"summary":"Pricing Page","description":"Serve the pricing page.","operationId":"pricing_page_pricing_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/stripe/portal":{"post":{"summary":"Stripe Portal","description":"Create a Stripe Customer Portal session and return the URL.","operationId":"stripe_portal_api_stripe_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stripe/webhook":{"post":{"summary":"Stripe Webhook","description":"Handle Stripe webhook events.","operationId":"stripe_webhook_api_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations":{"get":{"tags":["integrations"],"summary":"List Integrations","description":"List all enabled integrations available for connection.\n\nReturns integrations that:\n- Are enabled in the catalog\n- Have OAuth credentials configured","operationId":"list_integrations_api_integrations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workbooks/{workbook_id}/connections":{"get":{"tags":["integrations"],"summary":"List Workbook Connections","operationId":"list_workbook_connections_api_workbooks__workbook_id__connections_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["integrations"],"summary":"Start Connection","operationId":"start_connection_api_workbooks__workbook_id__connections_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/oauth/callback":{"get":{"tags":["integrations"],"summary":"Oauth Callback","operationId":"oauth_callback_api_integrations_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":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/connections/{connection_id}":{"delete":{"tags":["integrations"],"summary":"Disconnect","operationId":"disconnect_api_workbooks__workbook_id__connections__connection_id__delete","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/connections/{connection_id}/tools":{"get":{"tags":["integrations"],"summary":"List Connection Tools","operationId":"list_connection_tools_api_workbooks__workbook_id__connections__connection_id__tools_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors":{"get":{"tags":["connectors"],"summary":"List Connectors","description":"List global connector catalog entries.\n\nQuery params:\n    available=true  -- only return connectors the user has not installed yet","operationId":"list_connectors_api_connectors_get","parameters":[{"name":"available","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Available"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["connectors"],"summary":"Add Connector","description":"Add a new MCP connector.\n\nSupply either:\n- server_url + name  (custom connector)\n- connector_id       (install from connector catalog)","operationId":"add_connector_api_connectors_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddConnectorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/connections/{connection_id}/catalog":{"get":{"tags":["connectors"],"summary":"Get Connection Catalog","description":"One-shot schema + scale: tables with columns, row estimates, and\ndatabase size, in a single round trip to the remote (Postgres).","operationId":"get_connection_catalog_api_connectors_connections__connection_id__catalog_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/connections/{connection_id}/tables":{"get":{"tags":["connectors"],"summary":"List Connection Tables","description":"List tables for one of the caller's database connections.","operationId":"list_connection_tables_api_connectors_connections__connection_id__tables_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/connections/{connection_id}/tables/{table}":{"get":{"tags":["connectors"],"summary":"Describe Connection Table","description":"Columns, row count, and a small sample for one table.","operationId":"describe_connection_table_api_connectors_connections__connection_id__tables__table__get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"table","in":"path","required":true,"schema":{"type":"string","title":"Table"}},{"name":"schema","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/connections/{connection_id}/instructions":{"get":{"tags":["connectors"],"summary":"Get Connection Instructions","description":"Read the agent instructions attached to a database connection.","operationId":"get_connection_instructions_api_connectors_connections__connection_id__instructions_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["connectors"],"summary":"Put Connection Instructions","description":"Set (or clear, with empty text) a connection's agent instructions.","operationId":"put_connection_instructions_api_connectors_connections__connection_id__instructions_put","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/connections":{"get":{"tags":["connectors"],"summary":"List Connections","description":"List user's account-scoped connection instances.","operationId":"list_connections_api_connectors_connections_get","parameters":[{"name":"connection_mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["connectors"],"summary":"Create Database Connection","description":"Create a database connection instance from a database connector type.","operationId":"create_database_connection_api_connectors_connections_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseConnectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/connections/{connection_id}/test":{"post":{"tags":["connectors"],"summary":"Test Database Connection","description":"Test an existing database connection.","operationId":"test_database_connection_api_connectors_connections__connection_id__test_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/connections/{connection_id}":{"delete":{"tags":["connectors"],"summary":"Delete Database Connection","description":"Delete a user-level database connection.","operationId":"delete_database_connection_api_connectors_connections__connection_id__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/connections/bigquery/authorize":{"post":{"tags":["connectors"],"summary":"Bigquery Authorize","description":"Start the BigQuery Google OAuth flow. Returns a redirect URL.","operationId":"bigquery_authorize_api_connectors_connections_bigquery_authorize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BigQueryConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/connections/bigquery/callback":{"get":{"tags":["connectors"],"summary":"Bigquery Callback","description":"OAuth callback for BigQuery. Exchanges code for tokens and stores connection.","operationId":"bigquery_callback_api_connectors_connections_bigquery_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":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/{connector_id}/disconnect":{"post":{"tags":["connectors"],"summary":"Disconnect Connector","description":"Disconnect a connector: delete tokens and reset status to pending.","operationId":"disconnect_connector_api_connectors__connector_id__disconnect_post","parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","title":"Connector Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/{connector_id}":{"delete":{"tags":["connectors"],"summary":"Remove Connector","description":"Remove a connector and its tokens.","operationId":"remove_connector_api_connectors__connector_id__delete","parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","title":"Connector Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["connectors"],"summary":"Get Connector","description":"Get details of a single connector.","operationId":"get_connector_api_connectors__connector_id__get","parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","title":"Connector Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/{connector_id}/test":{"post":{"tags":["connectors"],"summary":"Test Connector","description":"Validate an MCP connector is healthy and can list tools.\n\nThis is an explicit settings-page health check for account-level MCP\nconnectors. If OAuth refresh is possible, ConnectorBridge may heal an\nexpired token and continue. Otherwise it returns re-auth guidance.","operationId":"test_connector_api_connectors__connector_id__test_post","parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","title":"Connector Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/{connector_id}/connect":{"post":{"tags":["connectors"],"summary":"Start Connection","description":"Start the MCP OAuth authorization flow for a connector.\n\nRuns discovery, registers the client, and returns the authorization URL.\nThe frontend should redirect the user to this URL.","operationId":"start_connection_api_connectors__connector_id__connect_post","parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","title":"Connector Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/connectors/oauth/callback":{"get":{"tags":["connectors"],"summary":"Oauth Callback","description":"OAuth callback for MCP connector authorization.\n\nExchanges the authorization code for tokens and stores them.\nRedirects back to the settings page.","operationId":"oauth_callback_api_connectors_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":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos":{"get":{"tags":["repos"],"summary":"List Repos","operationId":"list_repos_api_repos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["repos"],"summary":"Connect Repo","operationId":"connect_repo_api_repos_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRepoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/{repo_id}/sync":{"post":{"tags":["repos"],"summary":"Refresh Repo","operationId":"refresh_repo_api_repos__repo_id__sync_post","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/{repo_id}/refresh":{"post":{"tags":["repos"],"summary":"Refresh Repo","operationId":"refresh_repo_api_repos__repo_id__refresh_post","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/{repo_id}":{"delete":{"tags":["repos"],"summary":"Disconnect Repo","operationId":"disconnect_repo_api_repos__repo_id__delete","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/webhook/github":{"post":{"tags":["repos"],"summary":"Github Webhook","description":"Signature-validated GitHub push webhook.\n\nA push to a connected repo+branch triggers a full snapshot\nrefresh (clone + re-index) for every user connected to that\nrepo. The refreshes run as background tasks and the handler\nreturns 202 immediately — a full clone + embed can exceed\nGitHub's 10 s delivery timeout. Outcomes land in the log and in\neach connection's refresh_status / last_refresh_error, which\nSettings surfaces.","operationId":"github_webhook_api_repos_webhook_github_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/repos/webhook/config":{"get":{"tags":["repos"],"summary":"Webhook Config","description":"What a manual webhook registration needs (and whether the\nserver side is ready for one).","operationId":"webhook_config_api_repos_webhook_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/repos/oauth/start":{"post":{"tags":["repos"],"summary":"Oauth Start","description":"Start GitHub OAuth flow to authorize repo access.\n\nReturns a redirect_url that the frontend should navigate to.","operationId":"oauth_start_api_repos_oauth_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthStartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/oauth/callback":{"get":{"tags":["repos"],"summary":"Oauth Callback","description":"GitHub OAuth callback — exchanges code for token, clones, indexes.\n\nEvery exit redirects back to the surface that started the flow\n(return_to from the signed state) with the GitHub settings\nsection in the hash, so the result banner is on screen instead\nof the top of Connections.","operationId":"oauth_callback_api_repos_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":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/oauth/status":{"get":{"tags":["repos"],"summary":"Oauth Status","description":"Check if GitHub OAuth is configured.","operationId":"oauth_status_api_repos_oauth_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dev/charts":{"get":{"summary":"Dev Charts Page","description":"Chart dev harness for iterating on Observable Plot specs. No auth required.","operationId":"dev_charts_page_dev_charts_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/dev/cell-states":{"get":{"summary":"Dev Cell States Page","description":"Gallery of every dashboard cell state. No auth required.\n\nRenders the real cell partial against fabricated block views so the\ntransient states (pending, cascade refresh) can be looked at\nstanding still — on a live dashboard they resolve in under a second\nand are mutually exclusive per cell.","operationId":"dev_cell_states_page_dev_cell_states_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/explorer":{"get":{"summary":"Admin Explorer Page","description":"Admin turn explorer UI.","operationId":"admin_explorer_page_admin_explorer_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/users":{"get":{"summary":"Admin Users Page","description":"Admin users list UI.","operationId":"admin_users_page_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/admin/users":{"get":{"summary":"Api Admin Users","description":"List all users for admin view.","operationId":"api_admin_users_api_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/explorer/inspect":{"get":{"summary":"Admin Turn Inspect","description":"Inspect a single turn in detail (turn-inspector style).","operationId":"admin_turn_inspect_admin_explorer_inspect_get","parameters":[{"name":"turnId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnid"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/debug":{"get":{"summary":"Debug Page","description":"Serve the debug UI. Requires auth.","operationId":"debug_page_debug_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/turn-inspector":{"get":{"summary":"Turn Inspector Page","description":"Serve the Turn Inspector UI for debugging turn JSON files. Requires auth.","operationId":"turn_inspector_page_turn_inspector_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/ask":{"get":{"summary":"Ask Page","operationId":"ask_page_ask_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/ask/setup":{"get":{"summary":"Ask Setup","description":"Return the SQL, app, and repository state used by Ask's setup gate.","operationId":"ask_setup_api_ask_setup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ask/registry":{"get":{"summary":"Ask Registry","description":"Read-only list of the user's verified queries (S5 — no editing until S7b).","operationId":"ask_registry_api_ask_registry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ask/guidance":{"get":{"summary":"Ask Guidance","description":"Read-only list of the user's guidance docs (S5 — no editing until S7b).","operationId":"ask_guidance_api_ask_guidance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Ask Guidance Create","description":"Propose a new guidance document as a GitHub PR.","operationId":"ask_guidance_create_api_ask_guidance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidanceCreateBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/repo":{"get":{"summary":"Ask Repo List","operationId":"ask_repo_list_api_ask_repo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Ask Repo Connect","operationId":"ask_repo_connect_api_ask_repo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectAskRepoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/repo/{repo_id}/verify":{"post":{"summary":"Ask Repo Verify","description":"Standalone verification: check the active snapshot, write nothing.\n\nDeliberately does NOT refresh — under the snapshot model a\nrefresh always re-indexes and activates a new snapshot, which is\na write. Use \"Sync now\" to refresh; this only re-checks what's\nalready on disk.","operationId":"ask_repo_verify_api_ask_repo__repo_id__verify_post","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/repo/{repo_id}/sync":{"post":{"summary":"Ask Repo Sync","operationId":"ask_repo_sync_api_ask_repo__repo_id__sync_post","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/repo/{repo_id}":{"delete":{"summary":"Ask Repo Disconnect","description":"Remove the connection, clone, and files it synced into Ask.","operationId":"ask_repo_disconnect_api_ask_repo__repo_id__delete","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/verification-requests":{"get":{"summary":"Ask Verification Requests","description":"The user's verification/edit requests. The chat UI uses this to\nrestore an answer's \"In review\" state after a reload — the chip was\npreviously client-side only, so refreshing reverted a submitted\nanswer to a bare Unverified badge with a duplicate-request button.","operationId":"ask_verification_requests_api_ask_verification_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ask/verification-request":{"post":{"summary":"Ask Verification Request","description":"Submit an unverified answer's SQL for review as a GitHub PR (S7a).","operationId":"ask_verification_request_api_ask_verification_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/queries/{query_id}/edit":{"post":{"summary":"Ask Query Edit","description":"Propose a change to a query as a PR on the data repo (S7b).","operationId":"ask_query_edit_api_ask_queries__query_id__edit_post","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryEditBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/guidance/{doc_id}/edit":{"post":{"summary":"Ask Guidance Edit","description":"Propose a change to a guidance doc as a PR on the data repo (S7b).","operationId":"ask_guidance_edit_api_ask_guidance__doc_id__edit_post","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidanceEditBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/models":{"get":{"summary":"Ask Models","description":"Selectable Anthropic models plus the default, for the chat picker.","operationId":"ask_models_api_ask_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ask/chat":{"post":{"summary":"Ask Chat","operationId":"ask_chat_api_ask_chat_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/thread":{"get":{"summary":"Ask Current Thread","description":"The user's most recent thread, for rehydration on page load.","operationId":"ask_current_thread_api_ask_thread_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ask/threads":{"get":{"summary":"Ask Thread List","description":"Summaries of the user's threads, newest first.","operationId":"ask_thread_list_api_ask_threads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ask/threads/{thread_id}":{"get":{"summary":"Ask Thread Get","operationId":"ask_thread_get_api_ask_threads__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Ask Thread Delete","operationId":"ask_thread_delete_api_ask_threads__thread_id__delete","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks":{"get":{"summary":"Get Workbook Blocks","operationId":"get_workbook_blocks_api_workbooks__workbook_id__blocks_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Add Workbook Block","operationId":"add_workbook_block_api_workbooks__workbook_id__blocks_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/sources":{"get":{"summary":"Get Workbook Sources","operationId":"get_workbook_sources_api_workbooks__workbook_id__sources_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/sources/{source_name}":{"get":{"summary":"Get Workbook Source Detail","operationId":"get_workbook_source_detail_api_workbooks__workbook_id__sources__source_name__get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"source_name","in":"path","required":true,"schema":{"type":"string","title":"Source Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks/autocomplete":{"get":{"summary":"Get Workbook Block Autocomplete","operationId":"get_workbook_block_autocomplete_api_workbooks__workbook_id__blocks_autocomplete_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"source_output","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Output"}},{"name":"column","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks/{block_index}":{"put":{"summary":"Update Workbook Block","operationId":"update_workbook_block_api_workbooks__workbook_id__blocks__block_index__put","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"block_index","in":"path","required":true,"schema":{"type":"integer","title":"Block Index"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks/by-id/{block_id}":{"put":{"summary":"Update Workbook Block By Id","operationId":"update_workbook_block_by_id_api_workbooks__workbook_id__blocks_by_id__block_id__put","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBlockByIdRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks/{block_id}":{"delete":{"summary":"Delete Workbook Block","operationId":"delete_workbook_block_api_workbooks__workbook_id__blocks__block_id__delete","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks/{block_id}/move":{"post":{"summary":"Move Workbook Block","operationId":"move_workbook_block_api_workbooks__workbook_id__blocks__block_id__move_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks/{block_id}/run":{"post":{"summary":"Run Workbook Sql Block","operationId":"run_workbook_sql_block_api_workbooks__workbook_id__blocks__block_id__run_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunSqlBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/ingest/runs":{"get":{"summary":"Get Workbook Ingest Runs","operationId":"get_workbook_ingest_runs_api_workbooks__workbook_id__ingest_runs_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/connectors":{"get":{"summary":"List Workbook Connectors","operationId":"list_workbook_connectors_api_workbooks__workbook_id__connectors_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/connector-tools":{"get":{"summary":"List Workbook Connector Tools","operationId":"list_workbook_connector_tools_api_workbooks__workbook_id__connector_tools_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"connector_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connector Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_input_schema","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Input Schema"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks/{block_id}/lock":{"post":{"summary":"Acquire Lock","operationId":"acquire_lock_api_workbooks__workbook_id__blocks__block_id__lock_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Release Lock","operationId":"release_lock_api_workbooks__workbook_id__blocks__block_id__lock_delete","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks/{block_id}/lock/heartbeat":{"post":{"summary":"Heartbeat Lock","operationId":"heartbeat_lock_api_workbooks__workbook_id__blocks__block_id__lock_heartbeat_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/blocks/{block_id}/lock/force-claim":{"post":{"summary":"Force Claim Lock","operationId":"force_claim_lock_api_workbooks__workbook_id__blocks__block_id__lock_force_claim_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/presence":{"post":{"summary":"Presence Ping","operationId":"presence_ping_api_workbooks__workbook_id__presence_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresencePingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/sync":{"get":{"summary":"Sync","description":"One round-trip the polling client uses to refresh its view.\n\nSide effects:\n- Pings the caller's presence so they appear as active to other\n  clients without a separate request.\n- Reconciles the caller's lock state from the optional\n  ``held_locks`` query string (format: ``block_id:token,block_id:token``):\n  tokens still claimed are heartbeated; locks held by the caller\n  that aren't in the list are released immediately.\n\nAll DB calls are synchronous psycopg under the hood; each runs\non the threadpool via ``asyncio.to_thread`` so the event-loop\nworker isn't parked, and ``asyncio.gather`` collapses them to\none wall-clock round-trip.","operationId":"sync_api_workbooks__workbook_id__sync_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"held_locks","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Held Locks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/font-preview":{"get":{"summary":"Font Preview Page","operationId":"font_preview_page_font_preview_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/login":{"get":{"summary":"Login Page","operationId":"login_page_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/chat":{"get":{"summary":"Chat Page","operationId":"chat_page_chat_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/workbooks":{"get":{"summary":"Workbooks List Page","description":"Redirect to home — the home page now serves as the workbook browser.","operationId":"workbooks_list_page_workbooks_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/settings":{"get":{"summary":"Settings Page","description":"Settings is a modal, not a page (unified-shell IA). Deep links to\n/settings(#section) still work: render the home page underneath and\nsettings-modal.js auto-opens the modal on load.","operationId":"settings_page_settings_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/explore":{"get":{"summary":"Explore Page","description":"Global explore: browse the caller's data connections — tables,\ncolumns, samples — and edit per-connection agent instructions.","operationId":"explore_page_explore_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/dashboards/{app_id}/explore":{"get":{"summary":"Dashboard Explore Page","description":"Dashboard-scoped explore: the caller's connections plus the data\nsourced for this dashboard (uploads, block outputs, referenced\nconnections). Requires login — the connections section lists the\ncaller's own credentials-backed sources, which an anonymous\nlink_view visitor has no business browsing.","operationId":"dashboard_explore_page_dashboards__app_id__explore_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account":{"get":{"summary":"Account Page","operationId":"account_page_account_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/workbooks/{workbook_id}":{"get":{"summary":"Workbook Page","operationId":"workbook_page_workbooks__workbook_id__get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app_id}":{"get":{"summary":"App Runtime Page","description":"Render an app's iframe-host page.\n\nThe app's frontend bundle is concatenated into an iframe srcdoc\nwith bb-bridge.js prepended; the page embeds output_name →\nblock_id index so bb.query in the iframe round-trips through\n/api/apps/{id}/blocks/{block_id}/run.\n\nVisibility model mirrors workbooks: ``private`` is owner-only;\n``link_view`` lets any caller (including anonymous) render the\npage as a viewer. Viewer renders carry ``is_viewer=True`` so the\nhost bridge short-circuits interaction postMessages — viewers\nsee the SSR'd snapshot, but ``bb.query`` / ``bb.refresh`` are\nowner-only at the route layer too (see app_routes.py).","operationId":"app_runtime_page_apps__app_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboards/{app_id}":{"get":{"summary":"Dashboard Runtime Page","description":"Render an app with viewer_surface='dashboard'.\n\nMirrors the access-control machinery of ``/apps/{app_id}``: owners\nalways render, link_view promotes any caller to a viewer, and an\nexplicit share grant gives the holder viewer/editor access.\n\nThis is the Phase 7 MVP renderer. It reads the dashboard payload\nfrom get_app(), reads the blocks, partitions displayed roots from\ntheir hidden subtree, and renders each root in its layout cell.\nThe full iframe-per-block + bb-bridge interactivity wiring is the\nnext chunk of work; today the block body shows the source so the\nend-to-end dataflow is visible.","operationId":"dashboard_runtime_page_dashboards__app_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboards/{app_id}/views":{"get":{"summary":"Dashboard Block Views","description":"Hydration endpoint for the lazy dashboard shell.\n\nThe page render at ``GET /dashboards/<id>`` paints the layout in\ntens of ms by skipping per-block output reads. Each displayed\nblock lands as a pending iframe carrying its ``data-block-id``.\nOn load, the page fetches this endpoint once and patches every\npending cell via the same ``applyCascadeViews`` path the cascade\nendpoint uses. The shape mirrors ``build_block_views_for_render``\nexactly so the FE has one branch, not two.\n\nAuth mirrors the dashboard page route: owner / link_view /\nexplicit grant. A caller without access gets a 404 (same shape\nas the page route — never leak existence).","operationId":"dashboard_block_views_api_dashboards__app_id__views_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"ids","in":"query","required":false,"schema":{"type":"string","default":"","title":"Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{app_id}/cells":{"get":{"summary":"Dashboard Cells","description":"Server-rendered cell HTML for specific blocks — the live-add twin\nof the page render. The dashboard page calls this when a block is\nadded (by the agent or a collaborator), inserts the returned cell,\nand applies ``grid_template_rows`` to reflow the grid. One mold: it\nrenders the same ``_dash_block_cell.html`` partial the full page\nuses, so an added cell is identical to existing ones. Auth mirrors\nthe page route — 404 on no access, never leak existence.","operationId":"dashboard_cells_api_apps__app_id__cells_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"ids","in":"query","required":false,"schema":{"type":"string","default":"","title":"Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboards/{app_id}/sync":{"get":{"summary":"Dashboard Sync","description":"Cross-tab live-update poll: block-level changes since the caller's\nlast-seen version. The SSE only reaches the tab running the agent, so\nanother tab / collaborator / their agent learns what changed here and\nreplays it through the same client primitive (idempotent). Returns the\ncurrent version (an audit cursor), the changes after ``since``, and who\nlast bumped it. Auth mirrors the page route — 404 on no access.","operationId":"dashboard_sync_api_dashboards__app_id__sync_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"since","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboards/{app_id}/inspector":{"get":{"summary":"Dashboard Inspector Data","description":"Lazy hydration for the source-detail overlay.\n\nThe dashboard shell renders with ``inspector_json=[]`` to keep\nthe initial GET under its budget; this endpoint produces the\nsame shape ``build_app_inspector_data`` did inline, so the FE\ncan fetch it after page load and call\n``SourceInspector.init(records)`` once the data lands. Auth\nmirrors the dashboard runtime page.","operationId":"dashboard_inspector_data_api_dashboards__app_id__inspector_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app_id}/source":{"get":{"summary":"App Source Page","description":"Render the app's source view: DAG + block sources + frontend bundle.\n\nRead-only inspection surface. Mirrors the auth posture of the\nruntime page (owner-only for now); when link_view is wired up\nwe'll decide whether source is viewer-visible.","operationId":"app_source_page_apps__app_id__source_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/view/{workbook_id}":{"get":{"summary":"View Workbook Mode","operationId":"view_workbook_mode_view__workbook_id__get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/og/img/{summary_hash}.png":{"get":{"summary":"Og Image","operationId":"og_image_og_img__summary_hash__png_get","parameters":[{"name":"summary_hash","in":"path","required":true,"schema":{"type":"string","title":"Summary Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboards/{app_id}/thumb.png":{"get":{"summary":"Dashboard Thumb Png","description":"Serve a dashboard's home-grid thumbnail (client-captured PNG).\n\nReturns 404 when no thumbnail has been captured yet so the FE falls\nback to the source-text preview.","operationId":"dashboard_thumb_png_dashboards__app_id__thumb_png_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboards/{app_id}/thumb":{"post":{"summary":"Dashboard Thumb Save","description":"Save a client-captured thumbnail PNG for the dashboard.\n\nThe dashboard page captures its hero chart (rendered SVG → PNG) and\nPOSTs the raw image bytes here. Owner or editor only.","operationId":"dashboard_thumb_save_dashboards__app_id__thumb_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workbooks/{workbook_id}/sheets/{sheet_id}":{"get":{"summary":"Workbook Sheet Page","operationId":"workbook_sheet_page_workbooks__workbook_id__sheets__sheet_id__get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"sheet_id","in":"path","required":true,"schema":{"type":"string","title":"Sheet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks":{"get":{"summary":"List Workbooks","operationId":"list_workbooks_api_workbooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Workbook","operationId":"create_workbook_api_workbooks_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}":{"get":{"summary":"Get Workbook Meta","operationId":"get_workbook_meta_api_workbooks__workbook_id__get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Workbook Meta","operationId":"patch_workbook_meta_api_workbooks__workbook_id__patch","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Workbook","operationId":"delete_workbook_api_workbooks__workbook_id__delete","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/duplicate":{"post":{"summary":"Duplicate Workbook Route","description":"LFG-1436: duplicate a workbook the caller can read.\n\nRequires at least read access on the source (shared viewers can\nduplicate; the copy is owned by the caller). Two-phase: shell\nruns synchronously and returns ``new_wid`` so the frontend can\nnavigate to the destination immediately and show a loading\nstate; populate (copytree + bulk inserts) runs in a FastAPI\nbackground task and the destination page polls\n``/api/workbooks/<id>/blocks`` until it sees blocks.","operationId":"duplicate_workbook_route_api_workbooks__workbook_id__duplicate_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/acl":{"get":{"summary":"Get Workbook Acl","operationId":"get_workbook_acl_api_workbooks__workbook_id__acl_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/shares":{"get":{"summary":"List Workbook Shares","operationId":"list_workbook_shares_api_workbooks__workbook_id__shares_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Workbook Share","operationId":"create_workbook_share_api_workbooks__workbook_id__shares_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/shares/{email}":{"delete":{"summary":"Revoke Workbook Share","operationId":"revoke_workbook_share_api_workbooks__workbook_id__shares__email__delete","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/visibility":{"put":{"summary":"Set Workbook Visibility Route","description":"LFG-1409: flip workbook visibility. Owner-only — delegates to\nset_workbook_visibility in the store, which enforces ownership,\nvalidates the value, and emits the LFG-1435 audit event.","operationId":"set_workbook_visibility_route_api_workbooks__workbook_id__visibility_put","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/thread":{"get":{"summary":"Agent Thread","operationId":"agent_thread_api_agent_thread_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agent/chat":{"post":{"summary":"Agent Chat","operationId":"agent_chat_api_agent_chat_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/custom-instructions":{"get":{"summary":"Get Custom Instructions","description":"Return the authenticated user's custom instructions list.","operationId":"get_custom_instructions_api_custom_instructions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Put Custom Instructions","description":"Replace the authenticated user's custom instructions list.","operationId":"put_custom_instructions_api_custom_instructions_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/profile":{"get":{"summary":"Get Profile","description":"Current user's profile + plan, mirroring what /account renders.\n\nServes the Ask surface's Account modal, which has no server-side\ntemplate context to draw from.","operationId":"get_profile_api_account_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"summary":"Update Profile","description":"Update the current user's profile fields.","operationId":"update_profile_api_account_profile_patch","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workbooks/{workbook_id}/workspace":{"get":{"summary":"Get Workspace State","description":"Return the workspace state for a workbook (developer observability).","operationId":"get_workspace_state_api_workbooks__workbook_id__workspace_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}},{"name":"thread_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/formula-status":{"get":{"summary":"Get Workbook Formula Status","operationId":"get_workbook_formula_status_api_workbooks__workbook_id__formula_status_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbooks/{workbook_id}/debug/formula-status":{"post":{"summary":"Set Workbook Mock Formula Status","operationId":"set_workbook_mock_formula_status_api_workbooks__workbook_id__debug_formula_status_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"string","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Health check endpoint for Render. Reports the presence of the\nchart-renderer bundle so a missing OG-chart artifact is visible\nwithout scraping a live workbook page.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/events/append":{"post":{"summary":"Append Events","description":"Legacy events sink — persistence disabled. Always accepts and drops.\nDrop the route once no client posts to it.","operationId":"append_events_api_events_append_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events":{"get":{"summary":"List Events","description":"Legacy events endpoint. Used to proxy Univer events from the\nexecutor; now always returns an empty list so anything still polling\nlands cleanly. Drop the route once no client polls it.","operationId":"list_events_api_events_get","parameters":[{"name":"workbookId","in":"query","required":true,"schema":{"type":"string","title":"Workbookid"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Since"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddBlockRequest":{"properties":{"type":{"type":"string","title":"Type"},"source":{"type":"string","title":"Source"},"index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Index"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"refs":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Refs"},"ref":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ref"}},"type":"object","required":["type","source"],"title":"AddBlockRequest"},"AddConnectorRequest":{"properties":{"server_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Url"},"connector_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connector Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"AddConnectorRequest","description":"Request body for adding a connector."},"AppShareInviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"viewer"}},"type":"object","required":["email"],"title":"AppShareInviteRequest"},"BigQueryConnectRequest":{"properties":{"name":{"type":"string","title":"Name"},"project_id":{"type":"string","title":"Project Id"},"default_dataset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Dataset"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"}},"type":"object","required":["name","project_id"],"title":"BigQueryConnectRequest","description":"Request body for starting a BigQuery (Google OAuth) connection."},"Body_approve_mcp_oauth_approve_post":{"properties":{"oauth_params":{"type":"string","title":"Oauth Params"}},"type":"object","required":["oauth_params"],"title":"Body_approve_mcp_oauth_approve_post"},"Body_consent_mcp_oauth_consent_post":{"properties":{"oauth_params":{"type":"string","title":"Oauth Params"},"action":{"type":"string","title":"Action"}},"type":"object","required":["oauth_params","action"],"title":"Body_consent_mcp_oauth_consent_post"},"Body_token_mcp_oauth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"code":{"type":"string","title":"Code"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"client_id":{"type":"string","title":"Client Id"},"code_verifier":{"type":"string","title":"Code Verifier"}},"type":"object","required":["grant_type"],"title":"Body_token_mcp_oauth_token_post"},"Body_upload_file_api_workbooks__workbook_id__upload_file_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"table_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Name"}},"type":"object","required":["file"],"title":"Body_upload_file_api_workbooks__workbook_id__upload_file_post"},"ComposeBlockIn":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"source":{"type":"string","title":"Source","default":""},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"displayed":{"type":"boolean","title":"Displayed","default":false},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["key","type"],"title":"ComposeBlockIn"},"ComposeLayoutIn":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/ComposeLayoutRowIn"},"type":"array","title":"Rows","default":[]}},"type":"object","title":"ComposeLayoutIn"},"ComposeLayoutRowIn":{"properties":{"items":{"items":{"type":"string"},"type":"array","title":"Items"},"cols":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Cols"},"h":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"H"}},"type":"object","required":["items"],"title":"ComposeLayoutRowIn"},"ConnectAskRepoRequest":{"properties":{"repo_url":{"type":"string","title":"Repo Url"},"branch":{"type":"string","title":"Branch","default":"main"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}},"type":"object","required":["repo_url"],"title":"ConnectAskRepoRequest"},"ConnectRepoRequest":{"properties":{"repo_url":{"type":"string","title":"Repo Url"},"branch":{"type":"string","title":"Branch","default":"main"},"provider":{"type":"string","title":"Provider","default":"github"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}},"type":"object","required":["repo_url"],"title":"ConnectRepoRequest"},"ConnectRequest":{"properties":{"integration_id":{"type":"string","title":"Integration Id"}},"type":"object","required":["integration_id"],"title":"ConnectRequest","description":"Request body for starting an integration connection."},"CreateAppRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"visibility":{"type":"string","title":"Visibility","default":"private"},"viewer_surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Viewer Surface"}},"type":"object","title":"CreateAppRequest"},"DashboardDeleteBlocksRequest":{"properties":{"blocks":{"items":{"type":"string"},"type":"array","title":"Blocks"}},"type":"object","required":["blocks"],"title":"DashboardDeleteBlocksRequest","description":"Cookie-authenticated twin of MCP ``dashboard_delete_blocks``.\n\nSoft-deletes every listed block in one transaction. Used for bulk\ncleanup where a per-block DELETE loop would be 30+ calls."},"DashboardUpdateRequest":{"properties":{"blocks":{"items":{"$ref":"#/components/schemas/ComposeBlockIn"},"type":"array","title":"Blocks","default":[]},"layout":{"anyOf":[{"$ref":"#/components/schemas/ComposeLayoutIn"},{"type":"null"}]}},"type":"object","title":"DashboardUpdateRequest","description":"Declarative reconcile against an existing dashboard.\n\nSame spec shape as the MCP ``dashboard_update`` tool. Cookie-\nauthenticated twin for browser callers (and any script that has\na session). The server diffs by `key`, inserts new blocks,\nupdates matching blocks in place, soft-deletes anything missing."},"DatabaseConnectionRequest":{"properties":{"name":{"type":"string","title":"Name"},"connector_id":{"type":"string","title":"Connector Id"},"connection_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection String"},"account":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"warehouse":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warehouse"},"database":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database"},"sf_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sf Schema"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"http_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Http Path"},"api_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Secret"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"default_dataset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Dataset"},"service_account_json":{"anyOf":[{"type":"string","maxLength":65536},{"type":"null"}],"title":"Service Account Json"}},"type":"object","required":["name","connector_id"],"title":"DatabaseConnectionRequest","description":"Request body for creating a database connection."},"GuidanceCreateBody":{"properties":{"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"repo_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Id"}},"type":"object","required":["title","body"],"title":"GuidanceCreateBody"},"GuidanceEditBody":{"properties":{"body":{"type":"string","title":"Body"},"repo_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Id"}},"type":"object","required":["body"],"title":"GuidanceEditBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeartbeatRequest":{"properties":{"lock_token":{"type":"string","title":"Lock Token"}},"type":"object","required":["lock_token"],"title":"HeartbeatRequest"},"LoginBody":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginBody"},"MoveBlockRequest":{"properties":{"new_index":{"type":"integer","title":"New Index"}},"type":"object","required":["new_index"],"title":"MoveBlockRequest"},"OAuthStartRequest":{"properties":{"repo_url":{"type":"string","title":"Repo Url"},"branch":{"type":"string","title":"Branch","default":"main"},"return_to":{"type":"string","title":"Return To","default":"/settings"}},"type":"object","required":["repo_url"],"title":"OAuthStartRequest"},"PatchAppRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","title":"PatchAppRequest"},"PatchBlockRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"displayed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Displayed"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","title":"PatchBlockRequest","description":"Dashboard-era block edits the frontend can make through the API.\n\nCovers the bounded set of fields a user (or the bb-bridge inside an\niframe) actually toggles from the dashboard chrome: title, displayed,\nplus source — included so filter-daterange / param-enum blocks can\nupdate their selected value without going through the richer authoring\npaths."},"PresencePingRequest":{"properties":{"focus_block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus Block Id"}},"type":"object","title":"PresencePingRequest"},"PutLayoutRequest":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/RowIn"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"PutLayoutRequest","description":"User-side layout edit — the dashboard's full row layout.\n\nA single drag reflows multiple rows, so the whole layout is sent at\nonce. Mirrors `dashboard_set_layout` on the MCP side so user drags\nand agent layout calls share one write path."},"QueryEditBody":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"sql":{"type":"string","title":"Sql"},"repo_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Id"}},"type":"object","required":["name","sql"],"title":"QueryEditBody"},"ReleaseRequest":{"properties":{"lock_token":{"type":"string","title":"Lock Token"}},"type":"object","required":["lock_token"],"title":"ReleaseRequest"},"RowIn":{"properties":{"items":{"items":{"type":"string"},"type":"array","title":"Items"},"cols":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Cols"},"h":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"H"}},"type":"object","required":["items"],"title":"RowIn","description":"One row in a layout edit: ordered block_ids splitting 12 columns."},"RunAppBlockRequest":{"properties":{"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"}},"type":"object","title":"RunAppBlockRequest"},"RunSqlBlockRequest":{"properties":{"database":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database"},"limit":{"type":"integer","title":"Limit","default":1000},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"}},"type":"object","title":"RunSqlBlockRequest"},"SetFrontendRequest":{"properties":{"files":{"additionalProperties":{"type":"string"},"type":"object","title":"Files"}},"type":"object","required":["files"],"title":"SetFrontendRequest"},"SetVisibilityRequest":{"properties":{"visibility":{"type":"string","title":"Visibility"}},"type":"object","required":["visibility"],"title":"SetVisibilityRequest"},"ShareInviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"viewer"}},"type":"object","required":["email"],"title":"ShareInviteRequest"},"UpdateBlockByIdRequest":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"lock_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Token"}},"type":"object","title":"UpdateBlockByIdRequest"},"UpdateBlockRequest":{"properties":{"source":{"type":"string","title":"Source"},"lock_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Token"}},"type":"object","required":["source"],"title":"UpdateBlockRequest"},"UploadBeginRequest":{"properties":{"filename":{"type":"string","title":"Filename"}},"type":"object","required":["filename"],"title":"UploadBeginRequest","description":"Browser asks the server to mint an upload token for ``filename``.\n\nMirrors the MCP ``dashboard_create_upload_url`` tool, just session-\nauthenticated and exposed at /api/apps/{id}/uploads/begin so the\ndashboard's drag-drop can use the chunked PUT path that the proxy\ncap forces us onto for files > ~64 MB."},"UploadFinalizeRequest":{"properties":{"token":{"type":"string","title":"Token"},"table_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Name"},"file_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Type"},"auto_run":{"type":"boolean","title":"Auto Run","default":false}},"type":"object","required":["token"],"title":"UploadFinalizeRequest","description":"Browser asks the server to promote a staged upload into a source.\n\nSame shape as the MCP ``dashboard_finalize_upload`` tool. The token\nauths the staged bytes; the session auths the caller against the\ndashboard ACL."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerificationRequestBody":{"properties":{"question":{"type":"string","title":"Question"},"sql":{"type":"string","title":"Sql"},"repo_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Id"}},"type":"object","required":["question","sql"],"title":"VerificationRequestBody"},"VisibilityRequest":{"properties":{"visibility":{"type":"string","title":"Visibility"}},"type":"object","required":["visibility"],"title":"VisibilityRequest"}}}}