diff --git a/docs/ai-agents/embedded/api-reference/.gitignore b/docs/ai-agents/embedded/api-reference/.gitignore new file mode 100644 index 00000000000..3e5606997e9 --- /dev/null +++ b/docs/ai-agents/embedded/api-reference/.gitignore @@ -0,0 +1,4 @@ +# Ignore all generated OpenAPI documentation files +# These are generated by docusaurus-plugin-openapi-docs during build +* +!.gitignore diff --git a/docusaurus/docusaurus.config.ts b/docusaurus/docusaurus.config.ts index fd40aa75289..f0b41f9d436 100644 --- a/docusaurus/docusaurus.config.ts +++ b/docusaurus/docusaurus.config.ts @@ -2,8 +2,11 @@ import "dotenv/config.js"; import type { Config } from "@docusaurus/types"; import { themes as prismThemes } from "prism-react-renderer"; import type { Options as ClassicPresetOptions } from "@docusaurus/preset-classic"; -import fs from "fs"; import { PluginOptions as LLmPluginOptions } from "@signalwire/docusaurus-plugin-llms-txt"; +import { + loadSonarApiSidebar, + replaceApiReferenceCategory, +} from "./src/scripts/embedded-api/sidebar-generator"; // Import remark plugins - lazy load to prevent webpack from bundling Node.js code const getRemarkPlugins = () => ({ @@ -19,7 +22,7 @@ const getRemarkPlugins = () => ({ const plugins = getRemarkPlugins(); -// Import constants +// Import constants for embedded API sidebar generation const { SPEC_CACHE_PATH, API_SIDEBAR_PATH, @@ -164,8 +167,17 @@ const config: Config = { id: "ai-agents", path: "../docs/ai-agents", routeBasePath: "/ai-agents", - sidebarPath: "./sidebar-ai-agents.js", editUrl: "https://github.com/airbytehq/airbyte/blob/master/docs", + docItemComponent: "@theme/ApiItem", // Required for OpenAPI docs rendering + async sidebarItemsGenerator({ defaultSidebarItemsGenerator, ...args }) { + const sidebarItems = await defaultSidebarItemsGenerator(args); + + // Load and filter the Sonar API sidebar based on allowed tags + const sonarApiItems = loadSonarApiSidebar(); + + // Replace the "api-reference" category with the filtered API items + return replaceApiReferenceCategory(sidebarItems, sonarApiItems); + }, remarkPlugins: [ plugins.docsHeaderDecoration, plugins.enterpriseDocsHeaderInformation, @@ -249,90 +261,15 @@ const config: Config = { ], }, ], - [ - "@docusaurus/plugin-content-docs", - { - id: "embedded-api", - path: "api-docs/embedded-api", - routeBasePath: "/embedded-api/", - docItemComponent: "@theme/ApiItem", - async sidebarItemsGenerator() { - // We only want to include visible endpoints on the sidebar. We need to filter out endpoints with tags - // that are not included in the spec. Even if we didn't need to filter out elements the OpenAPI plugin generates a sidebar.ts - // file that exports a nested object, but Docusaurus expects just the array of sidebar items, so we need to extracts the actual sidebar - // items from the generated file structure. - - try { - const specPath = SPEC_CACHE_PATH; - - if (!fs.existsSync(specPath)) { - console.warn( - "Embedded API spec file not found, using empty sidebar", - ); - return []; - } - - const data = JSON.parse(fs.readFileSync(specPath, "utf8")); - console.log("Loaded embedded API spec from cache"); - - // Load the freshly generated sidebar (not the cached one from module load) - const sidebarPath = API_SIDEBAR_PATH; - let freshSidebar: any[] = []; - - if (fs.existsSync(sidebarPath)) { - try { - const sidebarModule = require("./api-docs/embedded-api/sidebar.ts"); - freshSidebar = sidebarModule.default || sidebarModule; - console.log("Loaded fresh sidebar from generated files"); - } catch (sidebarError: any) { - console.warn( - "Could not load fresh sidebar, using empty array:", - sidebarError.message, - ); - freshSidebar = []; - } - } else { - console.warn( - "Generated sidebar file not found, using empty array", - ); - freshSidebar = []; - } - - const allowedTags = data.tags?.map((tag: any) => tag["name"]) || []; - - // Use freshly loaded sidebar items from the generated file - const sidebarItems = Array.isArray(freshSidebar) - ? freshSidebar - : []; - - const filteredItems = sidebarItems.filter((item: any) => { - if (item.type !== "category") { - return true; - } - - return allowedTags.includes(item.label); - }); - - return filteredItems; - } catch (error: any) { - console.warn( - "Error loading embedded API spec from cache:", - error.message, - ); - return []; - } - }, - }, - ], [ "docusaurus-plugin-openapi-docs", { id: "embedded-api", - docsPluginId: "embedded-api", + docsPluginId: "ai-agents", config: { embedded: { specPath: "src/data/embedded_api_spec.json", - outputDir: "api-docs/embedded-api", + outputDir: "../docs/ai-agents/embedded/api-reference", sidebarOptions: { groupPathsBy: "tag", categoryLinkSource: "tag", @@ -476,10 +413,10 @@ const config: Config = { label: "Release notes", }, { - type: "docSidebar", + type: "doc", position: "left", docsPluginId: "ai-agents", - sidebarId: "ai-agents", + docId: "README", label: "AI agents", }, { diff --git a/docusaurus/package.json b/docusaurus/package.json index 3bcb7d758af..184050a9083 100644 --- a/docusaurus/package.json +++ b/docusaurus/package.json @@ -16,7 +16,7 @@ "cleanup-cache": "node src/scripts/cleanup-cache.js", "prebuild": "pnpm run prepare-registry-cache && pnpm run prepare-embedded-api", "postbuild": "pnpm run cleanup-cache", - "prestart": "pnpm run prepare-registry-cache", + "prestart": "pnpm run prepare-registry-cache && pnpm run prepare-embedded-api", "docusaurus": "docusaurus", "start": "node src/scripts/fetchSchema.js && docusaurus start --port 3005", "build": "node src/scripts/fetchSchema.js && docusaurus build", diff --git a/docusaurus/sidebar-ai-agents.js b/docusaurus/sidebar-ai-agents.js deleted file mode 100644 index 6a8ede10f34..00000000000 --- a/docusaurus/sidebar-ai-agents.js +++ /dev/null @@ -1,70 +0,0 @@ -export default { - "ai-agents": [ - { - type: "category", - collapsible: false, - label: "AI Agents", - link: { - type: "doc", - id: "README", - }, - items: [ - { - type: "category", - label: "Embedded", - items: [ - { - type: "category", - label: "Widget", - items: [ - "embedded/widget/quickstart", - { - type: "category", - label: "Tutorials", - items: [ - "embedded/widget/tutorials/prerequisites-setup", - "embedded/widget/tutorials/develop-your-app", - "embedded/widget/tutorials/use-embedded", - ], - }, - "embedded/widget/managing-embedded", - "embedded/widget/template-tags", - ], - }, - { - type: "category", - label: "API", - items: [ - "embedded/api/README", - { - type: "link", - label: "Sonar API reference", - href: "/embedded-api/sonar", - }, - "embedded/api/connection-templates", - "embedded/api/source-templates", - "embedded/api/configuring-sources", - ], - }, - ], - }, - { - type: "category", - label: "MCP Servers", - items: [ - { - type: "doc", - id: "pyairbyte-mcp", - label: "PyAirbyte MCP", - }, - { - type: "doc", - id: "connector-builder-mcp", - label: "Connector Builder MCP", - }, - ] - } - ] - } - ], -}; diff --git a/docusaurus/src/data/embedded_api_spec.json b/docusaurus/src/data/embedded_api_spec.json index 41b7490405a..8f138cef976 100644 --- a/docusaurus/src/data/embedded_api_spec.json +++ b/docusaurus/src/data/embedded_api_spec.json @@ -105,10 +105,108 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatPostRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/ChatMessageEvent" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, + "/api/v1/agents/chat/cache": { + "post": { + "summary": "Post chat message", + "description": "Post a new message to a thread", + "operationId": "create_agents_chat_cache", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "backend", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/CacheType", + "description": "The cache backend to query (starburst or clickhouse)" + }, + "description": "The cache backend to query (starburst or clickhouse)" + }, + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -203,10 +301,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -327,10 +425,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -395,6 +493,192 @@ } } }, + "/api/v1/agents/chat/schema/definitions/sources/{source_definition_id}/qa-report": { + "get": { + "tags": ["Agents - Schema Definitions"], + "summary": "Get Catalog Qa Report", + "operationId": "get_agents_chat_schema_definitions_sources_source_definition_id_qa_report", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "source_definition_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Source Definition Id" + } + }, + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CatalogQaReport" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, + "/api/v1/agents/chat/schema/definitions/sources/{source_definition_id}/qa-report/run": { + "post": { + "tags": ["Agents - Schema Definitions"], + "summary": "Run Catalog Qa Fixes", + "operationId": "create_agents_chat_schema_definitions_sources_source_definition_id_qa_report_run", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "source_definition_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Source Definition Id" + } + }, + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CatalogQaRunApprovedRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CatalogQaRunApprovedResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, "/api/v1/agents/chat/schema/definitions/sources/{source_definition_id}/state": { "get": { "tags": ["Agents - Schema Definitions"], @@ -423,201 +707,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SchemaChatAgentState" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - } - } - }, - "/api/v1/agents/chat/schema/sources/{source_id}": { - "post": { - "tags": ["Chat - Schema"], - "summary": "Post Schema Chat", - "operationId": "create_agents_chat_schema_sources_source_id", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "source_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Source Id" - } - }, - { - "name": "x-organization-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", - "title": "X-Organization-Id" - }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatPostRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatMessageEvent" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/ChatMessageEvent" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - } - } - }, - "/api/v1/agents/chat/schema/sources/{source_id}/state": { - "get": { - "tags": ["Chat - Schema"], - "summary": "Get Schema Chat State", - "operationId": "get_agents_chat_schema_sources_source_id_state", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "source_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Source Id" - } - }, - { - "name": "x-organization-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", - "title": "X-Organization-Id" - }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -702,10 +795,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -798,10 +891,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -914,6 +1007,42 @@ }, "description": "Whether to annotate stream data categories in the discovered catalogs using the catalog annotator agent" }, + { + "name": "bypass_foreign_key_cache", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Bypass Redis caching when running the foreign key annotator", + "default": false, + "title": "Bypass Foreign Key Cache" + }, + "description": "Bypass Redis caching when running the foreign key annotator" + }, + { + "name": "bypass_stream_descriptions_cache", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Bypass Redis caching when running the stream descriptions annotator", + "default": false, + "title": "Bypass Stream Descriptions Cache" + }, + "description": "Bypass Redis caching when running the stream descriptions annotator" + }, + { + "name": "bypass_data_categories_cache", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Bypass Redis caching when running the data categories annotator", + "default": false, + "title": "Bypass Data Categories Cache" + }, + "description": "Bypass Redis caching when running the data categories annotator" + }, { "name": "force", "in": "query", @@ -933,10 +1062,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -993,6 +1122,358 @@ } } }, + "/api/v1/connectors/definitions": { + "get": { + "summary": "List Connector Definitions", + "description": "List all available connector definitions with their auth config specs.\n\nThis endpoint returns a list of all connectors including:\n- Connector name\n- Definition ID (UUID)\n\nThe information is extracted from the generated definitions.py file.\n\nReturns:\n ConnectorDefinitionsListResponse with list of connector summaries", + "operationId": "list_connectors_definitions", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectorDefinitionsListResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, + "/api/v1/connectors/instances": { + "post": { + "summary": "Create Connector Instance", + "description": "Create a new connector instance with secure credential storage.\n\nThis endpoint:\n1. Generates a unique ID for the connector instance\n2. Stores auth_config securely in AWS Secrets Manager\n3. Saves metadata to the database with RLS protection\n4. Returns the created instance ID\n\nArgs:\n request: Connector instance creation request\n user_info: Authenticated user information from token\n repository: Connector instance repository\n secret_store: Secret storage backend (AWS Secrets Manager)\n\nReturns:\n ConnectorInstanceCreateResponse with the created instance ID\n\nRaises:\n HTTPException: 400 for validation errors, 500 for storage/database errors", + "operationId": "create_connectors_instances", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectorInstanceCreateRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectorInstanceCreateResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, + "/api/v1/connectors/instances/{instance_id}": { + "get": { + "summary": "Get Connector Instance", + "description": "Retrieve a connector instance by ID.\n\nThis endpoint:\n1. Queries the database with both instance_id AND workspace_id for isolation\n2. Returns connector instance metadata including secret path (not secret value)\n3. Returns 404 if instance doesn't exist or belongs to different workspace/org\n\nSecurity:\n- RLS automatically filters by organization_id\n- Explicit WHERE clause filters by workspace_id for workspace-level isolation\n- Prevents information disclosure about instances in other workspaces\n\nArgs:\n instance_id: UUID of the connector instance\n user_info: Authenticated user information from token\n repository: Connector instance repository\n\nReturns:\n ConnectorInstanceResponse with instance metadata\n\nRaises:\n HTTPException: 400 if workspace_id missing, 404 if instance not found", + "operationId": "get_connectors_instances_instance_id", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "instance_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Instance Id" + } + }, + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectorInstanceResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, + "/api/v1/connectors/instances/{instance_id}/execute": { + "post": { + "summary": "Execute Connector", + "description": "Execute a connector operation.\n\n- **instance_id**: UUID of the connector instance to execute\n- **entity**: Entity name (e.g., \"customers\", \"invoices\")\n- **action**: Operation (e.g., \"list\", \"get\", \"create\")\n- **params**: Operation-specific parameters\n\nReturns a standardized response envelope with execution results.", + "operationId": "create_connectors_instances_instance_id_execute", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "instance_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Instance Id" + } + }, + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectorExecuteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectorExecuteResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, "/api/v1/embedded/organizations/current-scoped": { "get": { "tags": ["Embedded"], @@ -1013,10 +1494,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -1092,10 +1573,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -1182,10 +1663,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -1261,10 +1742,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -1367,10 +1848,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -1470,10 +1951,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -1559,10 +2040,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -1638,10 +2119,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -1737,10 +2218,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -1816,10 +2297,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -1915,10 +2396,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -2004,10 +2485,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -2091,10 +2572,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -2188,10 +2669,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -2277,10 +2758,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -2366,10 +2847,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -2471,10 +2952,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -2560,10 +3041,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -2657,10 +3138,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -2746,10 +3227,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -2835,10 +3316,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -2932,10 +3413,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -3031,10 +3512,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -3118,10 +3599,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -3217,10 +3698,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -3316,10 +3797,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -3424,10 +3905,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -3530,10 +4011,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -3644,10 +4125,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -3733,10 +4214,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -3812,10 +4293,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -3911,10 +4392,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -3990,10 +4471,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -4089,10 +4570,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -4178,10 +4659,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -4265,10 +4746,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -4362,10 +4843,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -4422,204 +4903,6 @@ } } }, - "/api/v1/integrations/sources/{id}/catalog": { - "patch": { - "tags": ["Sources"], - "summary": "Patch Source Catalog", - "description": "Patch the source's cached catalog. This allows updating global configurations such as selected streams.", - "operationId": "update_integrations_sources_id_catalog", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Id" - } - }, - { - "name": "x-organization-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", - "title": "X-Organization-Id" - }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SourceStreamPatchRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SourceCatalogPatchResponse" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - } - } - }, - "/api/v1/integrations/sources/{id}/catalog/query": { - "post": { - "tags": ["Sources"], - "summary": "Query Source Catalog", - "description": "Query the cached source catalog using JMESPath. Returns 404 if catalog not in cache.", - "operationId": "create_integrations_sources_id_catalog_query", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Id" - } - }, - { - "name": "x-organization-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", - "title": "X-Organization-Id" - }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SourceCatalogQueryRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SourceCatalogQueryResponse" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - } - } - }, "/api/v1/integrations/sources/{id}/check": { "post": { "tags": ["Sources"], @@ -4649,10 +4932,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -4719,224 +5002,12 @@ } } }, - "/api/v1/integrations/sources/{id}/discover": { - "get": { - "tags": ["Sources"], - "summary": "Get Source Catalog", - "description": "**Requires an Access Token as the bearer token.**\n\nGet a source connector streams with fields.", - "operationId": "get_integrations_sources_id_discover", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Id" - } - }, - { - "name": "use_cache", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Whether to use the cached catalog if available. Defaults to true. If false, results will not be cached.", - "default": true, - "title": "Use Cache" - }, - "description": "Whether to use the cached catalog if available. Defaults to true. If false, results will not be cached." - }, - { - "name": "selected", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Whether to only return streams marked as selected in the catalog.", - "default": false, - "title": "Selected" - }, - "description": "Whether to only return streams marked as selected in the catalog." - }, - { - "name": "x-organization-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", - "title": "X-Organization-Id" - }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SourceDiscoverResponse" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - } - } - }, - "/api/v1/integrations/sources/{id}/streams": { + "/api/v1/integrations/sources/{id}/search/{stream_name}": { "post": { "tags": ["Sources"], - "summary": "Add Source Stream", - "description": "Add a new stream to the source's cached catalog.", - "operationId": "create_integrations_sources_id_streams", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Id" - } - }, - { - "name": "x-organization-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", - "title": "X-Organization-Id" - }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SourceStreamCreateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SourceStreamCreateResponse" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - } - } - }, - "/api/v1/integrations/sources/{id}/streams/{stream_name}": { - "patch": { - "tags": ["Sources"], - "summary": "Patch Source Stream", - "description": "Patch a specific stream in the source's cached catalog. This allows updating stream configurations such as sync modes and cursor fields.", - "operationId": "update_integrations_sources_id_streams_stream_name", + "summary": "Search", + "description": "Search source data using condition syntax", + "operationId": "create_integrations_sources_id_search_stream_name", "security": [ { "HTTPBearer": [] @@ -4969,10 +5040,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -4980,7 +5051,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SourceStreamPatchRequest" + "$ref": "#/components/schemas/SearchRequest" } } } @@ -4991,103 +5062,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SourceStreamPatchResponse" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - } - }, - "delete": { - "tags": ["Sources"], - "summary": "Delete Source Stream", - "description": "Delete a specific stream from the source's cached catalog.", - "operationId": "delete_integrations_sources_id_streams_stream_name", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Id" - } - }, - { - "name": "stream_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Stream Name" - } - }, - { - "name": "x-organization-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", - "title": "X-Organization-Id" - }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SourceStreamDeleteResponse" + "$ref": "#/components/schemas/SearchResponse" } } } @@ -5180,10 +5155,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -5257,10 +5232,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -5268,7 +5243,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConnectionTemplateCreateRequest" + "oneOf": [ + { + "$ref": "#/components/schemas/UserHostedConnectionTemplateCreateRequest" + }, + { + "$ref": "#/components/schemas/AirbyteHostedConnectionTemplateCreateRequest" + } + ], + "title": "Template" } } } @@ -5346,10 +5329,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -5445,10 +5428,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -5532,10 +5515,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -5619,10 +5602,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -5718,10 +5701,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -5826,10 +5809,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -5905,10 +5888,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -6026,10 +6009,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -6105,10 +6088,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -6194,10 +6177,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -6291,10 +6274,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -6378,10 +6361,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -6467,10 +6450,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -6575,10 +6558,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -6664,10 +6647,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -6761,10 +6744,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -6860,10 +6843,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -6947,10 +6930,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -7046,10 +7029,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -7145,10 +7128,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -7253,10 +7236,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -7359,10 +7342,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -7438,10 +7421,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -7525,10 +7508,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -7613,10 +7596,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -7709,10 +7692,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -7787,10 +7770,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -7866,10 +7849,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -7945,10 +7928,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -8023,10 +8006,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -8112,10 +8095,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -8212,10 +8195,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -8303,10 +8286,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -8404,10 +8387,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -8504,10 +8487,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -8594,10 +8577,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -8684,10 +8667,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -8773,10 +8756,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -8863,10 +8846,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -8942,10 +8925,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -9078,10 +9061,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -9169,10 +9152,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -9258,10 +9241,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -9357,10 +9340,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -9410,6 +9393,466 @@ } } }, + "/api/v1/internal/cache/connection": { + "post": { + "tags": ["Cache"], + "summary": "Create Cache Connection", + "description": "Set up a source to be queryable by the cache. Admin-only for now, in production this will be done by an AsyncJob.", + "operationId": "create_internal_cache_connection", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheConnectionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheConnectionResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, + "/api/v1/internal/cache/connection/{source_id}": { + "delete": { + "tags": ["Cache"], + "summary": "Delete Cache Connection", + "description": "Delete all cache tables associated with a source", + "operationId": "delete_internal_cache_connection_source_id", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "source_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Source Id" + } + }, + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheConnectionDeleteResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, + "/api/v1/internal/cache/merge": { + "post": { + "tags": ["Cache"], + "summary": "Merge Synced Data", + "description": "Merge recently synced data into the primary table, making it available for queries. Admin-only.", + "operationId": "create_internal_cache_merge", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheMergeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheMergeResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, + "/api/v1/internal/cache/metadata": { + "get": { + "tags": ["Cache"], + "summary": "Get Metadata", + "description": "Retrieve metadata for the cache backend (catalogs/schemas/tables for Starburst or databases/tables/columns for ClickHouse)", + "operationId": "get_internal_cache_metadata", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "backend", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/CacheType", + "description": "Cache backend to inspect", + "default": "starburst" + }, + "description": "Cache backend to inspect" + }, + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/StarburstCacheMetadataResponse" + }, + { + "$ref": "#/components/schemas/ClickHouseCacheMetadataResponse" + } + ], + "discriminator": { + "propertyName": "backend", + "mapping": { + "starburst": "#/components/schemas/StarburstCacheMetadataResponse", + "clickhouse": "#/components/schemas/ClickHouseCacheMetadataResponse" + } + }, + "title": "Response Get Internal Cache Metadata" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, + "/api/v1/internal/cache/query": { + "post": { + "tags": ["Cache"], + "summary": "Query Cache", + "description": "Execute a query against the cache backend (Starburst or ClickHouse)", + "operationId": "create_internal_cache_query", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "x-organization-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "description": "The organization ID to target for this request", + "title": "X-Organization-Id" + }, + "description": "The organization ID to target for this request" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheQueryRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheQueryResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + } + } + }, "/api/v1/internal/health/check": { "get": { "tags": ["Health"], @@ -9504,10 +9947,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -9593,10 +10036,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -9671,10 +10114,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -9759,10 +10202,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -9847,10 +10290,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -9935,10 +10378,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -10023,10 +10466,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -10111,10 +10554,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -10320,10 +10763,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -10436,10 +10879,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -10527,10 +10970,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -10628,10 +11071,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -10719,10 +11162,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -10832,10 +11275,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -10966,10 +11409,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -11068,10 +11511,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -11191,10 +11634,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -11269,10 +11712,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -11367,10 +11810,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -11455,10 +11898,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -11553,10 +11996,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -11710,10 +12153,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -11789,10 +12232,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -11878,10 +12321,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -11965,10 +12408,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "requestBody": { @@ -12062,10 +12505,10 @@ "schema": { "type": "string", "format": "uuid", - "description": "Select the working organization. Necessary since users can belong to multiple organizations.", + "description": "The organization ID to target for this request", "title": "X-Organization-Id" }, - "description": "Select the working organization. Necessary since users can belong to multiple organizations." + "description": "The organization ID to target for this request" } ], "responses": { @@ -12250,7 +12693,8 @@ "local_openai_server", "gpt-4o" ], - "title": "AgentModel" + "title": "AgentModel", + "description": "LLM model configurations for agents." }, "AgentToolName": { "type": "string", @@ -12263,9 +12707,6 @@ "get_source_definition_catalog", "run_source_template_creator", "create_source_template", - "query_source_catalog", - "patch_source_catalog", - "patch_source_catalog_stream", "query_source_definition_catalog", "patch_source_definition_catalog", "patch_source_definition_catalog_stream", @@ -12275,13 +12716,99 @@ "query_source_template_catalog", "patch_source_template_catalog", "patch_source_template_catalog_stream", - "add_selected_streams", - "remove_selected_streams", - "set_selected_streams" + "get_selected_streams", + "set_selected_streams", + "select_streams", + "query_starburst_cache", + "get_starburst_cache_metadata", + "query_clickhouse_cache", + "get_clickhouse_cache_metadata" ], "title": "AgentToolName", "description": "Enum of tool names available to agents.\nThis enum is automatically synced to the frontend via OpenAPI generation,\nensuring type safety when handling tool calls and responses.\nWhen adding a new tool to an agent (e.g., in app/agents/chat_agent.py),\nadd the corresponding tool name here to expose it to the frontend." }, + "AirbyteHostedConnectionTemplateCreateRequest": { + "properties": { + "data_hosting_type": { + "type": "string", + "const": "airbyte_hosted", + "title": "Data Hosting Type", + "description": "The hosting type. 'airbyte_hosted' means destination config is auto-populated with Airbyte-managed S3." + }, + "cron_expression": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cron Expression", + "description": "A valid Quartz cron expression describing the schedule for the connection." + } + }, + "type": "object", + "required": ["data_hosting_type"], + "title": "AirbyteHostedConnectionTemplateCreateRequest", + "description": "Create request for Airbyte-hosted connection templates where destination configuration is auto-populated." + }, + "AndCondition": { + "properties": { + "and": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/EqCondition" + }, + { + "$ref": "#/components/schemas/NeqCondition" + }, + { + "$ref": "#/components/schemas/GtCondition" + }, + { + "$ref": "#/components/schemas/GteCondition" + }, + { + "$ref": "#/components/schemas/LtCondition" + }, + { + "$ref": "#/components/schemas/LteCondition" + }, + { + "$ref": "#/components/schemas/InCondition" + }, + { + "$ref": "#/components/schemas/LikeCondition" + }, + { + "$ref": "#/components/schemas/FuzzyCondition" + }, + { + "$ref": "#/components/schemas/SemanticCondition" + }, + { + "$ref": "#/components/schemas/NotCondition" + }, + { + "$ref": "#/components/schemas/AndCondition" + }, + { + "$ref": "#/components/schemas/OrCondition" + } + ] + }, + "type": "array", + "title": "And", + "description": "All conditions must match" + } + }, + "type": "object", + "required": ["and"], + "title": "AndCondition", + "description": "True if all nested conditions are true." + }, "ApiError": { "properties": { "field": { @@ -12541,6 +13068,343 @@ "title": "BillingStateUpdateResponse", "description": "Response after updating billing state." }, + "CacheCatalogMetadata": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Catalog name" + }, + "schemas": { + "items": { + "$ref": "#/components/schemas/CacheSchemaMetadata" + }, + "type": "array", + "title": "Schemas", + "description": "Schemas in this catalog" + } + }, + "type": "object", + "required": ["name", "schemas"], + "title": "CacheCatalogMetadata" + }, + "CacheColumnMetadata": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Column name" + }, + "type": { + "type": "string", + "title": "Type", + "description": "Column type" + } + }, + "type": "object", + "required": ["name", "type"], + "title": "CacheColumnMetadata" + }, + "CacheConnectionDeleteResponse": { + "properties": { + "deleted_tables": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Deleted Tables", + "description": "List of table names that were deleted" + } + }, + "type": "object", + "title": "CacheConnectionDeleteResponse" + }, + "CacheConnectionRequest": { + "properties": { + "source_id": { + "type": "string", + "format": "uuid", + "title": "Source Id", + "description": "The source ID to make queryable by the cache backend" + } + }, + "type": "object", + "required": ["source_id"], + "title": "CacheConnectionRequest" + }, + "CacheConnectionResponse": { + "properties": { + "source_id": { + "type": "string", + "format": "uuid", + "title": "Source Id", + "description": "The source ID that was connected to the cache" + }, + "schema_name": { + "type": "string", + "title": "Schema Name", + "description": "The schema name created in the cache backend" + }, + "table_names": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Table Names", + "description": "List of table names created in the cache backend" + } + }, + "type": "object", + "required": ["source_id", "schema_name"], + "title": "CacheConnectionResponse" + }, + "CacheMergeRequest": { + "properties": { + "source_id": { + "type": "string", + "format": "uuid", + "title": "Source Id", + "description": "The source ID whose cache data should be merged" + }, + "since": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Since", + "description": "Lexigraphically sortable last highwater mark (default: merge everything)" + } + }, + "type": "object", + "required": ["source_id"], + "title": "CacheMergeRequest" + }, + "CacheMergeResponse": { + "properties": {}, + "type": "object", + "title": "CacheMergeResponse" + }, + "CacheQueryRequest": { + "properties": { + "backend": { + "$ref": "#/components/schemas/CacheType", + "description": "The cache backend to query (starburst or clickhouse)" + }, + "query": { + "type": "string", + "title": "Query", + "description": "The SQL query to execute" + } + }, + "type": "object", + "required": ["backend", "query"], + "title": "CacheQueryRequest" + }, + "CacheQueryResponse": { + "properties": { + "columns": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Columns", + "description": "Column names from the query result" + }, + "rows": { + "items": { + "items": {}, + "type": "array" + }, + "type": "array", + "title": "Rows", + "description": "Query result rows" + }, + "row_count": { + "type": "integer", + "title": "Row Count", + "description": "Number of rows returned" + } + }, + "type": "object", + "required": ["columns", "rows", "row_count"], + "title": "CacheQueryResponse" + }, + "CacheSchemaMetadata": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Schema name" + }, + "tables": { + "items": { + "$ref": "#/components/schemas/CacheTableMetadata" + }, + "type": "array", + "title": "Tables", + "description": "Tables in this schema" + } + }, + "type": "object", + "required": ["name", "tables"], + "title": "CacheSchemaMetadata" + }, + "CacheTableMetadata": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Table name" + }, + "columns": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/CacheColumnMetadata" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Columns", + "description": "Optional column definitions" + } + }, + "type": "object", + "required": ["name"], + "title": "CacheTableMetadata" + }, + "CacheType": { + "type": "string", + "enum": ["starburst", "clickhouse"], + "title": "CacheType" + }, + "CatalogQaReport": { + "properties": { + "source_definition_id": { + "type": "string", + "title": "Source Definition Id" + }, + "validation_findings": { + "$ref": "#/components/schemas/QaOutput" + }, + "foreign_key_findings": { + "$ref": "#/components/schemas/QaOutput" + }, + "category_findings": { + "$ref": "#/components/schemas/QaOutput" + }, + "stream_description_findings": { + "$ref": "#/components/schemas/QaOutput" + }, + "field_description_findings": { + "$ref": "#/components/schemas/QaOutput" + } + }, + "type": "object", + "required": [ + "source_definition_id", + "validation_findings", + "foreign_key_findings", + "category_findings", + "stream_description_findings", + "field_description_findings" + ], + "title": "CatalogQaReport" + }, + "CatalogQaRunApprovedRequest": { + "properties": { + "approved_issues": { + "items": { + "$ref": "#/components/schemas/QaIssueWithContext-Input" + }, + "type": "array", + "title": "Approved Issues" + } + }, + "type": "object", + "title": "CatalogQaRunApprovedRequest" + }, + "CatalogQaRunApprovedResponse": { + "properties": { + "source_definition_id": { + "type": "string", + "format": "uuid", + "title": "Source Definition Id" + }, + "approved_issue_count": { + "type": "integer", + "title": "Approved Issue Count" + } + }, + "type": "object", + "required": ["source_definition_id", "approved_issue_count"], + "title": "CatalogQaRunApprovedResponse" + }, + "CategoriesIssueContext": { + "properties": { + "stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stream" + }, + "fields": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Fields" + } + }, + "type": "object", + "title": "CategoriesIssueContext" + }, + "CategoryCatalogContext": { + "properties": { + "stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stream" + }, + "data_category": { + "anyOf": [ + { + "$ref": "#/components/schemas/DataCategory" + }, + { + "type": "null" + } + ] + }, + "other_streams_in_category": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Other Streams In Category" + } + }, + "type": "object", + "title": "CategoryCatalogContext" + }, "ChatHistoryResponse": { "properties": { "thread_id": { @@ -12573,7 +13437,8 @@ "user", "assistant", "tool_call", - "tool_response" + "tool_response", + "deferred_tool_request" ], "title": "Event" }, @@ -12590,6 +13455,9 @@ }, { "$ref": "#/components/schemas/ToolResponseEvent" + }, + { + "$ref": "#/components/schemas/DeferredToolRequestEvent" } ], "title": "Data" @@ -12603,7 +13471,14 @@ "ChatPostRequest": { "properties": { "prompt": { - "type": "string", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "title": "Prompt" }, "thread_id": { @@ -12616,10 +13491,23 @@ } ], "title": "Thread Id" + }, + "deferred_tool_results": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/DeferredToolResult" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Deferred Tool Results" } }, "type": "object", - "required": ["prompt"], "title": "ChatPostRequest" }, "CheckStatus": { @@ -12627,6 +13515,48 @@ "enum": ["pending", "running", "cancelled", "failed", "succeeded"], "title": "CheckStatus" }, + "ClickHouseCacheMetadataResponse": { + "properties": { + "backend": { + "type": "string", + "const": "clickhouse", + "title": "Backend", + "description": "Cache backend type", + "default": "clickhouse" + }, + "databases": { + "items": { + "$ref": "#/components/schemas/ClickHouseDatabaseMetadata" + }, + "type": "array", + "title": "Databases", + "description": "Available databases with their tables and columns" + } + }, + "type": "object", + "required": ["databases"], + "title": "ClickHouseCacheMetadataResponse" + }, + "ClickHouseDatabaseMetadata": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Database name" + }, + "tables": { + "items": { + "$ref": "#/components/schemas/CacheTableMetadata" + }, + "type": "array", + "title": "Tables", + "description": "Tables in this database" + } + }, + "type": "object", + "required": ["name", "tables"], + "title": "ClickHouseDatabaseMetadata" + }, "CompleteSourceOauthRequest": { "properties": { "workspace_id": { @@ -12832,6 +13762,10 @@ "title": "Sync On Create", "default": true }, + "data_hosting_type": { + "$ref": "#/components/schemas/DataHostingType", + "default": "user_hosted" + }, "tags": { "items": { "type": "string" @@ -12874,56 +13808,6 @@ ], "title": "ConnectionTemplate" }, - "ConnectionTemplateCreateRequest": { - "properties": { - "destination_name": { - "type": "string", - "title": "Destination Name" - }, - "destination_definition_id": { - "type": "string", - "format": "uuid", - "title": "Destination Definition Id", - "description": "The id of the destination definition (type of destination connector) to use for the connection." - }, - "destination_config": { - "additionalProperties": true, - "type": "object", - "title": "Destination Config", - "description": "The configuration for the destination connector. Must match the destination definition." - }, - "cron_expression": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cron Expression", - "description": "A valid Quartz cron expression describing the schedule for the connection." - }, - "non_breaking_changes_preference": { - "$ref": "#/components/schemas/NonBreakingChangesPreference", - "description": "The action Airbyte should take when breaking changes are made to a source schema.", - "default": "ignore" - }, - "sync_on_create": { - "type": "boolean", - "title": "Sync On Create", - "description": "Whether to start a sync job when the connection is created.", - "default": true - } - }, - "type": "object", - "required": [ - "destination_name", - "destination_definition_id", - "destination_config" - ], - "title": "ConnectionTemplateCreateRequest" - }, "ConnectionTemplateCreateResponse": { "properties": { "id": { @@ -12981,6 +13865,10 @@ "title": "Sync On Create", "default": true }, + "data_hosting_type": { + "$ref": "#/components/schemas/DataHostingType", + "default": "user_hosted" + }, "tags": { "items": { "type": "string" @@ -13097,6 +13985,10 @@ "title": "Sync On Create", "default": true }, + "data_hosting_type": { + "$ref": "#/components/schemas/DataHostingType", + "default": "user_hosted" + }, "tags": { "items": { "type": "string" @@ -13282,6 +14174,10 @@ "title": "Sync On Create", "default": true }, + "data_hosting_type": { + "$ref": "#/components/schemas/DataHostingType", + "default": "user_hosted" + }, "tags": { "items": { "type": "string" @@ -13469,6 +14365,170 @@ "required": ["name"], "title": "ConnectorDefinitionSummarized" }, + "ConnectorDefinitionSummary": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "id": { + "type": "string", + "title": "Id" + } + }, + "type": "object", + "required": ["name", "id"], + "title": "ConnectorDefinitionSummary", + "description": "Summary information for a connector definition." + }, + "ConnectorDefinitionsListResponse": { + "properties": { + "connectors": { + "items": { + "$ref": "#/components/schemas/ConnectorDefinitionSummary" + }, + "type": "array", + "title": "Connectors" + } + }, + "type": "object", + "required": ["connectors"], + "title": "ConnectorDefinitionsListResponse", + "description": "Response model for listing all connector definitions." + }, + "ConnectorExecuteRequest": { + "properties": { + "entity": { + "type": "string", + "title": "Entity" + }, + "action": { + "type": "string", + "title": "Action" + }, + "params": { + "additionalProperties": true, + "type": "object", + "title": "Params" + } + }, + "type": "object", + "required": ["entity", "action", "params"], + "title": "ConnectorExecuteRequest", + "description": "Request body for connector execution." + }, + "ConnectorExecuteResponse": { + "properties": { + "status": { + "type": "string", + "title": "Status" + }, + "result": { + "title": "Result" + }, + "metadata": { + "$ref": "#/components/schemas/ExecutionMetadata" + } + }, + "type": "object", + "required": ["status", "result", "metadata"], + "title": "ConnectorExecuteResponse", + "description": "Standardized response envelope for connector execution." + }, + "ConnectorInstanceCreateRequest": { + "properties": { + "connector_definition_id": { + "type": "string", + "title": "Connector Definition Id" + }, + "auth_config": { + "additionalProperties": true, + "type": "object", + "title": "Auth Config" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "user_config": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "User Config" + } + }, + "type": "object", + "required": ["connector_definition_id", "auth_config"], + "title": "ConnectorInstanceCreateRequest", + "description": "Request model for creating connector instance." + }, + "ConnectorInstanceCreateResponse": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + } + }, + "type": "object", + "required": ["id"], + "title": "ConnectorInstanceCreateResponse", + "description": "Response model for creating connector instance." + }, + "ConnectorInstanceResponse": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "definition_id": { + "type": "string", + "format": "uuid", + "title": "Definition Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "user_config": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "User Config" + } + }, + "type": "object", + "required": ["id", "definition_id", "name", "user_config"], + "title": "ConnectorInstanceResponse", + "description": "Response model for connector instance retrieval." + }, "ConnectorSpecification": { "properties": { "documentationUrl": { @@ -13843,7 +14903,7 @@ }, "flow": { "type": "string", - "enum": ["payment_method", "portal"], + "enum": ["payment_method", "portal", "setup"], "title": "Flow", "default": "portal" } @@ -13878,6 +14938,7 @@ "contact", "person", "account", + "cohort", "institution", "campaign", "lead", @@ -13892,6 +14953,7 @@ "settings", "custom", "product", + "location", "task", "metric", "object", @@ -13899,6 +14961,62 @@ ], "title": "DataCategory" }, + "DataHostingType": { + "type": "string", + "enum": ["user_hosted", "airbyte_hosted"], + "title": "DataHostingType" + }, + "DeferredToolRequestEvent": { + "properties": { + "tool_call_id": { + "type": "string", + "title": "Tool Call Id" + }, + "tool_name": { + "$ref": "#/components/schemas/AgentToolName" + }, + "args": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Args" + } + }, + "type": "object", + "required": ["tool_call_id", "tool_name", "args"], + "title": "DeferredToolRequestEvent", + "description": "Format of deferred tool request events sent to the browser." + }, + "DeferredToolResult": { + "properties": { + "tool_call_id": { + "type": "string", + "title": "Tool Call Id" + }, + "tool_name": { + "type": "string", + "title": "Tool Name" + }, + "result": { + "additionalProperties": true, + "type": "object", + "title": "Result" + } + }, + "type": "object", + "required": ["tool_call_id", "tool_name", "result"], + "title": "DeferredToolResult", + "description": "Result from a deferred tool execution provided by the UI." + }, "DestinationDefinitionListItem": { "properties": { "id": { @@ -14279,6 +15397,11 @@ "type": "boolean", "title": "Is Enrolled" }, + "is_instance_admin": { + "type": "boolean", + "title": "Is Instance Admin", + "default": false + }, "organization_id": { "anyOf": [ { @@ -14313,6 +15436,32 @@ } ], "title": "First Workspace Id" + }, + "payment_provider_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Payment Provider Id" + }, + "needs_payment_setup": { + "type": "boolean", + "title": "Needs Payment Setup", + "default": false + }, + "onboarding_status": { + "anyOf": [ + { + "$ref": "#/components/schemas/OnboardingStatusEnum" + }, + { + "type": "null" + } + ] } }, "type": "object", @@ -14320,6 +15469,165 @@ "title": "EnrollmentStatusResponse", "description": "Response schema for enrollment status endpoint.\n\nUsed to determine if a user is new vs existing, and whether\ntheir organization is enrolled in Sonar." }, + "EqCondition": { + "properties": { + "eq": { + "additionalProperties": true, + "type": "object", + "title": "Eq", + "description": "Equal: {field_name: value}" + } + }, + "type": "object", + "required": ["eq"], + "title": "EqCondition", + "description": "Equal to: field equals value." + }, + "ExecutionMetadata": { + "properties": { + "connector_instance_id": { + "type": "string", + "title": "Connector Instance Id" + }, + "execution_time_ms": { + "type": "integer", + "title": "Execution Time Ms" + } + }, + "type": "object", + "required": ["connector_instance_id", "execution_time_ms"], + "title": "ExecutionMetadata", + "description": "Metadata about the execution." + }, + "FailureOrigin": { + "type": "string", + "enum": [ + "source", + "destination", + "replication", + "normalization", + "dbt", + "persistence", + "airbyte_platform", + "unknown" + ], + "title": "FailureOrigin", + "description": "Indicates where the error originated." + }, + "FailureReason": { + "properties": { + "timestamp": { + "type": "integer", + "title": "Timestamp" + }, + "failure_origin": { + "anyOf": [ + { + "$ref": "#/components/schemas/FailureOrigin" + }, + { + "type": "null" + } + ] + }, + "failure_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/FailureType" + }, + { + "type": "null" + } + ] + }, + "external_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "External Message", + "description": "User-friendly error message suitable for display" + }, + "internal_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Internal Message", + "description": "Technical error details for debugging" + }, + "stacktrace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stacktrace" + }, + "retryable": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Retryable", + "description": "True if retrying may succeed" + }, + "from_trace_message": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "From Trace Message" + }, + "stream_descriptor": { + "anyOf": [ + { + "$ref": "#/components/schemas/StreamDescriptor" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["timestamp"], + "title": "FailureReason", + "description": "Structured failure information from Coral API.\nContains details about why a check or operation failed." + }, + "FailureType": { + "type": "string", + "enum": [ + "config_error", + "transient_error", + "system_error", + "destination_timeout", + "heartbeat_timeout", + "manual_cancellation", + "refresh_schema" + ], + "title": "FailureType", + "description": "Categorizes well known errors into types for programmatic handling." + }, "FieldFilteringMapper": { "properties": { "type": { @@ -14542,6 +15850,117 @@ ], "title": "ForeignKey" }, + "ForeignKeyCatalogContext": { + "properties": { + "stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stream" + }, + "field": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Field" + }, + "foreign_keys": { + "items": { + "$ref": "#/components/schemas/ForeignKey" + }, + "type": "array", + "title": "Foreign Keys" + }, + "data_category": { + "anyOf": [ + { + "$ref": "#/components/schemas/DataCategory" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "ForeignKeyCatalogContext" + }, + "ForeignKeysIssueContext": { + "properties": { + "stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stream" + }, + "field": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Field" + }, + "referenced_stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Referenced Stream" + }, + "referenced_field": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Referenced Field" + } + }, + "type": "object", + "title": "ForeignKeysIssueContext" + }, + "FuzzyCondition": { + "properties": { + "fuzzy": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Fuzzy", + "description": "Fuzzy match: {field_name: pattern}" + } + }, + "type": "object", + "required": ["fuzzy"], + "title": "FuzzyCondition", + "description": "Fuzzy text match." + }, "GetDriveItem": { "properties": { "id": { @@ -14625,6 +16044,34 @@ "required": ["consent_url"], "title": "GetEmbeddedSourceConsentUrlResponse" }, + "GtCondition": { + "properties": { + "gt": { + "additionalProperties": true, + "type": "object", + "title": "Gt", + "description": "Greater than: {field_name: value}" + } + }, + "type": "object", + "required": ["gt"], + "title": "GtCondition", + "description": "Greater than: field > value." + }, + "GteCondition": { + "properties": { + "gte": { + "additionalProperties": true, + "type": "object", + "title": "Gte", + "description": "Greater than or equal: {field_name: value}" + } + }, + "type": "object", + "required": ["gte"], + "title": "GteCondition", + "description": "Greater than or equal: field >= value (equivalent to not lt)." + }, "HashingMapper": { "properties": { "type": { @@ -14692,6 +16139,23 @@ "enum": ["GET", "POST", "PUT", "DELETE"], "title": "HttpMethod" }, + "InCondition": { + "properties": { + "in": { + "additionalProperties": { + "items": {}, + "type": "array" + }, + "type": "object", + "title": "In", + "description": "In list: {field_name: [values]}" + } + }, + "type": "object", + "required": ["in"], + "title": "InCondition", + "description": "In list: true if field value is in list (equivalent to or [eq, eq...])." + }, "Invoice": { "properties": { "id": { @@ -14765,6 +16229,50 @@ "required": ["invoices", "hasMore"], "title": "InvoicesResponse" }, + "LikeCondition": { + "properties": { + "like": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Like", + "description": "Like pattern: {field_name: pattern}" + } + }, + "type": "object", + "required": ["like"], + "title": "LikeCondition", + "description": "Partial string match (supports % wildcards)." + }, + "LtCondition": { + "properties": { + "lt": { + "additionalProperties": true, + "type": "object", + "title": "Lt", + "description": "Less than: {field_name: value}" + } + }, + "type": "object", + "required": ["lt"], + "title": "LtCondition", + "description": "Less than: field < value." + }, + "LteCondition": { + "properties": { + "lte": { + "additionalProperties": true, + "type": "object", + "title": "Lte", + "description": "Less than or equal: {field_name: value}" + } + }, + "type": "object", + "required": ["lte"], + "title": "LteCondition", + "description": "Less than or equal: field <= value (equivalent to not gt)." + }, "MessageContent": { "properties": { "content": { @@ -14777,11 +16285,78 @@ "title": "MessageContent", "description": "Content of a chat message." }, + "NeqCondition": { + "properties": { + "neq": { + "additionalProperties": true, + "type": "object", + "title": "Neq", + "description": "Not equal: {field_name: value}" + } + }, + "type": "object", + "required": ["neq"], + "title": "NeqCondition", + "description": "Not equal to: field does not equal value (equivalent to not eq)." + }, "NonBreakingChangesPreference": { "type": "string", "enum": ["ignore", "disable", "propagate_columns", "propagate_fully"], "title": "NonBreakingChangesPreference" }, + "NotCondition": { + "properties": { + "not": { + "anyOf": [ + { + "$ref": "#/components/schemas/EqCondition" + }, + { + "$ref": "#/components/schemas/NeqCondition" + }, + { + "$ref": "#/components/schemas/GtCondition" + }, + { + "$ref": "#/components/schemas/GteCondition" + }, + { + "$ref": "#/components/schemas/LtCondition" + }, + { + "$ref": "#/components/schemas/LteCondition" + }, + { + "$ref": "#/components/schemas/InCondition" + }, + { + "$ref": "#/components/schemas/LikeCondition" + }, + { + "$ref": "#/components/schemas/FuzzyCondition" + }, + { + "$ref": "#/components/schemas/SemanticCondition" + }, + { + "$ref": "#/components/schemas/NotCondition" + }, + { + "$ref": "#/components/schemas/AndCondition" + }, + { + "$ref": "#/components/schemas/OrCondition" + } + ], + "title": "Not", + "description": "Negation of nested condition" + } + }, + "type": "object", + "required": ["not"], + "title": "NotCondition", + "description": "Negates the nested condition." + }, "OAuthConfigSpecification": { "properties": { "oauth_user_input_from_connector_config_specification": { @@ -15106,10 +16681,67 @@ "NOT_STARTED", "DESTINATION_SETUP_COMPLETE", "EMBED_CODE_COPIED", + "PAYMENT_COMPLETE", "COMPLETED" ], "title": "OnboardingStatusEnum" }, + "OrCondition": { + "properties": { + "or": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/EqCondition" + }, + { + "$ref": "#/components/schemas/NeqCondition" + }, + { + "$ref": "#/components/schemas/GtCondition" + }, + { + "$ref": "#/components/schemas/GteCondition" + }, + { + "$ref": "#/components/schemas/LtCondition" + }, + { + "$ref": "#/components/schemas/LteCondition" + }, + { + "$ref": "#/components/schemas/InCondition" + }, + { + "$ref": "#/components/schemas/LikeCondition" + }, + { + "$ref": "#/components/schemas/FuzzyCondition" + }, + { + "$ref": "#/components/schemas/SemanticCondition" + }, + { + "$ref": "#/components/schemas/NotCondition" + }, + { + "$ref": "#/components/schemas/AndCondition" + }, + { + "$ref": "#/components/schemas/OrCondition" + } + ] + }, + "type": "array", + "title": "Or", + "description": "Any condition must match" + } + }, + "type": "object", + "required": ["or"], + "title": "OrCondition", + "description": "True if any nested conditions are true." + }, "OrbWebhookResponse": { "properties": { "status": { @@ -15227,6 +16859,16 @@ } ], "title": "Graceperiodendsat" + }, + "billingState": { + "anyOf": [ + { + "$ref": "#/components/schemas/BillingStateEnum" + }, + { + "type": "null" + } + ] } }, "type": "object", @@ -15434,6 +17076,50 @@ "type": "string", "title": "Name" }, + "planId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Planid" + }, + "planUnitPrice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Planunitprice" + }, + "planPriceCurrency": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Planpricecurrency" + }, + "planPriceCadence": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Planpricecadence" + }, "selfServeSubscription": { "type": "boolean", "title": "Selfservesubscription" @@ -15655,6 +17341,222 @@ "required": ["type"], "title": "PaymentMethod" }, + "QaIssue": { + "properties": { + "severity": { + "type": "string", + "enum": ["low", "medium", "high"], + "title": "Severity" + }, + "summary": { + "type": "string", + "title": "Summary" + }, + "description": { + "type": "string", + "title": "Description" + }, + "remediation": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Remediation" + }, + "issue_type": { + "$ref": "#/components/schemas/QaIssueType" + }, + "context": { + "anyOf": [ + { + "$ref": "#/components/schemas/StreamDescriptionIssueContext" + }, + { + "$ref": "#/components/schemas/StreamFieldDescriptionIssueContext" + }, + { + "$ref": "#/components/schemas/ForeignKeysIssueContext" + }, + { + "$ref": "#/components/schemas/CategoriesIssueContext" + }, + { + "$ref": "#/components/schemas/ValidationIssueContext" + }, + { + "type": "null" + } + ], + "title": "Context" + } + }, + "type": "object", + "required": ["severity", "summary", "description", "issue_type"], + "title": "QaIssue" + }, + "QaIssueCatalogContext-Input": { + "anyOf": [ + { + "$ref": "#/components/schemas/StreamDescriptionCatalogContext" + }, + { + "$ref": "#/components/schemas/StreamFieldDescriptionCatalogContext" + }, + { + "$ref": "#/components/schemas/ForeignKeyCatalogContext" + }, + { + "$ref": "#/components/schemas/CategoryCatalogContext" + }, + { + "$ref": "#/components/schemas/ValidationCatalogContext" + } + ] + }, + "QaIssueCatalogContext-Output": { + "anyOf": [ + { + "$ref": "#/components/schemas/StreamDescriptionCatalogContext" + }, + { + "$ref": "#/components/schemas/StreamFieldDescriptionCatalogContext" + }, + { + "$ref": "#/components/schemas/ForeignKeyCatalogContext" + }, + { + "$ref": "#/components/schemas/CategoryCatalogContext" + }, + { + "$ref": "#/components/schemas/ValidationCatalogContext" + } + ] + }, + "QaIssueType": { + "type": "string", + "enum": [ + "stream_descriptions", + "stream_field_descriptions", + "foreign_keys", + "categories", + "validation" + ], + "title": "QaIssueType" + }, + "QaIssueWithContext-Input": { + "properties": { + "issue": { + "$ref": "#/components/schemas/QaIssue" + }, + "catalog_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/QaIssueCatalogContext-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["issue"], + "title": "QaIssueWithContext" + }, + "QaIssueWithContext-Output": { + "properties": { + "issue": { + "$ref": "#/components/schemas/QaIssue" + }, + "catalog_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/QaIssueCatalogContext-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["issue"], + "title": "QaIssueWithContext" + }, + "QaOutput": { + "properties": { + "summary": { + "type": "string", + "title": "Summary" + }, + "issues": { + "items": { + "$ref": "#/components/schemas/QaIssueWithContext-Output" + }, + "type": "array", + "title": "Issues" + } + }, + "type": "object", + "required": ["summary"], + "title": "QaOutput" + }, + "Query": { + "properties": { + "where": { + "anyOf": [ + { + "$ref": "#/components/schemas/EqCondition" + }, + { + "$ref": "#/components/schemas/NeqCondition" + }, + { + "$ref": "#/components/schemas/GtCondition" + }, + { + "$ref": "#/components/schemas/GteCondition" + }, + { + "$ref": "#/components/schemas/LtCondition" + }, + { + "$ref": "#/components/schemas/LteCondition" + }, + { + "$ref": "#/components/schemas/InCondition" + }, + { + "$ref": "#/components/schemas/LikeCondition" + }, + { + "$ref": "#/components/schemas/FuzzyCondition" + }, + { + "$ref": "#/components/schemas/SemanticCondition" + }, + { + "$ref": "#/components/schemas/NotCondition" + }, + { + "$ref": "#/components/schemas/AndCondition" + }, + { + "$ref": "#/components/schemas/OrCondition" + } + ], + "title": "Where" + } + }, + "type": "object", + "required": ["where"], + "title": "Query", + "description": "Query wrapper for conditions." + }, "QueueInformation": { "properties": { "total": { @@ -16070,6 +17972,83 @@ "required": ["organization_id", "workspace_id"], "title": "ScopedTokenInfoGetResponse" }, + "SearchHit": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "score": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Score" + }, + "data": { + "additionalProperties": true, + "type": "object", + "title": "Data" + } + }, + "type": "object", + "required": ["data"], + "title": "SearchHit", + "description": "A single search result." + }, + "SearchRequest": { + "properties": { + "query": { + "$ref": "#/components/schemas/Query" + } + }, + "type": "object", + "required": ["query"], + "title": "SearchRequest", + "description": "Request schema for search endpoint." + }, + "SearchResponse": { + "properties": { + "hits": { + "items": { + "$ref": "#/components/schemas/SearchHit" + }, + "type": "array", + "title": "Hits", + "default": [] + }, + "total": { + "type": "integer", + "title": "Total" + }, + "took_ms": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Took Ms" + } + }, + "type": "object", + "required": ["total"], + "title": "SearchResponse", + "description": "Response schema for search endpoint." + }, "SecretMigrationStatus": { "type": "string", "enum": [ @@ -16082,6 +18061,22 @@ "title": "SecretMigrationStatus", "description": "Status of secret storage migration during organization enrollment.\n\n- NOT_STARTED: Migration has not been initiated (should not appear in practice)\n- IN_PROGRESS: Migration is currently running\n- COMPLETED: Secrets successfully migrated from default to organization-specific storage\n- FAILED: Migration encountered an error (enrollment continues, status tracked for monitoring)\n- NOT_APPLICABLE: No migration needed (CUSTOMER_OWNED storage, or no default secrets to migrate)" }, + "SemanticCondition": { + "properties": { + "semantic": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Semantic", + "description": "Semantic search: {field_name: pattern}" + } + }, + "type": "object", + "required": ["semantic"], + "title": "SemanticCondition", + "description": "AI-powered natural language search." + }, "SonarCatalogInput": { "properties": { "streams": { @@ -16103,7 +18098,9 @@ "type": "null" } ], - "title": "Selected Streams" + "title": "Selected Streams", + "description": "DEPRECATED: Stream selection is now managed in UI localStorage. This field is no longer used.", + "deprecated": true } }, "type": "object", @@ -16130,7 +18127,9 @@ "type": "null" } ], - "title": "Selected Streams" + "title": "Selected Streams", + "description": "DEPRECATED: Stream selection is now managed in UI localStorage. This field is no longer used.", + "deprecated": true } }, "type": "object", @@ -16180,6 +18179,12 @@ "title": "Suggested", "default": false }, + "is_metric": { + "type": "boolean", + "title": "Is Metric", + "description": "True if the stream represents aggregated metric data of a specific type. When true, data_category denotes the metric subtype (e.g., cohort). Use data_category='metric' only when the aggregation has no specific type.", + "default": false + }, "cursor_fields": { "anyOf": [ { @@ -16283,39 +18288,6 @@ "type": "object", "title": "SonarStream" }, - "SourceCatalogPatchResponse": { - "properties": { - "catalog": { - "$ref": "#/components/schemas/SonarCatalogOutput" - } - }, - "type": "object", - "required": ["catalog"], - "title": "SourceCatalogPatchResponse" - }, - "SourceCatalogQueryRequest": { - "properties": { - "jmes_query": { - "type": "string", - "title": "Jmes Query", - "description": "JMESPath query to execute on the cached source catalog" - } - }, - "type": "object", - "required": ["jmes_query"], - "title": "SourceCatalogQueryRequest" - }, - "SourceCatalogQueryResponse": { - "properties": { - "result": { - "title": "Result", - "description": "The result of the JMESPath query on the cached source catalog" - } - }, - "type": "object", - "required": ["result"], - "title": "SourceCatalogQueryResponse" - }, "SourceCheckConfigRequest": { "properties": { "name": { @@ -16398,6 +18370,28 @@ } ], "title": "Error Message" + }, + "failure_reason": { + "anyOf": [ + { + "$ref": "#/components/schemas/FailureReason" + }, + { + "type": "null" + } + ] + }, + "enhanced_error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Enhanced Error Message", + "description": "LLM-enhanced user-friendly error message (when available). Prefer this over failure_reason.external_message for display when present." } }, "type": "object", @@ -16800,21 +18794,6 @@ "required": ["id", "deleted_at"], "title": "SourceDeleteResponse" }, - "SourceDiscoverResponse": { - "properties": { - "source_id": { - "type": "string", - "format": "uuid", - "title": "Source Id" - }, - "sonar_catalog": { - "$ref": "#/components/schemas/SonarCatalogOutput" - } - }, - "type": "object", - "required": ["source_id", "sonar_catalog"], - "title": "SourceDiscoverResponse" - }, "SourceGetResponse": { "properties": { "id": { @@ -16920,68 +18899,6 @@ "required": ["data"], "title": "SourceListResponse" }, - "SourceStreamCreateRequest": { - "properties": { - "stream": { - "$ref": "#/components/schemas/SonarStream", - "description": "The stream to add to the catalog." - } - }, - "type": "object", - "required": ["stream"], - "title": "SourceStreamCreateRequest" - }, - "SourceStreamCreateResponse": { - "properties": { - "stream": { - "$ref": "#/components/schemas/SonarStream" - } - }, - "type": "object", - "required": ["stream"], - "title": "SourceStreamCreateResponse" - }, - "SourceStreamDeleteResponse": { - "properties": { - "stream_name": { - "type": "string", - "title": "Stream Name" - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "title": "Deleted At" - } - }, - "type": "object", - "required": ["stream_name", "deleted_at"], - "title": "SourceStreamDeleteResponse" - }, - "SourceStreamPatchRequest": { - "properties": { - "patch_ops": { - "items": { - "$ref": "#/components/schemas/PatchOp" - }, - "type": "array", - "title": "Patch Ops", - "description": "List of JSON Patch (RFC 6902) operations to apply to the stream." - } - }, - "type": "object", - "required": ["patch_ops"], - "title": "SourceStreamPatchRequest" - }, - "SourceStreamPatchResponse": { - "properties": { - "stream": { - "$ref": "#/components/schemas/SonarStream" - } - }, - "type": "object", - "required": ["stream"], - "title": "SourceStreamPatchResponse" - }, "SourceTemplateCatalogCreateRequest": { "properties": { "sonar_catalog": { @@ -18010,6 +19927,28 @@ "required": ["id", "name", "source_template", "source_config"], "title": "SourceUpdateResponse" }, + "StarburstCacheMetadataResponse": { + "properties": { + "backend": { + "type": "string", + "const": "starburst", + "title": "Backend", + "description": "Cache backend type", + "default": "starburst" + }, + "catalogs": { + "items": { + "$ref": "#/components/schemas/CacheCatalogMetadata" + }, + "type": "array", + "title": "Catalogs", + "description": "Available catalogs with their schemas and tables" + } + }, + "type": "object", + "required": ["catalogs"], + "title": "StarburstCacheMetadataResponse" + }, "StreamCustomization": { "properties": { "primary_key_fields": { @@ -18047,11 +19986,134 @@ "type": "object", "title": "StreamCustomization" }, + "StreamDescriptionCatalogContext": { + "properties": { + "stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stream" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "fields": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Fields" + } + }, + "type": "object", + "title": "StreamDescriptionCatalogContext" + }, + "StreamDescriptionIssueContext": { + "properties": { + "stream": { + "type": "string", + "title": "Stream" + } + }, + "type": "object", + "required": ["stream"], + "title": "StreamDescriptionIssueContext" + }, "StreamDescriptionsAction": { "type": "string", "enum": ["skip", "new_descriptions_only", "recreate_all_descriptions"], "title": "StreamDescriptionsAction" }, + "StreamDescriptor": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "namespace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Namespace" + } + }, + "type": "object", + "required": ["name"], + "title": "StreamDescriptor", + "description": "Stream descriptor for failure context." + }, + "StreamFieldDescriptionCatalogContext": { + "properties": { + "stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stream" + }, + "field": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Field" + }, + "field_description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Field Description" + } + }, + "type": "object", + "title": "StreamFieldDescriptionCatalogContext" + }, + "StreamFieldDescriptionIssueContext": { + "properties": { + "stream": { + "type": "string", + "title": "Stream" + }, + "field": { + "type": "string", + "title": "Field" + } + }, + "type": "object", + "required": ["stream", "field"], + "title": "StreamFieldDescriptionIssueContext" + }, "StreamSelectionMode": { "type": "string", "enum": ["all", "suggested", "whitelist"], @@ -18374,7 +20436,8 @@ "ThinkingEffort": { "type": "string", "enum": ["none", "low", "medium", "high"], - "title": "ThinkingEffort" + "title": "ThinkingEffort", + "description": "Thinking effort levels for LLM agents." }, "TokenRequest": { "properties": { @@ -18450,6 +20513,170 @@ "title": "ToolResponseEvent", "description": "Format of tool response events sent to the browser." }, + "UserHostedConnectionTemplateCreateRequest": { + "properties": { + "data_hosting_type": { + "type": "string", + "const": "user_hosted", + "title": "Data Hosting Type", + "description": "The hosting type for this connection template. 'user_hosted' means the user provides destination configuration.", + "default": "user_hosted" + }, + "destination_name": { + "type": "string", + "title": "Destination Name" + }, + "destination_definition_id": { + "type": "string", + "format": "uuid", + "title": "Destination Definition Id", + "description": "The id of the destination definition (type of destination connector) to use for the connection." + }, + "destination_config": { + "additionalProperties": true, + "type": "object", + "title": "Destination Config", + "description": "The configuration for the destination connector. Must match the destination definition." + }, + "cron_expression": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cron Expression", + "description": "A valid Quartz cron expression describing the schedule for the connection." + }, + "non_breaking_changes_preference": { + "$ref": "#/components/schemas/NonBreakingChangesPreference", + "description": "The action Airbyte should take when breaking changes are made to a source schema.", + "default": "ignore" + }, + "sync_on_create": { + "type": "boolean", + "title": "Sync On Create", + "description": "Whether to start a sync job when the connection is created.", + "default": true + } + }, + "type": "object", + "required": [ + "destination_name", + "destination_definition_id", + "destination_config" + ], + "title": "UserHostedConnectionTemplateCreateRequest", + "description": "Create request for user-hosted connection templates where the user provides destination configuration." + }, + "ValidationCatalogContext": { + "properties": { + "stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stream" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "fields": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Fields" + }, + "selected_fields": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Selected Fields" + }, + "cursor_fields": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Cursor Fields" + }, + "foreign_keys": { + "items": { + "$ref": "#/components/schemas/ForeignKey" + }, + "type": "array", + "title": "Foreign Keys" + } + }, + "type": "object", + "title": "ValidationCatalogContext" + }, + "ValidationIssueContext": { + "properties": { + "stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stream" + }, + "field": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Field" + }, + "referenced_stream": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Referenced Stream" + }, + "referenced_field": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Referenced Field" + } + }, + "type": "object", + "title": "ValidationIssueContext" + }, "WidgetTokenCreateRequest": { "properties": { "workspace_name": { @@ -18827,6 +21054,10 @@ "name": "Destinations Definitions", "description": "List and retrieve destination connector specifications." }, + { + "name": "Cache", + "description": "Execute queries against cache backends (Starburst, ClickHouse) to retrieve and analyze data." + }, { "name": "Sources Definitions", "description": "List and retrieve source connector specifications, manage source definition catalogs (streams, sync modes, cursor fields)." diff --git a/docusaurus/src/scripts/embedded-api/constants.js b/docusaurus/src/scripts/embedded-api/constants.js index c5d3b9e5bb1..db5f1f7b715 100644 --- a/docusaurus/src/scripts/embedded-api/constants.js +++ b/docusaurus/src/scripts/embedded-api/constants.js @@ -18,7 +18,7 @@ const SPEC_CACHE_PATH = path.join(PROJECT_ROOT, "src", "data", "embedded_api_spe const EMBEDDED_API_SPEC_URL = "https://airbyte-sonar-prod.s3.us-east-2.amazonaws.com/openapi/latest/app.json"; // API documentation output directory (relative to project root) -const API_DOCS_OUTPUT_DIR = "api-docs/embedded-api"; +const API_DOCS_OUTPUT_DIR = "../docs/ai-agents/embedded/api-reference"; // Sidebar file path for generated API docs const API_SIDEBAR_PATH = path.join(PROJECT_ROOT, API_DOCS_OUTPUT_DIR, "sidebar.ts"); diff --git a/docusaurus/src/scripts/embedded-api/sidebar-generator.ts b/docusaurus/src/scripts/embedded-api/sidebar-generator.ts new file mode 100644 index 00000000000..6373f933a26 --- /dev/null +++ b/docusaurus/src/scripts/embedded-api/sidebar-generator.ts @@ -0,0 +1,72 @@ +import { API_SIDEBAR_PATH, SPEC_CACHE_PATH } from "./constants"; +import * as fs from "fs"; + +const loadAllowedTags = (): string[] => { + if (fs.existsSync(SPEC_CACHE_PATH)) { + try { + const spec = JSON.parse(fs.readFileSync(SPEC_CACHE_PATH, "utf8")); + return spec.tags?.map((tag: any) => tag.name) || []; + } catch (e) { + console.warn("Could not load OpenAPI spec for tag filtering:", e); + } + } + return []; +}; + +export const loadSonarApiSidebar = (): any[] => { + const allowedTags = loadAllowedTags(); + + if (fs.existsSync(API_SIDEBAR_PATH)) { + try { + const sidebarModule = require(API_SIDEBAR_PATH); + // The sidebar.ts exports the array directly via: export default sidebar.apisidebar; + let apiSidebarItems = sidebarModule.default || sidebarModule || []; + + // Filter to only show tags that are defined in the spec + apiSidebarItems = apiSidebarItems.filter((item: any) => { + if (item.type !== "category") { + return true; + } + + return allowedTags.includes(item.label); + }); + + console.log(`Filtered API sidebar to ${apiSidebarItems.length} items`); + return apiSidebarItems; + } catch (e) { + console.warn("Could not load pre-generated API sidebar:", e); + return []; + } + } + return []; +}; + +// Helper function to find and replace the "api-reference" category +export const replaceApiReferenceCategory = ( + items: any[], + sonarApiItems: any[], +): any[] => { + return items.map((item) => { + if ( + item.type === "category" && + item.label === "api-reference" && + item.items !== undefined + ) { + // Replace the api-reference category items with the filtered autogenerated API sidebar + return { + ...item, + label: "Sonar API Reference", + items: sonarApiItems, + }; + } + + if (item.items) { + return { + ...item, + items: replaceApiReferenceCategory(item.items, sonarApiItems), + }; + } + + return item; + }); +}; diff --git a/docusaurus/vercel.json b/docusaurus/vercel.json index aeeacc39c58..c42a093bd95 100644 --- a/docusaurus/vercel.json +++ b/docusaurus/vercel.json @@ -595,6 +595,16 @@ "source": "/platform/developer-guides/licenses/:path*", "destination": "/community/licenses/:path*", "statusCode": 301 + }, + { + "source": "/embedded-api/sonar", + "destination": "/ai-agents/embedded/api-reference/sonar", + "statusCode": 301 + }, + { + "source": "/embedded-api/:path*", + "destination": "/ai-agents/embedded/api-reference/:path*", + "statusCode": 301 } ] }