{ "openapi": "3.1.0", "info": { "title": "Corpus Service", "version": "v1" }, "paths": { "/api/v1/health/": { "get": { "tags": [ "health" ], "summary": "Health Check", "operationId": "health_check_api_v1_health__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/health/db": { "get": { "tags": [ "health" ], "summary": "Db Check", "operationId": "db_check_api_v1_health_db_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/webhooks/stripe": { "post": { "tags": [ "webhooks" ], "summary": "Stripe Webhook", "description": "Receive webhook events from Stripe payment platform.\n\nNo authentication required - webhook signature validated internally.", "operationId": "stripe_webhook_api_v1_webhooks_stripe_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Response Stripe Webhook Api V1 Webhooks Stripe Post" } } } } } } }, "/api/v1/billing/plans": { "get": { "tags": [ "billing" ], "summary": "Get Plans", "description": "Get all available subscription plans.\n\nReturns pricing, limits, and features for each tier.\nPrices are fetched from Stripe and cached for 1 hour.\nThis endpoint is public (no auth required) for pricing pages.", "operationId": "get_plans_api_v1_billing_plans_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlansResponse" } } } } } } }, "/api/v1/auth/protected": { "get": { "tags": [ "protected" ], "summary": "Protected Route", "description": "Example protected route that requires authentication.", "operationId": "protected_route_api_v1_auth_protected_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProtectedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/profile": { "get": { "tags": [ "protected" ], "summary": "Get Profile", "description": "Get current user profile.", "operationId": "get_profile_api_v1_auth_profile_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workspaces/": { "post": { "tags": [ "workspaces" ], "summary": "Create Workspace", "description": "Create a new workspace.", "operationId": "create_workspace_api_v1_workspaces__post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "workspaces" ], "summary": "Get Workspaces", "description": "Get all workspaces.", "operationId": "get_workspaces_api_v1_workspaces__get", "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceResponse" }, "title": "Response Get Workspaces Api V1 Workspaces Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workspaces/{workspaceId}": { "get": { "tags": [ "workspaces" ], "summary": "Get Workspace", "description": "Get a workspace by ID.", "operationId": "get_workspace_api_v1_workspaces__workspaceId__get", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workspaceid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "workspaces" ], "summary": "Update Workspace", "description": "Update a workspace.", "operationId": "update_workspace_api_v1_workspaces__workspaceId__put", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workspaceid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "workspaces" ], "summary": "Delete Workspace", "description": "Soft delete a workspace.", "operationId": "delete_workspace_api_v1_workspaces__workspaceId__delete", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workspaceid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/supported-extensions": { "get": { "tags": [ "documents" ], "summary": "Get Supported File Extensions", "description": "Get all supported file extensions for document uploads.", "operationId": "get_supported_file_extensions_api_v1_documents_supported_extensions_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SupportedExtensionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/": { "get": { "tags": [ "documents" ], "summary": "List Documents", "description": "List all documents with optional filters and pagination.", "operationId": "list_documents_api_v1_documents__get", "parameters": [ { "name": "contentType", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by content type", "title": "Contenttype" }, "description": "Filter by content type" }, { "name": "extractionStatus", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by extraction status", "title": "Extractionstatus" }, "description": "Filter by extraction status" }, { "name": "createdAfter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by created after (ISO format)", "title": "Createdafter" }, "description": "Filter by created after (ISO format)" }, { "name": "createdBefore", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by created before (ISO format)", "title": "Createdbefore" }, "description": "Filter by created before (ISO format)" }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of documents to skip", "default": 0, "title": "Skip" }, "description": "Number of documents to skip" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "description": "Maximum number of documents to return", "default": 100, "title": "Limit" }, "description": "Maximum number of documents to return" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "documents" ], "summary": "Upload Standalone Document", "description": "Upload a document without associating it with any matrix.", "operationId": "upload_standalone_document_api_v1_documents__post", "parameters": [ { "name": "useAgenticChunking", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Whether to use AI-powered chunking", "default": false, "title": "Useagenticchunking" }, "description": "Whether to use AI-powered chunking" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_standalone_document_api_v1_documents__post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/search": { "get": { "tags": [ "documents" ], "summary": "Search Documents", "description": "Search documents with optional query and filters.", "operationId": "search_documents_api_v1_documents_search_get", "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Search query to match against document filename", "title": "Q" }, "description": "Search query to match against document filename" }, { "name": "contentType", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by content type", "title": "Contenttype" }, "description": "Filter by content type" }, { "name": "extractionStatus", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by extraction status", "title": "Extractionstatus" }, "description": "Filter by extraction status" }, { "name": "createdAfter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by created after (ISO format)", "title": "Createdafter" }, "description": "Filter by created after (ISO format)" }, { "name": "createdBefore", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by created before (ISO format)", "title": "Createdbefore" }, "description": "Filter by created before (ISO format)" }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of documents to skip", "default": 0, "title": "Skip" }, "description": "Number of documents to skip" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "description": "Maximum number of documents to return", "default": 100, "title": "Limit" }, "description": "Maximum number of documents to return" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/search/hybrid": { "get": { "tags": [ "documents" ], "summary": "Hybrid Search Documents", "description": "Hybrid document search combining filename, BM25 content, and semantic vector search.", "operationId": "hybrid_search_documents_api_v1_documents_search_hybrid_get", "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "type": "string", "description": "Search query (filename + content + semantic)", "title": "Q" }, "description": "Search query (filename + content + semantic)" }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip", "default": 0, "title": "Skip" }, "description": "Number of results to skip" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum results to return", "default": 20, "title": "Limit" }, "description": "Maximum results to return" }, { "name": "snippetsPerDoc", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 10, "minimum": 1, "description": "Max snippets per document", "default": 3, "title": "Snippetsperdoc" }, "description": "Max snippets per document" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HybridDocumentSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/documents/": { "post": { "tags": [ "documents" ], "summary": "Upload Document", "operationId": "upload_document_api_v1_matrices__matrixId__documents__post", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "entitySetId", "in": "query", "required": true, "schema": { "type": "integer", "description": "Entity set ID to add document to", "title": "Entitysetid" }, "description": "Entity set ID to add document to" }, { "name": "useAgenticChunking", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Whether to use AI-powered chunking", "default": false, "title": "Useagenticchunking" }, "description": "Whether to use AI-powered chunking" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_document_api_v1_matrices__matrixId__documents__post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "documents", "workflow-agent" ], "summary": "Get Documents By Matrix", "description": "Get all documents for a specific matrix through entity set membership.", "operationId": "get_documents_by_matrix", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MatrixDocumentResponse" }, "title": "Response Get Documents By Matrix" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/documents/from-urls/": { "post": { "tags": [ "documents" ], "summary": "Upload Documents From Urls", "description": "Upload multiple documents from URLs to a matrix.", "operationId": "upload_documents_from_urls_api_v1_matrices__matrixId__documents_from_urls__post", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "entitySetId", "in": "query", "required": true, "schema": { "type": "integer", "description": "Entity set ID to add documents to", "title": "Entitysetid" }, "description": "Entity set ID to add documents to" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkUrlUploadRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkUrlUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/{documentId}": { "get": { "tags": [ "documents", "workflow-agent" ], "summary": "Get Document", "operationId": "get_document", "parameters": [ { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "documents" ], "summary": "Delete Document", "operationId": "delete_document_api_v1_documents__documentId__delete", "parameters": [ { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/{documentId}/content": { "get": { "tags": [ "documents" ], "summary": "Get Document Content", "description": "Get extracted content for a document (for chunking agent).", "operationId": "get_document_content_api_v1_documents__documentId__content_get", "parameters": [ { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/documents/{documentId}": { "delete": { "tags": [ "documents" ], "summary": "Remove Document From Matrix", "description": "Remove a document from a specific matrix (removes from entity set).", "operationId": "remove_document_from_matrix_api_v1_matrices__matrixId__documents__documentId__delete", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/documents/{documentId}/associate": { "post": { "tags": [ "documents" ], "summary": "Associate Existing Document With Matrix", "description": "Associate an existing document with a matrix by adding it to a specific entity set.", "operationId": "associate_existing_document_with_matrix_api_v1_matrices__matrixId__documents__documentId__associate_post", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "entitySetId", "in": "query", "required": true, "schema": { "type": "integer", "description": "Target entity set ID to add the document to.", "title": "Entitysetid" }, "description": "Target entity set ID to add the document to." }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentLabelUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/{documentId}/highlighted/{matrixCellId}": { "get": { "tags": [ "documents" ], "summary": "Get Highlighted Document For Cell", "description": "Get a document with citations from a matrix cell highlighted.", "operationId": "get_highlighted_document_for_cell_api_v1_documents__documentId__highlighted__matrixCellId__get", "parameters": [ { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "matrixCellId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixcellid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/questions/": { "post": { "tags": [ "questions" ], "summary": "Create Question", "operationId": "create_question_api_v1_matrices__matrixId__questions__post", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "entitySetId", "in": "query", "required": true, "schema": { "type": "integer", "description": "Question entity set ID to add question to", "title": "Entitysetid" }, "description": "Question entity set ID to add question to" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "questions", "workflow-agent" ], "summary": "Get Questions By Matrix", "description": "Get all questions for a specific matrix.", "operationId": "get_questions_by_matrix", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/QuestionResponse" }, "title": "Response Get Questions By Matrix" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/questions/{questionId}": { "get": { "tags": [ "questions", "workflow-agent" ], "summary": "Get Question", "operationId": "get_question", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "questions" ], "summary": "Update Question", "operationId": "update_question_api_v1_questions__questionId__patch", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "questions" ], "summary": "Delete Question", "operationId": "delete_question_api_v1_questions__questionId__delete", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/questions/{questionId}/label": { "patch": { "tags": [ "questions" ], "summary": "Update Question Label", "description": "Update only the label of a question. This operation does not trigger reprocessing.", "operationId": "update_question_label_api_v1_questions__questionId__label_patch", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionLabelUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/questions-with-options/": { "post": { "tags": [ "questions" ], "summary": "Create Question With Options", "description": "Create a question with options transactionally (for SINGLE_SELECT questions).", "operationId": "create_question_with_options_api_v1_matrices__matrixId__questions_with_options__post", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "entitySetId", "in": "query", "required": true, "schema": { "type": "integer", "description": "Question entity set ID to add question to", "title": "Entitysetid" }, "description": "Question entity set ID to add question to" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionWithOptionsCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/questions/{questionId}": { "patch": { "tags": [ "questions" ], "summary": "Update Question With Options", "description": "Update a question with options and automatically reprocess affected cells.", "operationId": "update_question_with_options_api_v1_matrices__matrixId__questions__questionId__patch", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionWithOptionsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/questions/{questionId}/option-sets/": { "post": { "tags": [ "questions" ], "summary": "Create Question Option Set", "description": "Create an option set for a question.", "operationId": "create_question_option_set_api_v1_questions__questionId__option_sets__post", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionOptionSetCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionOptionSetResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "questions" ], "summary": "Get Question Option Set", "description": "Get option set for a question.", "operationId": "get_question_option_set_api_v1_questions__questionId__option_sets__get", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionOptionSetResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "questions" ], "summary": "Update Question Option Set", "description": "Update option set for a question.", "operationId": "update_question_option_set_api_v1_questions__questionId__option_sets__put", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionOptionSetUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionOptionSetResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "questions" ], "summary": "Delete Question Option Set", "description": "Delete option set for a question.", "operationId": "delete_question_option_set_api_v1_questions__questionId__option_sets__delete", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/questions/{questionId}/options/": { "post": { "tags": [ "questions" ], "summary": "Add Option To Question", "description": "Add a single option to a question's option set.", "operationId": "add_option_to_question_api_v1_questions__questionId__options__post", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionOptionCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionOptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "questions" ], "summary": "Get Question Options", "description": "Get all options for a question.", "operationId": "get_question_options_api_v1_questions__questionId__options__get", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/QuestionOptionResponse" }, "title": "Response Get Question Options Api V1 Questions Questionid Options Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/questions/{questionId}/template-validation": { "get": { "tags": [ "questions" ], "summary": "Validate Question Template Variables", "description": "Validate template variables for a question.", "operationId": "validate_question_template_variables_api_v1_questions__questionId__template_validation_get", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateValidationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/questions/{questionId}/duplicate": { "post": { "tags": [ "questions" ], "summary": "Duplicate Question", "description": "Duplicate a question within the same matrix, including its options.", "operationId": "duplicate_question_api_v1_questions__questionId__duplicate_post", "parameters": [ { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/question-types/": { "get": { "tags": [ "question-types", "workflow_agent" ], "summary": "Get Question Types", "description": "Get all available question types.", "operationId": "get_question_types", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/QuestionTypeResponse" }, "title": "Response Get Question Types" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/question-types/{questionTypeId}": { "get": { "tags": [ "question-types" ], "summary": "Get Question Type", "description": "Get a specific question type by ID.", "operationId": "get_question_type_api_v1_question_types__questionTypeId__get", "parameters": [ { "name": "questionTypeId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questiontypeid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuestionTypeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/": { "post": { "tags": [ "matrices" ], "summary": "Create Matrix", "operationId": "create_matrix_api_v1_matrices__post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "matrices" ], "summary": "List Matrices", "operationId": "list_matrices_api_v1_matrices__get", "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MatrixListResponse" }, "title": "Response List Matrices Api V1 Matrices Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workspaces/{workspaceId}/matrices/": { "get": { "tags": [ "matrices", "workflow-agent" ], "summary": "Get Matrices By Workspace", "description": "Get all matrices for a specific workspace.", "operationId": "get_matrices_by_workspace", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workspaceid" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MatrixListResponse" }, "title": "Response Get Matrices By Workspace" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}": { "get": { "tags": [ "matrices", "workflow-agent" ], "summary": "Get Matrix", "operationId": "get_matrix", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "matrices" ], "summary": "Update Matrix", "operationId": "update_matrix_api_v1_matrices__matrixId__patch", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "matrices" ], "summary": "Delete Matrix", "operationId": "delete_matrix_api_v1_matrices__matrixId__delete", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/entity-sets": { "get": { "tags": [ "matrices", "workflow-agent" ], "summary": "Get Matrix Entity Sets", "description": "Get all entity sets for a matrix with their members.\n\nThis endpoint provides complete entity set information needed by the frontend to:\n1. Determine matrix dimensionality\n2. Construct entity_set_filters for tile batch queries\n3. Map entity IDs (document/question IDs) to entity set member IDs", "operationId": "get_matrix_entity_sets", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixEntitySetsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/stats": { "get": { "tags": [ "matrices" ], "summary": "Get Matrix Stats", "description": "Get cell statistics for a matrix (count by status).", "operationId": "get_matrix_stats_api_v1_matrices__matrixId__stats_get", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixStatsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrix-cells/{cellId}": { "get": { "tags": [ "matrices" ], "summary": "Get Matrix Cell", "operationId": "get_matrix_cell_api_v1_matrix_cells__cellId__get", "parameters": [ { "name": "cellId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Cellid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixCellResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "matrices" ], "summary": "Update Matrix Cell", "operationId": "update_matrix_cell_api_v1_matrix_cells__cellId__patch", "parameters": [ { "name": "cellId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Cellid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixCellUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixCellResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/cells": { "get": { "tags": [ "matrices" ], "summary": "Get Matrix Cells", "description": "Get matrix cells with optional filtering by document_id or question_id.", "operationId": "get_matrix_cells_api_v1_matrices__matrixId__cells_get", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "documentId", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Documentid" } }, { "name": "questionId", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MatrixCellResponse" }, "title": "Response Get Matrix Cells Api V1 Matrices Matrixid Cells Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrix-cells/{cellId}/answers/current": { "get": { "tags": [ "matrices" ], "summary": "Get Current Matrix Cell Answer", "description": "Get the current answer for a matrix cell.", "operationId": "get_current_matrix_cell_answer_api_v1_matrix_cells__cellId__answers_current_get", "parameters": [ { "name": "cellId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Cellid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/MatrixCellAnswerResponse" }, { "type": "null" } ], "title": "Response Get Current Matrix Cell Answer Api V1 Matrix Cells Cellid Answers Current Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/entity-sets/{entitySetId}/documents/{documentId}/cells/with-answers": { "get": { "tags": [ "matrices", "workflow-agent" ], "summary": "Get Matrix Cells With Current Answers By Document", "description": "Get all matrix cells with their current answers for a specific document (entity-ref based).", "operationId": "get_matrix_cells_by_document", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "entitySetId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Entitysetid" } }, { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MatrixCellWithAnswerResponse" }, "title": "Response Get Matrix Cells By Document" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/entity-sets/{entitySetId}/questions/{questionId}/cells/with-answers": { "get": { "tags": [ "matrices", "workflow-agent" ], "summary": "Get Matrix Cells With Current Answers By Question", "description": "Get all matrix cells with their current answers for a specific question (entity-ref based).", "operationId": "get_matrix_cells_by_question", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "entitySetId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Entitysetid" } }, { "name": "questionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Questionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MatrixCellWithAnswerResponse" }, "title": "Response Get Matrix Cells By Question" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/cells/batch": { "post": { "tags": [ "matrices", "workflow-agent" ], "summary": "Get Matrix Cells Batch", "description": "Batch fetch matrix cells using entity_set_filters (entity-ref based).\n\nFrontend provides entity_set_filters to specify which entities to fetch cells for.\nFinds all cells that reference any of the specified entities (role-agnostic).\n\nExample: POST /matrices/1/cells/batch\nBody: {\n \"entitySetFilters\": [\n {\"entitySetId\": 1, \"entityIds\": [10, 11, 12]},\n {\"entitySetId\": 2, \"entityIds\": [20, 21, 22]}\n ]\n}\nReturns all cells that reference any of those entities in any role.", "operationId": "get_matrix_cells_batch", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixCellsBatchRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MatrixCellWithAnswerResponse" }, "title": "Response Get Matrix Cells Batch" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/reprocess": { "post": { "tags": [ "matrices" ], "summary": "Reprocess Matrix Cells", "description": "Reprocess matrix cells based on the specified criteria.", "operationId": "reprocess_matrix_cells_api_v1_matrices__matrixId__reprocess_post", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixReprocessRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixCellReprocessResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/soft-delete": { "post": { "tags": [ "matrices" ], "summary": "Soft Delete Matrix Entities", "description": "Soft delete matrix entities (documents, questions, or matrices) and their related cells.", "operationId": "soft_delete_matrix_entities_api_v1_matrices__matrixId__soft_delete_post", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixSoftDeleteRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixSoftDeleteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/duplicate": { "post": { "tags": [ "matrices" ], "summary": "Duplicate Matrix", "description": "Duplicate a matrix with specified duplication type (documents only, questions only, or full matrix).", "operationId": "duplicate_matrix_api_v1_matrices__matrixId__duplicate_post", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixDuplicateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixDuplicateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/template-variables": { "get": { "tags": [ "matrices" ], "summary": "Get Matrix Template Variables", "description": "Get template variables for a matrix (used for duplication form).", "operationId": "get_matrix_template_variables_api_v1_matrices__matrixId__template_variables_get", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MatrixTemplateVariableResponse" }, "title": "Response Get Matrix Template Variables Api V1 Matrices Matrixid Template Variables Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/structure": { "get": { "tags": [ "matrices", "workflow-agent" ], "summary": "Get Matrix Structure", "description": "Get matrix structure metadata for understanding cell data.\n\nProvides information about:\n- Matrix type and dimensionality\n- Entity sets (what entities are on each axis)\n- Entity roles (DOCUMENT, LEFT, RIGHT, QUESTION)\n- System placeholders (@{{LEFT}}, @{{RIGHT}})\n- Cell structure (what data each cell contains)\n\nThis helps workflow agents understand how to interpret matrix data\nwhen generating documents from cell data.", "operationId": "get_matrix_structure", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixStructureResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/entity-sets/{entitySetId}/members/{memberId}/label": { "patch": { "tags": [ "entity-sets" ], "summary": "Update Entity Set Member Label", "description": "Update the label of an entity set member.\n\nLabels are per-matrix context - the same entity (document/question) can have\ndifferent labels in different entity sets/matrices.", "operationId": "update_entity_set_member_label_api_v1_entity_sets__entitySetId__members__memberId__label_patch", "parameters": [ { "name": "entitySetId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Entitysetid" } }, { "name": "memberId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Memberid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EntitySetMemberLabelUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EntitySetMemberResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/template-variables/": { "post": { "tags": [ "matrix-template-variables" ], "summary": "Create Template Variable", "description": "Create a new template variable for a matrix.", "operationId": "create_template_variable_api_v1_matrices__matrixId__template_variables__post", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixTemplateVariableCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixTemplateVariableResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "matrix-template-variables", "workflow-agent" ], "summary": "Get Matrix Template Variables", "description": "Get all template variables for a matrix.", "operationId": "get_template_variables", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MatrixTemplateVariableResponse" }, "title": "Response Get Template Variables" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/matrices/{matrixId}/template-variables/with-usage": { "get": { "tags": [ "matrix-template-variables" ], "summary": "Get Template Variables With Usage", "description": "Get template variables with usage count for a matrix.", "operationId": "get_template_variables_with_usage_api_v1_matrices__matrixId__template_variables_with_usage_get", "parameters": [ { "name": "matrixId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Matrixid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TemplateVariableUsageResponse" }, "title": "Response Get Template Variables With Usage Api V1 Matrices Matrixid Template Variables With Usage Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/template-variables/{variableId}": { "get": { "tags": [ "matrix-template-variables" ], "summary": "Get Template Variable", "description": "Get a specific template variable by ID.", "operationId": "get_template_variable_api_v1_template_variables__variableId__get", "parameters": [ { "name": "variableId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Variableid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixTemplateVariableResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "matrix-template-variables" ], "summary": "Update Template Variable", "description": "Update a template variable and reprocess affected questions.", "operationId": "update_template_variable_api_v1_template_variables__variableId__patch", "parameters": [ { "name": "variableId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Variableid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixTemplateVariableUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatrixTemplateVariableResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "matrix-template-variables" ], "summary": "Delete Template Variable", "description": "Delete a template variable (only if not in use).", "operationId": "delete_template_variable_api_v1_template_variables__variableId__delete", "parameters": [ { "name": "variableId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Variableid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/template-variables/{variableId}/affected-questions": { "get": { "tags": [ "matrix-template-variables" ], "summary": "Get Affected Questions", "description": "Get list of question IDs that would be affected by changes to this template variable.", "operationId": "get_affected_questions_api_v1_template_variables__variableId__affected_questions_get", "parameters": [ { "name": "variableId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Variableid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "integer" }, "title": "Response Get Affected Questions Api V1 Template Variables Variableid Affected Questions Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/queue/process-pending": { "post": { "tags": [ "qa" ], "summary": "Queue Pending Cells", "description": "Queue matrix cells in PENDING state for processing.\n\nIf matrix_id is provided in the request, only queues cells for that specific matrix.\nOtherwise, queues all pending cells across all matrices.", "operationId": "queue_pending_cells_api_v1_queue_process_pending_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueuePendingCellsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueuePendingCellsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/qa-jobs/{qaJobId}/answer": { "post": { "tags": [ "qa" ], "summary": "Upload Agent Qa Answer", "description": "Upload answer from agent QA container.\n\nThis endpoint is called by agent QA containers running in K8s jobs.\nThe agent POSTs its answer directly after processing completes.", "operationId": "upload_agent_qa_answer_api_v1_qa_jobs__qaJobId__answer_post", "parameters": [ { "name": "qaJobId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Qajobid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentQAAnswerSetRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentQAAnswerUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/extraction/queue-pending": { "post": { "tags": [ "document-extraction" ], "summary": "Queue Pending Documents", "description": "Queue all pending documents for extraction processing.", "operationId": "queue_pending_documents_api_v1_extraction_queue_pending_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "integer" }, "title": "Response Queue Pending Documents Api V1 Extraction Queue Pending Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/extraction/retry-failed": { "post": { "tags": [ "document-extraction" ], "summary": "Retry Failed Extractions", "description": "Retry failed extraction jobs by restarting Temporal workflows.", "operationId": "retry_failed_extractions_api_v1_extraction_retry_failed_post", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 100, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "integer" }, "title": "Response Retry Failed Extractions Api V1 Extraction Retry Failed Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/extraction/jobs/{jobId}": { "get": { "tags": [ "document-extraction" ], "summary": "Get Extraction Job", "description": "Get extraction job details.", "operationId": "get_extraction_job_api_v1_extraction_jobs__jobId__get", "parameters": [ { "name": "jobId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Jobid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/{documentId}/extraction-status": { "get": { "tags": [ "document-extraction" ], "summary": "Get Document Extraction Status", "description": "Get extraction status for a document.", "operationId": "get_document_extraction_status_api_v1_documents__documentId__extraction_status_get", "parameters": [ { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/{documentId}/chunks": { "get": { "tags": [ "chunks", "workflow-agent" ], "summary": "List Document Chunks", "description": "Get chunk metadata for a document (without content).\n\nReturns a list of all chunk IDs and metadata for the document,\nallowing agents to discover available chunks before reading specific ones.", "operationId": "list_document_chunks", "parameters": [ { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChunkListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "chunks" ], "summary": "Upload Document Chunks", "description": "Upload chunks from chunking agent container.\n\nThis endpoint is called by chunking agent containers running in K8s jobs.\nThe agent POSTs chunks after processing completes.", "operationId": "upload_document_chunks_api_v1_documents__documentId__chunks_post", "parameters": [ { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChunksUploadRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChunksUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/{documentId}/chunks/{chunkId}": { "get": { "tags": [ "chunks", "workflow-agent" ], "summary": "Read Document Chunk", "description": "Read the full content of a specific chunk.\n\nAgents should use list_document_chunks first to discover available chunks,\nthen read specific chunks as needed for answering questions.", "operationId": "read_document_chunk", "parameters": [ { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "chunkId", "in": "path", "required": true, "schema": { "type": "string", "title": "Chunkid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChunkResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/documents/{documentId}/chunks/search": { "get": { "tags": [ "chunks", "workflow-agent" ], "summary": "Search Document Chunks", "description": "Search chunks by metadata filters (section, page, etc.).\n\nUseful for agents to narrow down relevant chunks before reading content.", "operationId": "search_document_chunks", "parameters": [ { "name": "documentId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Documentid" } }, { "name": "section", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by section title", "title": "Section" }, "description": "Filter by section title" }, { "name": "page", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Filter by page number", "title": "Page" }, "description": "Filter by page number" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChunkListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/chunks/search": { "get": { "tags": [ "chunks", "workflow-agent" ], "summary": "Hybrid Search Chunks", "description": "Hybrid search across chunks using BM25 + vector search.\n\nCombines keyword matching (BM25) with semantic similarity (vector embeddings)\nusing Reciprocal Rank Fusion to rank results. Searches across all documents\nthe user has access to within their company.\n\nReturns chunks with relevance scores, ordered by combined ranking.", "operationId": "hybrid_search_chunks", "parameters": [ { "name": "query", "in": "query", "required": true, "schema": { "type": "string", "description": "Search query text", "title": "Query" }, "description": "Search query text" }, { "name": "document_ids", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "Filter by document IDs", "title": "Document Ids" }, "description": "Filter by document IDs" }, { "name": "matrix_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Filter by matrix ID", "title": "Matrix Id" }, "description": "Filter by matrix ID" }, { "name": "entity_set_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Filter by entity set ID", "title": "Entity Set Id" }, "description": "Filter by entity set ID" }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip", "default": 0, "title": "Skip" }, "description": "Number of results to skip" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum results to return", "default": 10, "title": "Limit" }, "description": "Maximum results to return" }, { "name": "use_vector", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Enable vector search (default: true)", "default": true, "title": "Use Vector" }, "description": "Enable vector search (default: true)" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChunkSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/providers/": { "get": { "tags": [ "ai-models-admin" ], "summary": "Get Ai Providers", "description": "Get all AI providers, optionally filtered to enabled only.", "operationId": "get_ai_providers_api_v1_admin_providers__get", "parameters": [ { "name": "enabled_only", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Enabled Only" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AIProviderResponse" }, "title": "Response Get Ai Providers Api V1 Admin Providers Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/providers/{providerId}": { "get": { "tags": [ "ai-models-admin" ], "summary": "Get Ai Provider", "description": "Get an AI provider by ID.", "operationId": "get_ai_provider_api_v1_admin_providers__providerId__get", "parameters": [ { "name": "providerId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Providerid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIProviderResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/models/": { "get": { "tags": [ "ai-models-admin" ], "summary": "Get Ai Models", "description": "Get all AI models, optionally filtered by enabled status.", "operationId": "get_ai_models_api_v1_admin_models__get", "parameters": [ { "name": "enabledOnly", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Enabledonly" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AIModelResponse" }, "title": "Response Get Ai Models Api V1 Admin Models Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/providers/{providerId}/models/": { "get": { "tags": [ "ai-models-admin" ], "summary": "Get Models By Provider", "description": "Get AI models for a specific provider, optionally filtered by enabled status.", "operationId": "get_models_by_provider_api_v1_admin_providers__providerId__models__get", "parameters": [ { "name": "providerId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Providerid" } }, { "name": "enabledOnly", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Enabledonly" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AIModelResponse" }, "title": "Response Get Models By Provider Api V1 Admin Providers Providerid Models Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/models/{modelId}": { "get": { "tags": [ "ai-models-admin" ], "summary": "Get Ai Model", "description": "Get an AI model by ID with provider information.", "operationId": "get_ai_model_api_v1_admin_models__modelId__get", "parameters": [ { "name": "modelId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Modelid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIModelResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/ai/providers": { "get": { "tags": [ "ai-selection" ], "summary": "Get Available Providers", "description": "Get all enabled AI providers for frontend selection menus.", "operationId": "get_available_providers_api_v1_ai_providers_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AIProviderResponse" }, "title": "Response Get Available Providers Api V1 Ai Providers Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/ai/models": { "get": { "tags": [ "ai-selection" ], "summary": "Get Available Models", "description": "Get all enabled AI models with provider info for frontend selection menus.", "operationId": "get_available_models_api_v1_ai_models_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AIModelResponse" }, "title": "Response Get Available Models Api V1 Ai Models Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/ai/providers/{providerId}/models": { "get": { "tags": [ "ai-selection" ], "summary": "Get Models For Provider", "description": "Get all enabled AI models for a specific provider for frontend selection menus.", "operationId": "get_models_for_provider_api_v1_ai_providers__providerId__models_get", "parameters": [ { "name": "providerId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Providerid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AIModelResponse" }, "title": "Response Get Models For Provider Api V1 Ai Providers Providerid Models Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows": { "post": { "tags": [ "workflows" ], "summary": "Create Workflow", "description": "Create a new workflow.", "operationId": "create_workflow_api_v1_workflows_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workspaces/{workspaceId}/workflows": { "get": { "tags": [ "workflows" ], "summary": "List Workflows", "description": "List all workflows for a workspace.", "operationId": "list_workflows_api_v1_workspaces__workspaceId__workflows_get", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workspaceid" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowResponse" }, "title": "Response List Workflows Api V1 Workspaces Workspaceid Workflows Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}": { "get": { "tags": [ "workflows" ], "summary": "Get Workflow", "description": "Get a workflow by ID.", "operationId": "get_workflow_api_v1_workflows__workflowId__get", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "workflows" ], "summary": "Update Workflow", "description": "Update a workflow.", "operationId": "update_workflow_api_v1_workflows__workflowId__patch", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "workflows" ], "summary": "Delete Workflow", "description": "Delete a workflow (soft delete).", "operationId": "delete_workflow_api_v1_workflows__workflowId__delete", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/execute": { "post": { "tags": [ "workflows" ], "summary": "Execute Workflow", "description": "Execute a workflow.\n\nCreates an execution record and starts a Temporal workflow that will:\n1. Create a service account\n2. Launch a gVisor-sandboxed K8s pod with Claude Agent\n3. Monitor execution\n4. Extract generated files\n5. Clean up resources", "operationId": "execute_workflow_api_v1_workflows__workflowId__execute_post", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecutionTriggerRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecutionStartedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/executions": { "get": { "tags": [ "workflows" ], "summary": "List Executions", "description": "List all executions for a workflow.", "operationId": "list_executions_api_v1_workflows__workflowId__executions_get", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExecutionResponse" }, "title": "Response List Executions Api V1 Workflows Workflowid Executions Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/executions/{executionId}": { "get": { "tags": [ "workflows" ], "summary": "Get Execution", "description": "Get workflow execution status and results.", "operationId": "get_execution_api_v1_workflows__workflowId__executions__executionId__get", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "executionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Executionid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecutionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/executions/{executionId}/files": { "get": { "tags": [ "workflows" ], "summary": "List Execution Files", "description": "List files generated by an execution.", "operationId": "list_execution_files_api_v1_workflows__workflowId__executions__executionId__files_get", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "executionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Executionid" } }, { "name": "file_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Type" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExecutionFileResponse" }, "title": "Response List Execution Files Api V1 Workflows Workflowid Executions Executionid Files Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "execution-uploads" ], "summary": "Upload Execution File", "description": "Upload an execution output file directly to storage.\n\nCalled by workflow agent to upload files after completion.", "operationId": "upload_execution_file_api_v1_workflows__workflowId__executions__executionId__files_post", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "executionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Executionid" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_execution_file_api_v1_workflows__workflowId__executions__executionId__files_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadFileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/executions/{executionId}/files/{fileId}/download": { "get": { "tags": [ "workflows" ], "summary": "Download Execution File", "description": "Download an execution file.", "operationId": "download_execution_file_api_v1_workflows__workflowId__executions__executionId__files__fileId__download_get", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "executionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Executionid" } }, { "name": "fileId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Fileid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/input-files": { "post": { "tags": [ "workflows" ], "summary": "Upload Input File", "description": "Upload an input file (template, data file) for a workflow.", "operationId": "upload_input_file_api_v1_workflows__workflowId__input_files_post", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_input_file_api_v1_workflows__workflowId__input_files_post" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InputFileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "workflows" ], "summary": "List Input Files", "description": "List all input files for a workflow.", "operationId": "list_input_files_api_v1_workflows__workflowId__input_files_get", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InputFileResponse" }, "title": "Response List Input Files Api V1 Workflows Workflowid Input Files Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/input-files/{fileId}/download": { "get": { "tags": [ "workflows" ], "summary": "Download Input File", "description": "Download an input file.", "operationId": "download_input_file_api_v1_workflows__workflowId__input_files__fileId__download_get", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "fileId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Fileid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/input-files/{fileId}": { "delete": { "tags": [ "workflows" ], "summary": "Delete Input File", "description": "Delete an input file.", "operationId": "delete_input_file_api_v1_workflows__workflowId__input_files__fileId__delete", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "fileId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Fileid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/executions/{executionId}/upload-urls": { "post": { "tags": [ "execution-uploads" ], "summary": "Generate Upload Urls", "description": "Generate presigned upload URLs for execution output files.\n\nCalled by workflow agent after completing to get URLs for uploading files + manifest.", "operationId": "generate_upload_urls_api_v1_workflows__workflowId__executions__executionId__upload_urls_post", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "executionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Executionid" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateUploadUrlsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateUploadUrlsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/workflows/{workflowId}/executions/{executionId}/manifest": { "post": { "tags": [ "execution-uploads" ], "summary": "Upload Execution Manifest", "description": "Upload execution manifest JSON to storage.\n\nCalled by workflow agent after uploading all files.", "operationId": "upload_execution_manifest_api_v1_workflows__workflowId__executions__executionId__manifest_post", "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Workflowid" } }, { "name": "executionId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Executionid" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadManifestRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadManifestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/agents/conversations/": { "post": { "tags": [ "agents" ], "summary": "Create Conversation", "description": "Create a new conversation.", "operationId": "create_conversation_api_v1_agents_conversations__post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "agents" ], "summary": "Get Active Conversations", "description": "Get all active conversations.", "operationId": "get_active_conversations_api_v1_agents_conversations__get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationResponse" }, "title": "Response Get Active Conversations Api V1 Agents Conversations Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/agents/conversations/{conversationId}": { "get": { "tags": [ "agents" ], "summary": "Get Conversation", "description": "Get a conversation by ID.", "operationId": "get_conversation_api_v1_agents_conversations__conversationId__get", "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Conversationid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "agents" ], "summary": "Update Conversation", "description": "Update a conversation.", "operationId": "update_conversation_api_v1_agents_conversations__conversationId__patch", "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Conversationid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "agents" ], "summary": "Delete Conversation", "description": "Delete (deactivate) a conversation.", "operationId": "delete_conversation_api_v1_agents_conversations__conversationId__delete", "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Conversationid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/agents/conversations/{conversationId}/messages/": { "get": { "tags": [ "agents" ], "summary": "Get Conversation Messages", "description": "Get all messages for a conversation.", "operationId": "get_conversation_messages_api_v1_agents_conversations__conversationId__messages__get", "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Conversationid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MessageResponse" }, "title": "Response Get Conversation Messages Api V1 Agents Conversations Conversationid Messages Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "agents" ], "summary": "Send Message To Agent", "description": "Send a message to the agent and get the response(s).", "operationId": "send_message_to_agent_api_v1_agents_conversations__conversationId__messages__post", "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Conversationid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MessageResponse" }, "title": "Response Send Message To Agent Api V1 Agents Conversations Conversationid Messages Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/agents/conversations/{conversationId}/messages/manual/": { "post": { "tags": [ "agents" ], "summary": "Add Manual Message", "description": "Manually add a message to a conversation (for testing/debugging).", "operationId": "add_manual_message_api_v1_agents_conversations__conversationId__messages_manual__post", "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "type": "integer", "title": "Conversationid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/agents/tools/": { "get": { "tags": [ "agents" ], "summary": "Get Available Tools", "description": "Get all available tools.", "operationId": "get_available_tools_api_v1_agents_tools__get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ToolDefinition" }, "title": "Response Get Available Tools Api V1 Agents Tools Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/agents/tools/openai-format/": { "get": { "tags": [ "agents" ], "summary": "Get Tools Openai Format", "description": "Get tools in OpenAI function calling format.", "operationId": "get_tools_openai_format_api_v1_agents_tools_openai_format__get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/agents/tools/execute/": { "post": { "tags": [ "agents" ], "summary": "Execute Tool", "description": "Execute a tool with the given parameters (for testing).", "operationId": "execute_tool_api_v1_agents_tools_execute__post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolExecutionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolExecutionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/billing/status": { "get": { "tags": [ "billing" ], "summary": "Get Subscription Status", "description": "Get current subscription status for the company.\n\nReturns subscription tier, status, and access information.\nIf no subscription exists, creates a FREE tier subscription.", "operationId": "get_subscription_status_api_v1_billing_status_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/billing/usage": { "get": { "tags": [ "billing" ], "summary": "Get Usage Stats", "description": "Get detailed usage statistics for the company.\n\nReturns current usage counts, limits, and percentages for all 4 quota types.\nIf no subscription exists, creates a FREE tier subscription.", "operationId": "get_usage_stats_api_v1_billing_usage_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsageStatsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/billing/quota/cell-operations": { "get": { "tags": [ "billing" ], "summary": "Check Cell Operation Quota", "description": "Check current cell operation quota status.\n\nReturns detailed quota information for cell operations metric.\nRaises 429 if quota exceeded.", "operationId": "check_cell_operation_quota_api_v1_billing_quota_cell_operations_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuotaStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/billing/checkout": { "post": { "tags": [ "billing" ], "summary": "Create Checkout Session", "description": "Create a Stripe checkout session or update existing subscription.\n\n- No subscription / FREE tier \u2192 Checkout session for new subscription\n- Paid tier \u2192 Update existing subscription (no new checkout)", "operationId": "create_checkout_session_api_v1_billing_checkout_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckoutSessionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckoutSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/billing/portal": { "post": { "tags": [ "billing" ], "summary": "Create Portal Session", "description": "Create a Stripe customer portal session.\n\nAllows customers to manage payment methods, view invoices, cancel subscription.", "operationId": "create_portal_session_api_v1_billing_portal_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalSessionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/billing/upgrade": { "post": { "tags": [ "billing" ], "summary": "Upgrade Tier", "description": "Upgrade subscription tier.\n\nOnly admin users can upgrade tiers.", "operationId": "upgrade_tier_api_v1_billing_upgrade_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpgradeTierRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpgradeTierResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/billing/cancel": { "post": { "tags": [ "billing" ], "summary": "Cancel Subscription", "description": "Cancel subscription.\n\nOnly admin users can cancel subscription.\nAccess continues until end of current billing period.", "operationId": "cancel_subscription_api_v1_billing_cancel_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "x-api-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CancelSubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "AIModelResponse": { "properties": { "providerId": { "type": "integer", "title": "Providerid" }, "modelName": { "type": "string", "title": "Modelname" }, "displayName": { "type": "string", "title": "Displayname" }, "defaultTemperature": { "type": "number", "title": "Defaulttemperature", "default": 0.7 }, "defaultMaxTokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Defaultmaxtokens" }, "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "id": { "type": "integer", "title": "Id" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" }, "provider": { "anyOf": [ { "$ref": "#/components/schemas/AIProviderResponse" }, { "type": "null" } ] } }, "type": "object", "required": [ "providerId", "modelName", "displayName", "id", "createdAt", "updatedAt" ], "title": "AIModelResponse" }, "AIProviderResponse": { "properties": { "name": { "type": "string", "title": "Name" }, "displayName": { "type": "string", "title": "Displayname" }, "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "id": { "type": "integer", "title": "Id" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "name", "displayName", "id", "createdAt", "updatedAt" ], "title": "AIProviderResponse" }, "AgentQAAnswerSetRequest": { "properties": { "matrix_cell_id": { "type": "integer", "title": "Matrix Cell Id", "description": "Matrix cell ID being answered" }, "question_type_id": { "type": "integer", "title": "Question Type Id", "description": "Question type ID" }, "answer_found": { "type": "boolean", "title": "Answer Found", "description": "Whether any answer was found in the documents" }, "answers": { "items": { "anyOf": [ { "$ref": "#/components/schemas/TextAnswerData" }, { "$ref": "#/components/schemas/DateAnswerData" }, { "$ref": "#/components/schemas/CurrencyAnswerData" }, { "$ref": "#/components/schemas/SelectAnswerData" } ] }, "type": "array", "title": "Answers", "description": "List of answers found (TextAnswerData, DateAnswerData, CurrencyAnswerData, or SelectAnswerData)" } }, "type": "object", "required": [ "matrix_cell_id", "question_type_id", "answer_found" ], "title": "AgentQAAnswerSetRequest", "description": "Request body for agent QA answer upload.\n\nThis schema reuses the existing domain models (TextAnswerData, DateAnswerData, etc.)\ndefined in packages.qa.models.domain.answer_data.\n\nThe agent container receives these parameters from the workflow and includes them\nin the upload request." }, "AgentQAAnswerUploadResponse": { "properties": { "qa_job_id": { "type": "integer", "title": "Qa Job Id" }, "matrix_cell_id": { "type": "integer", "title": "Matrix Cell Id" }, "answer_count": { "type": "integer", "title": "Answer Count" }, "message": { "type": "string", "title": "Message", "default": "Answer uploaded successfully" } }, "type": "object", "required": [ "qa_job_id", "matrix_cell_id", "answer_count" ], "title": "AgentQAAnswerUploadResponse", "description": "Response after successfully uploading agent QA answer." }, "AnswerWithCitations": { "properties": { "answerData": { "anyOf": [ { "$ref": "#/components/schemas/TextAnswerDataResponse" }, { "$ref": "#/components/schemas/DateAnswerDataResponse" }, { "$ref": "#/components/schemas/CurrencyAnswerDataResponse" }, { "$ref": "#/components/schemas/SelectAnswerDataResponse" } ], "title": "Answerdata" }, "citations": { "items": { "$ref": "#/components/schemas/CitationMinimalResponse" }, "type": "array", "title": "Citations", "default": [] } }, "type": "object", "required": [ "answerData" ], "title": "AnswerWithCitations", "description": "Wrapper that combines answer data with its citations." }, "Body_upload_document_api_v1_matrices__matrixId__documents__post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_upload_document_api_v1_matrices__matrixId__documents__post" }, "Body_upload_execution_file_api_v1_workflows__workflowId__executions__executionId__files_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_upload_execution_file_api_v1_workflows__workflowId__executions__executionId__files_post" }, "Body_upload_input_file_api_v1_workflows__workflowId__input_files_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "file" ], "title": "Body_upload_input_file_api_v1_workflows__workflowId__input_files_post" }, "Body_upload_standalone_document_api_v1_documents__post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_upload_standalone_document_api_v1_documents__post" }, "BulkUrlUploadRequest": { "properties": { "urls": { "items": { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, "type": "array", "title": "Urls" } }, "type": "object", "required": [ "urls" ], "title": "BulkUrlUploadRequest" }, "BulkUrlUploadResponse": { "properties": { "documents": { "items": { "$ref": "#/components/schemas/DocumentResponse" }, "type": "array", "title": "Documents" }, "errors": { "items": { "type": "string" }, "type": "array", "title": "Errors" } }, "type": "object", "required": [ "documents", "errors" ], "title": "BulkUrlUploadResponse" }, "CancelSubscriptionResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" }, "cancelled_at": { "type": "string", "format": "date-time", "title": "Cancelled At" }, "access_until": { "type": "string", "format": "date-time", "title": "Access Until", "description": "Date until which company retains access" } }, "type": "object", "required": [ "success", "message", "cancelled_at", "access_until" ], "title": "CancelSubscriptionResponse", "description": "Response after subscription cancellation." }, "ChatCompletionMessageToolCall": { "properties": { "id": { "type": "string", "title": "Id" }, "function": { "$ref": "#/components/schemas/Function" }, "type": { "type": "string", "const": "function", "title": "Type" } }, "type": "object", "required": [ "id", "function", "type" ], "title": "ChatCompletionMessageToolCall", "description": "Represents a tool call in a chat completion message." }, "CheckoutSessionRequest": { "properties": { "tier": { "$ref": "#/components/schemas/SubscriptionTier" }, "success_url": { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Success Url" }, "cancel_url": { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Cancel Url" }, "billing_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Billing Email" }, "trial_period_days": { "anyOf": [ { "type": "integer", "maximum": 90.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Trial Period Days", "description": "Number of trial days (1-90). If not provided, no trial period." } }, "type": "object", "required": [ "tier", "success_url", "cancel_url" ], "title": "CheckoutSessionRequest", "description": "Request to create a checkout session." }, "CheckoutSessionResponse": { "properties": { "checkout_url": { "type": "string", "title": "Checkout Url", "description": "Stripe checkout session URL" } }, "type": "object", "required": [ "checkout_url" ], "title": "CheckoutSessionResponse", "description": "Response with checkout URL." }, "ChunkListResponse": { "properties": { "document_id": { "type": "integer", "title": "Document Id", "description": "Document ID" }, "total_chunks": { "type": "integer", "title": "Total Chunks", "description": "Total number of chunks" }, "chunks": { "items": { "$ref": "#/components/schemas/ChunkMetadataResponse" }, "type": "array", "title": "Chunks", "description": "List of chunk metadata" } }, "type": "object", "required": [ "document_id", "total_chunks", "chunks" ], "title": "ChunkListResponse", "description": "Response for list of chunks with manifest." }, "ChunkMetadataResponse": { "properties": { "chunk_id": { "type": "string", "title": "Chunk Id", "description": "Unique chunk identifier" }, "section": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Section", "description": "Section title if available" }, "page_range": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Page Range", "description": "Page range (e.g., '1-3')" }, "page_start": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Page Start", "description": "Starting page number" }, "page_end": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Page End", "description": "Ending page number" }, "char_start": { "type": "integer", "title": "Char Start", "description": "Character position in original document" }, "char_end": { "type": "integer", "title": "Char End", "description": "Character end position in original document" }, "overlap_prev": { "type": "boolean", "title": "Overlap Prev", "description": "Has overlap with previous chunk", "default": false }, "overlap_next": { "type": "boolean", "title": "Overlap Next", "description": "Has overlap with next chunk", "default": false } }, "type": "object", "required": [ "chunk_id", "char_start", "char_end" ], "title": "ChunkMetadataResponse", "description": "Metadata for a single chunk without content." }, "ChunkResponse": { "properties": { "chunk_id": { "type": "string", "title": "Chunk Id", "description": "Unique chunk identifier" }, "document_id": { "type": "integer", "title": "Document Id", "description": "Parent document ID" }, "content": { "type": "string", "title": "Content", "description": "Chunk text content" }, "metadata": { "$ref": "#/components/schemas/ChunkMetadataResponse", "description": "Chunk metadata" } }, "type": "object", "required": [ "chunk_id", "document_id", "content", "metadata" ], "title": "ChunkResponse", "description": "Full chunk response with content." }, "ChunkSearchHitResponse": { "properties": { "chunk_id": { "type": "string", "title": "Chunk Id", "description": "Unique chunk identifier" }, "document_id": { "type": "integer", "title": "Document Id", "description": "Parent document ID" }, "content": { "type": "string", "title": "Content", "description": "Chunk text content" }, "score": { "type": "number", "title": "Score", "description": "Relevance score from hybrid search" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "description": "Chunk metadata" } }, "type": "object", "required": [ "chunk_id", "document_id", "content", "score", "metadata" ], "title": "ChunkSearchHitResponse", "description": "Single chunk search result with score." }, "ChunkSearchResponse": { "properties": { "query": { "type": "string", "title": "Query", "description": "Search query text" }, "total_count": { "type": "integer", "title": "Total Count", "description": "Total number of results found" }, "has_more": { "type": "boolean", "title": "Has More", "description": "Whether more results are available" }, "chunks": { "items": { "$ref": "#/components/schemas/ChunkSearchHitResponse" }, "type": "array", "title": "Chunks", "description": "Search results" } }, "type": "object", "required": [ "query", "total_count", "has_more", "chunks" ], "title": "ChunkSearchResponse", "description": "Response for hybrid chunk search." }, "ChunkUploadItem": { "properties": { "chunk_id": { "type": "string", "title": "Chunk Id", "description": "Unique chunk identifier" }, "content": { "type": "string", "title": "Content", "description": "Chunk text content" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "description": "Chunk metadata" } }, "type": "object", "required": [ "chunk_id", "content", "metadata" ], "title": "ChunkUploadItem", "description": "Single chunk data for upload from chunking agent." }, "ChunksUploadRequest": { "properties": { "document_id": { "type": "integer", "title": "Document Id", "description": "Document ID" }, "company_id": { "type": "integer", "title": "Company Id", "description": "Company ID" }, "chunks": { "items": { "$ref": "#/components/schemas/ChunkUploadItem" }, "type": "array", "title": "Chunks", "description": "List of chunks to upload" } }, "type": "object", "required": [ "document_id", "company_id", "chunks" ], "title": "ChunksUploadRequest", "description": "Request body for uploading chunks from chunking agent." }, "ChunksUploadResponse": { "properties": { "document_id": { "type": "integer", "title": "Document Id", "description": "Document ID" }, "chunk_count": { "type": "integer", "title": "Chunk Count", "description": "Number of chunks uploaded" }, "s3_prefix": { "type": "string", "title": "S3 Prefix", "description": "S3 prefix where chunks are stored" } }, "type": "object", "required": [ "document_id", "chunk_count", "s3_prefix" ], "title": "ChunksUploadResponse", "description": "Response for chunk upload." }, "CitationMinimalResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "citationOrder": { "type": "integer", "title": "Citationorder" }, "documentId": { "type": "integer", "title": "Documentid" }, "quoteText": { "type": "string", "title": "Quotetext" } }, "type": "object", "required": [ "id", "citationOrder", "documentId", "quoteText" ], "title": "CitationMinimalResponse", "description": "Minimal citation response with just ID and order for frontend hyperlinks." }, "CitationReference": { "properties": { "citation_number": { "type": "integer", "title": "Citation Number" }, "quote_text": { "type": "string", "title": "Quote Text" }, "document_id": { "type": "integer", "title": "Document Id" } }, "type": "object", "required": [ "citation_number", "quote_text", "document_id" ], "title": "CitationReference", "description": "Model for inline citation references in answer text." }, "ConversationCreate": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "extraData": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extradata" }, "aiModelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Aimodelid" } }, "type": "object", "title": "ConversationCreate" }, "ConversationResponse": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "extraData": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extradata" }, "aiModelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Aimodelid" }, "id": { "type": "integer", "title": "Id" }, "isActive": { "type": "boolean", "title": "Isactive", "default": true }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "id", "createdAt", "updatedAt" ], "title": "ConversationResponse" }, "ConversationUpdate": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "extraData": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extradata" }, "aiModelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Aimodelid" }, "isActive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Isactive" } }, "type": "object", "title": "ConversationUpdate" }, "CurrencyAnswerData": { "properties": { "type": { "type": "string", "title": "Type", "default": "currency" }, "value": { "type": "string", "title": "Value" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Amount" }, "currency": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Currency" }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 }, "citations": { "items": { "$ref": "#/components/schemas/CitationReference" }, "type": "array", "title": "Citations", "default": [] } }, "type": "object", "required": [ "value" ], "title": "CurrencyAnswerData", "description": "Domain model for CURRENCY question type." }, "CurrencyAnswerDataResponse": { "properties": { "type": { "type": "string", "title": "Type", "default": "currency" }, "value": { "type": "string", "title": "Value" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Amount" }, "currency": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Currency" }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 } }, "type": "object", "required": [ "value" ], "title": "CurrencyAnswerDataResponse", "description": "Answer data for CURRENCY question type." }, "DateAnswerData": { "properties": { "type": { "type": "string", "title": "Type", "default": "date" }, "value": { "type": "string", "title": "Value" }, "parsed_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parsed Date" }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 }, "citations": { "items": { "$ref": "#/components/schemas/CitationReference" }, "type": "array", "title": "Citations", "default": [] } }, "type": "object", "required": [ "value" ], "title": "DateAnswerData", "description": "Domain model for DATE question type." }, "DateAnswerDataResponse": { "properties": { "type": { "type": "string", "title": "Type", "default": "date" }, "value": { "type": "string", "title": "Value" }, "parsedDate": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parseddate" }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 } }, "type": "object", "required": [ "value" ], "title": "DateAnswerDataResponse", "description": "Answer data for DATE question type." }, "DocumentLabelUpdate": { "properties": { "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" } }, "type": "object", "title": "DocumentLabelUpdate" }, "DocumentListResponse": { "properties": { "documents": { "items": { "$ref": "#/components/schemas/DocumentResponse" }, "type": "array", "title": "Documents" }, "totalCount": { "type": "integer", "title": "Totalcount" }, "skip": { "type": "integer", "title": "Skip" }, "limit": { "type": "integer", "title": "Limit" }, "hasMore": { "type": "boolean", "title": "Hasmore" } }, "type": "object", "required": [ "documents", "totalCount", "skip", "limit", "hasMore" ], "title": "DocumentListResponse", "description": "Response schema for document list with pagination metadata." }, "DocumentMatchSnippetResponse": { "properties": { "chunkId": { "type": "string", "title": "Chunkid" }, "content": { "type": "string", "title": "Content" }, "score": { "type": "number", "title": "Score" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" } }, "type": "object", "required": [ "chunkId", "content", "score", "metadata" ], "title": "DocumentMatchSnippetResponse", "description": "A matching snippet from document content." }, "DocumentResponse": { "properties": { "filename": { "type": "string", "title": "Filename" }, "storageKey": { "type": "string", "title": "Storagekey" }, "contentType": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Contenttype" }, "fileSize": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Filesize" }, "id": { "type": "integer", "title": "Id" }, "companyId": { "type": "integer", "title": "Companyid" }, "checksum": { "type": "string", "title": "Checksum" }, "extractedContentPath": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extractedcontentpath" }, "extractionStatus": { "type": "string", "title": "Extractionstatus" }, "extractionStartedAt": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Extractionstartedat" }, "extractionCompletedAt": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Extractioncompletedat" }, "useAgenticChunking": { "type": "boolean", "title": "Useagenticchunking", "default": false }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "filename", "storageKey", "id", "companyId", "checksum", "extractionStatus", "createdAt", "updatedAt" ], "title": "DocumentResponse" }, "DocumentSearchHitResponse": { "properties": { "document": { "$ref": "#/components/schemas/DocumentResponse" }, "matchScore": { "type": "number", "title": "Matchscore" }, "matchType": { "type": "string", "title": "Matchtype" }, "snippets": { "items": { "$ref": "#/components/schemas/DocumentMatchSnippetResponse" }, "type": "array", "title": "Snippets" } }, "type": "object", "required": [ "document", "matchScore", "matchType", "snippets" ], "title": "DocumentSearchHitResponse", "description": "Document search result with match context." }, "EntityRefResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "entitySetId": { "type": "integer", "title": "Entitysetid" }, "entitySetMemberId": { "type": "integer", "title": "Entitysetmemberid" }, "entityType": { "$ref": "#/components/schemas/EntityType" }, "entityId": { "type": "integer", "title": "Entityid" }, "role": { "$ref": "#/components/schemas/EntityRole" }, "entityOrder": { "type": "integer", "title": "Entityorder" } }, "type": "object", "required": [ "id", "entitySetId", "entitySetMemberId", "entityType", "entityId", "role", "entityOrder" ], "title": "EntityRefResponse", "description": "Entity reference response - represents one dimension of a cell's N-dimensional coordinate." }, "EntityRole": { "type": "string", "enum": [ "document", "question", "left", "right", "primary", "secondary" ], "title": "EntityRole", "description": "Roles that entities can play in a matrix cell.\n\nThis IS the axis identifier in N-dimensional matrices.\nEach role represents a distinct dimension/axis." }, "EntitySetFilter": { "properties": { "entitySetId": { "type": "integer", "title": "Entitysetid" }, "entityIds": { "items": { "type": "integer" }, "type": "array", "title": "Entityids" }, "role": { "$ref": "#/components/schemas/EntityRole" } }, "type": "object", "required": [ "entitySetId", "entityIds", "role" ], "title": "EntitySetFilter", "description": "Filter for entities in an entity set.\n\nRole is REQUIRED - it identifies which axis/dimension this filter applies to.\nFor correlation matrices, the same entity_set_id appears multiple times\nwith different roles (e.g., LEFT and RIGHT both using the documents entity set)." }, "EntitySetMemberLabelUpdate": { "properties": { "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label", "description": "New label value (null to clear)" } }, "type": "object", "required": [ "label" ], "title": "EntitySetMemberLabelUpdate", "description": "Request schema for updating entity set member label." }, "EntitySetMemberResponse": { "properties": { "id": { "type": "integer", "title": "Id", "description": "Entity set member ID" }, "entitySetId": { "type": "integer", "title": "Entitysetid", "description": "ID of the entity set this member belongs to" }, "entityType": { "$ref": "#/components/schemas/EntityType", "description": "Type of entity (DOCUMENT or QUESTION)" }, "entityId": { "type": "integer", "title": "Entityid", "description": "ID of the actual entity (document ID or question ID)" }, "memberOrder": { "type": "integer", "title": "Memberorder", "description": "Order of this member within the entity set" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label", "description": "Optional label for this member in this context" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat", "description": "Timestamp when member was created" } }, "type": "object", "required": [ "id", "entitySetId", "entityType", "entityId", "memberOrder", "createdAt" ], "title": "EntitySetMemberResponse", "description": "Response schema for entity set member.\n\nContains the member ID and the actual entity ID (document/question ID)." }, "EntitySetResponse": { "properties": { "id": { "type": "integer", "title": "Id", "description": "Entity set ID" }, "matrixId": { "type": "integer", "title": "Matrixid", "description": "ID of the matrix this entity set belongs to" }, "name": { "type": "string", "title": "Name", "description": "Name of the entity set (e.g., 'documents', 'questions')" }, "entityType": { "$ref": "#/components/schemas/EntityType", "description": "Type of entities in this set" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat", "description": "Timestamp when entity set was created" }, "members": { "items": { "$ref": "#/components/schemas/EntitySetMemberResponse" }, "type": "array", "title": "Members", "description": "List of members in this entity set" } }, "type": "object", "required": [ "id", "matrixId", "name", "entityType", "createdAt" ], "title": "EntitySetResponse", "description": "Response schema for entity set with its members.\n\nContains all information needed by the frontend to construct entity_set_filters." }, "EntitySetSummary": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "entityType": { "$ref": "#/components/schemas/EntityType" }, "memberCount": { "type": "integer", "title": "Membercount" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "id", "name", "entityType", "memberCount" ], "title": "EntitySetSummary", "description": "Summary of an entity set for structure metadata." }, "EntityType": { "type": "string", "enum": [ "document", "question" ], "title": "EntityType", "description": "Types of entities in entity sets." }, "ExecutionFileResponse": { "properties": { "id": { "type": "integer", "title": "Id", "description": "File ID" }, "name": { "type": "string", "title": "Name", "description": "File name" }, "fileType": { "type": "string", "title": "Filetype", "description": "File type (output or scratch)" }, "fileSize": { "type": "integer", "title": "Filesize", "description": "File size in bytes" }, "storagePath": { "type": "string", "title": "Storagepath", "description": "Storage path" }, "mimeType": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mimetype", "description": "MIME type" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat", "description": "When file was created" } }, "type": "object", "required": [ "id", "name", "fileType", "fileSize", "storagePath", "createdAt" ], "title": "ExecutionFileResponse", "description": "Response model for an execution file" }, "ExecutionResponse": { "properties": { "id": { "type": "integer", "title": "Id", "description": "Execution ID" }, "workflowId": { "type": "integer", "title": "Workflowid", "description": "Workflow ID" }, "status": { "type": "string", "title": "Status", "description": "Execution status (pending, running, completed, failed)" }, "startedAt": { "type": "string", "format": "date-time", "title": "Startedat", "description": "When execution started" }, "completedAt": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completedat", "description": "When execution completed" }, "generatedFiles": { "anyOf": [ { "items": { "$ref": "#/components/schemas/GeneratedFileResponse" }, "type": "array" }, { "type": "null" } ], "title": "Generatedfiles", "description": "Files generated by the execution" }, "totalSizeBytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Totalsizebytes", "description": "Total size of all generated files" }, "errorMessage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Errormessage", "description": "Error message if execution failed" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Additional execution metadata" } }, "type": "object", "required": [ "id", "workflowId", "status", "startedAt" ], "title": "ExecutionResponse", "description": "Response model for workflow execution" }, "ExecutionStartedResponse": { "properties": { "executionId": { "type": "integer", "title": "Executionid" }, "workflowId": { "type": "integer", "title": "Workflowid" }, "status": { "type": "string", "title": "Status" }, "startedAt": { "type": "string", "format": "date-time", "title": "Startedat" } }, "type": "object", "required": [ "executionId", "workflowId", "status", "startedAt" ], "title": "ExecutionStartedResponse", "description": "Response when execution is started" }, "ExecutionTriggerRequest": { "properties": { "triggerContext": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Triggercontext", "description": "Additional context for the execution trigger" } }, "type": "object", "title": "ExecutionTriggerRequest", "description": "Request to trigger a workflow execution" }, "Function": { "properties": { "arguments": { "type": "string", "title": "Arguments" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": [ "arguments", "name" ], "title": "Function", "description": "Represents a function call." }, "GenerateUploadUrlsRequest": { "properties": { "filenames": { "items": { "type": "string" }, "type": "array", "title": "Filenames", "description": "List of filenames to upload" } }, "type": "object", "required": [ "filenames" ], "title": "GenerateUploadUrlsRequest", "description": "Request to generate presigned upload URLs for output files" }, "GenerateUploadUrlsResponse": { "properties": { "uploadUrls": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Uploadurls", "description": "Mapping of filename to presigned upload URL" }, "manifestUploadUrl": { "type": "string", "title": "Manifestuploadurl", "description": "Presigned upload URL for manifest file" } }, "type": "object", "required": [ "uploadUrls", "manifestUploadUrl" ], "title": "GenerateUploadUrlsResponse", "description": "Response with presigned upload URLs for each file" }, "GeneratedFileResponse": { "properties": { "name": { "type": "string", "title": "Name", "description": "File name" }, "size": { "type": "integer", "title": "Size", "description": "File size in bytes" }, "storageKey": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Storagekey", "description": "S3 storage key" }, "contentType": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Contenttype", "description": "MIME type" } }, "type": "object", "required": [ "name", "size" ], "title": "GeneratedFileResponse", "description": "Response model for a generated file" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HybridDocumentSearchResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/DocumentSearchHitResponse" }, "type": "array", "title": "Results" }, "totalCount": { "type": "integer", "title": "Totalcount" }, "skip": { "type": "integer", "title": "Skip" }, "limit": { "type": "integer", "title": "Limit" }, "hasMore": { "type": "boolean", "title": "Hasmore" } }, "type": "object", "required": [ "results", "totalCount", "skip", "limit", "hasMore" ], "title": "HybridDocumentSearchResponse", "description": "Response for hybrid document search with match snippets." }, "InputFileResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "workflowId": { "type": "integer", "title": "Workflowid" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "fileSize": { "type": "integer", "title": "Filesize" }, "mimeType": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mimetype" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" } }, "type": "object", "required": [ "id", "workflowId", "name", "fileSize", "createdAt" ], "title": "InputFileResponse", "description": "Response model for workflow input file." }, "MatrixCellAnswerResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "matrixCellId": { "type": "integer", "title": "Matrixcellid" }, "questionTypeId": { "type": "integer", "title": "Questiontypeid" }, "answers": { "items": { "$ref": "#/components/schemas/AnswerWithCitations" }, "type": "array", "title": "Answers", "default": [] }, "answerFound": { "type": "boolean", "title": "Answerfound", "default": true }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 }, "processingMetadata": { "anyOf": [ { "$ref": "#/components/schemas/ProcessingMetadataSchema" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "id", "matrixCellId", "questionTypeId", "createdAt", "updatedAt" ], "title": "MatrixCellAnswerResponse", "description": "Response schema for matrix cell answer sets with parsed data.\n\nContains answer_found at the response level and answers as a list.\nEmpty answers list indicates no answers found." }, "MatrixCellReprocessResponse": { "properties": { "cellsReprocessed": { "type": "integer", "title": "Cellsreprocessed" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "cellsReprocessed", "message" ], "title": "MatrixCellReprocessResponse", "description": "Response schema for matrix cell reprocessing operations." }, "MatrixCellResponse": { "properties": { "currentAnswerSetId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Currentanswersetid" }, "status": { "$ref": "#/components/schemas/MatrixCellStatus", "default": "pending" }, "id": { "type": "integer", "title": "Id" }, "matrixId": { "type": "integer", "title": "Matrixid" }, "entityRefs": { "items": { "$ref": "#/components/schemas/EntityRefResponse" }, "type": "array", "title": "Entityrefs" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "id", "matrixId", "entityRefs", "createdAt", "updatedAt" ], "title": "MatrixCellResponse" }, "MatrixCellStatus": { "type": "string", "enum": [ "pending", "processing", "completed", "failed" ], "title": "MatrixCellStatus" }, "MatrixCellUpdate": { "properties": { "currentAnswerSetId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Currentanswersetid" }, "status": { "anyOf": [ { "$ref": "#/components/schemas/MatrixCellStatus" }, { "type": "null" } ] } }, "type": "object", "title": "MatrixCellUpdate" }, "MatrixCellWithAnswerResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "matrixId": { "type": "integer", "title": "Matrixid" }, "entityRefs": { "items": { "$ref": "#/components/schemas/EntityRefResponse" }, "type": "array", "title": "Entityrefs" }, "currentAnswerSetId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Currentanswersetid" }, "status": { "$ref": "#/components/schemas/MatrixCellStatus" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" }, "currentAnswer": { "anyOf": [ { "$ref": "#/components/schemas/MatrixCellAnswerResponse" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "matrixId", "entityRefs", "status", "createdAt", "updatedAt" ], "title": "MatrixCellWithAnswerResponse", "description": "Matrix cell response that includes the current answer data." }, "MatrixCellsBatchRequest": { "properties": { "entitySetFilters": { "items": { "$ref": "#/components/schemas/EntitySetFilter" }, "type": "array", "title": "Entitysetfilters" } }, "type": "object", "required": [ "entitySetFilters" ], "title": "MatrixCellsBatchRequest", "description": "Request schema for batch fetching matrix cells (entity-ref based).\n\nFrontend provides entity_set_filters to specify which entities to fetch cells for.\nEach filter specifies an entity_set_id and list of entity_ids." }, "MatrixCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "workspaceId": { "type": "integer", "title": "Workspaceid" }, "matrixType": { "$ref": "#/components/schemas/MatrixType", "default": "standard" } }, "type": "object", "required": [ "name", "workspaceId" ], "title": "MatrixCreate" }, "MatrixDocumentResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "matrixId": { "type": "integer", "title": "Matrixid" }, "documentId": { "type": "integer", "title": "Documentid" }, "companyId": { "type": "integer", "title": "Companyid" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "document": { "$ref": "#/components/schemas/DocumentResponse" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "id", "matrixId", "documentId", "companyId", "document", "createdAt", "updatedAt" ], "title": "MatrixDocumentResponse", "description": "Response schema for document with matrix association context." }, "MatrixDuplicateRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "entitySetIds": { "items": { "type": "integer" }, "type": "array", "title": "Entitysetids" }, "templateVariableOverrides": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TemplateVariableOverride" }, "type": "array" }, { "type": "null" } ], "title": "Templatevariableoverrides" } }, "type": "object", "required": [ "name", "entitySetIds" ], "title": "MatrixDuplicateRequest", "description": "Request schema for matrix duplication operations (entity-set based).\n\nSpecify which entity sets to duplicate members from. The new matrix\nwill have the same structure but only the selected entity sets will\nbe populated with members." }, "MatrixDuplicateResponse": { "properties": { "originalMatrixId": { "type": "integer", "title": "Originalmatrixid" }, "duplicateMatrixId": { "type": "integer", "title": "Duplicatematrixid" }, "entitySetsDuplicated": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Entitysetsduplicated" }, "cellsCreated": { "type": "integer", "title": "Cellscreated" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "originalMatrixId", "duplicateMatrixId", "entitySetsDuplicated", "cellsCreated", "message" ], "title": "MatrixDuplicateResponse", "description": "Response schema for matrix duplication operations." }, "MatrixEntitySetsResponse": { "properties": { "matrixId": { "type": "integer", "title": "Matrixid", "description": "ID of the matrix" }, "matrixType": { "$ref": "#/components/schemas/MatrixType", "description": "Type of the matrix (STANDARD, CROSS_CORRELATION, etc.)" }, "entitySets": { "items": { "$ref": "#/components/schemas/EntitySetResponse" }, "type": "array", "title": "Entitysets", "description": "List of all entity sets in the matrix" } }, "type": "object", "required": [ "matrixId", "matrixType" ], "title": "MatrixEntitySetsResponse", "description": "Response schema for all entity sets in a matrix.\n\nThis provides complete entity set information for a matrix,\nallowing the frontend to:\n1. Determine matrix dimensionality\n2. Construct entity_set_filters for tile queries\n3. Map entity IDs to entity set member IDs" }, "MatrixListResponse": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "workspaceId": { "type": "integer", "title": "Workspaceid" }, "id": { "type": "integer", "title": "Id" }, "companyId": { "type": "integer", "title": "Companyid" }, "matrixType": { "$ref": "#/components/schemas/MatrixType" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "name", "workspaceId", "id", "companyId", "matrixType", "createdAt", "updatedAt" ], "title": "MatrixListResponse" }, "MatrixReprocessRequest": { "properties": { "entitySetFilters": { "anyOf": [ { "items": { "$ref": "#/components/schemas/EntitySetFilter" }, "type": "array" }, { "type": "null" } ], "title": "Entitysetfilters" }, "cellIds": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Cellids" }, "wholeMatrix": { "type": "boolean", "title": "Wholematrix", "default": false } }, "type": "object", "title": "MatrixReprocessRequest", "description": "Request schema for matrix reprocessing operations.\n\nUses entity_set_filters to specify entities across any dimension.\nFrontend maps entity sets to documents/questions." }, "MatrixResponse": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "workspaceId": { "type": "integer", "title": "Workspaceid" }, "id": { "type": "integer", "title": "Id" }, "matrixType": { "$ref": "#/components/schemas/MatrixType" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "name", "workspaceId", "id", "matrixType", "createdAt", "updatedAt" ], "title": "MatrixResponse" }, "MatrixSoftDeleteRequest": { "properties": { "entitySetFilters": { "anyOf": [ { "items": { "$ref": "#/components/schemas/EntitySetFilter" }, "type": "array" }, { "type": "null" } ], "title": "Entitysetfilters" }, "matrixIds": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Matrixids" } }, "type": "object", "title": "MatrixSoftDeleteRequest", "description": "Request schema for soft delete operations on matrix entities.\n\nUses entity_set_filters to specify entities across any dimension.\nFrontend maps entity sets to documents/questions." }, "MatrixSoftDeleteResponse": { "properties": { "entitiesDeleted": { "type": "integer", "title": "Entitiesdeleted" }, "cellsDeleted": { "type": "integer", "title": "Cellsdeleted" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "entitiesDeleted", "cellsDeleted", "message" ], "title": "MatrixSoftDeleteResponse", "description": "Response schema for soft delete operations." }, "MatrixStatsResponse": { "properties": { "totalCells": { "type": "integer", "title": "Totalcells" }, "completed": { "type": "integer", "title": "Completed" }, "processing": { "type": "integer", "title": "Processing" }, "pending": { "type": "integer", "title": "Pending" }, "failed": { "type": "integer", "title": "Failed" }, "documentsPendingExtraction": { "type": "integer", "title": "Documentspendingextraction", "default": 0 }, "documentsFailedExtraction": { "type": "integer", "title": "Documentsfailedextraction", "default": 0 } }, "type": "object", "required": [ "totalCells", "completed", "processing", "pending", "failed" ], "title": "MatrixStatsResponse", "description": "Response schema for matrix cell statistics." }, "MatrixStructureResponse": { "properties": { "matrixId": { "type": "integer", "title": "Matrixid" }, "matrixName": { "type": "string", "title": "Matrixname" }, "matrixType": { "$ref": "#/components/schemas/MatrixType" }, "entitySets": { "items": { "$ref": "#/components/schemas/EntitySetSummary" }, "type": "array", "title": "Entitysets" }, "explanation": { "type": "string", "title": "Explanation" }, "rolesExplanation": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Rolesexplanation" }, "systemPlaceholders": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Systemplaceholders" }, "cellStructure": { "type": "string", "title": "Cellstructure" } }, "type": "object", "required": [ "matrixId", "matrixName", "matrixType", "entitySets", "explanation", "rolesExplanation", "systemPlaceholders", "cellStructure" ], "title": "MatrixStructureResponse", "description": "Matrix structure metadata for document generation agents.\n\nProvides information about how the matrix is organized and how to\ninterpret cell data when fetching from the API." }, "MatrixTemplateVariableCreate": { "properties": { "templateString": { "type": "string", "title": "Templatestring", "description": "Template variable name (e.g., 'company_name')" }, "value": { "type": "string", "title": "Value", "description": "Value to substitute for the template variable" } }, "type": "object", "required": [ "templateString", "value" ], "title": "MatrixTemplateVariableCreate", "description": "Schema for creating a matrix template variable." }, "MatrixTemplateVariableResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "templateString": { "type": "string", "title": "Templatestring" }, "value": { "type": "string", "title": "Value" }, "matrixId": { "type": "integer", "title": "Matrixid" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "id", "templateString", "value", "matrixId", "createdAt", "updatedAt" ], "title": "MatrixTemplateVariableResponse", "description": "Schema for matrix template variable responses." }, "MatrixTemplateVariableUpdate": { "properties": { "templateString": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Templatestring", "description": "Template variable name" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Value", "description": "Value to substitute for the template variable" } }, "type": "object", "title": "MatrixTemplateVariableUpdate", "description": "Schema for updating a matrix template variable." }, "MatrixType": { "type": "string", "enum": [ "standard", "cross_correlation", "generic_correlation", "synopsis" ], "title": "MatrixType", "description": "Types of matrices - determines cell creation strategy." }, "MatrixUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "title": "MatrixUpdate" }, "MessageCreate": { "properties": { "role": { "type": "string", "title": "Role" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content" }, "toolCalls": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ChatCompletionMessageToolCall" }, "type": "array" }, { "type": "null" } ], "title": "Toolcalls" }, "toolCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Toolcallid" }, "permissionMode": { "$ref": "#/components/schemas/ToolPermission", "default": "read" }, "extraData": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extradata" } }, "type": "object", "required": [ "role" ], "title": "MessageCreate" }, "MessageResponse": { "properties": { "role": { "type": "string", "title": "Role" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content" }, "toolCalls": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ChatCompletionMessageToolCall" }, "type": "array" }, { "type": "null" } ], "title": "Toolcalls" }, "toolCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Toolcallid" }, "permissionMode": { "$ref": "#/components/schemas/ToolPermission", "default": "read" }, "extraData": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extradata" }, "id": { "type": "integer", "title": "Id" }, "conversationId": { "type": "integer", "title": "Conversationid" }, "sequenceNumber": { "type": "integer", "title": "Sequencenumber" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "role", "id", "conversationId", "sequenceNumber", "createdAt", "updatedAt" ], "title": "MessageResponse" }, "PlanInfo": { "properties": { "tier": { "type": "string", "title": "Tier" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "price_cents": { "type": "integer", "title": "Price Cents" }, "price_formatted": { "type": "string", "title": "Price Formatted" }, "billing_period": { "type": "string", "title": "Billing Period" }, "stripe_price_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Stripe Price Id" }, "limits": { "$ref": "#/components/schemas/PlanLimits" }, "features": { "items": { "type": "string" }, "type": "array", "title": "Features" } }, "type": "object", "required": [ "tier", "name", "description", "price_cents", "price_formatted", "billing_period", "stripe_price_id", "limits", "features" ], "title": "PlanInfo", "description": "Complete plan information combining pricing and limits." }, "PlanLimits": { "properties": { "cell_operations_per_month": { "type": "integer", "title": "Cell Operations Per Month" }, "agentic_qa_per_month": { "type": "integer", "title": "Agentic Qa Per Month" }, "workflows_per_month": { "type": "integer", "title": "Workflows Per Month" }, "storage_bytes": { "type": "integer", "title": "Storage Bytes" } }, "type": "object", "required": [ "cell_operations_per_month", "agentic_qa_per_month", "workflows_per_month", "storage_bytes" ], "title": "PlanLimits", "description": "Quota limits for a plan." }, "PlansResponse": { "properties": { "plans": { "items": { "$ref": "#/components/schemas/PlanInfo" }, "type": "array", "title": "Plans" } }, "type": "object", "required": [ "plans" ], "title": "PlansResponse", "description": "Response model for plans endpoint." }, "PortalSessionRequest": { "properties": { "return_url": { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Return Url" } }, "type": "object", "required": [ "return_url" ], "title": "PortalSessionRequest", "description": "Request to create a customer portal session." }, "PortalSessionResponse": { "properties": { "portal_url": { "type": "string", "title": "Portal Url", "description": "Stripe customer portal URL" } }, "type": "object", "required": [ "portal_url" ], "title": "PortalSessionResponse", "description": "Response with portal URL." }, "ProcessingMetadataSchema": { "properties": { "modelUsed": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modelused" }, "confidenceScore": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidencescore" }, "processingTimeMs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Processingtimems" }, "extractionMethod": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extractionmethod" }, "additionalData": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Additionaldata" } }, "type": "object", "title": "ProcessingMetadataSchema", "description": "Optional metadata about how the answer was generated." }, "ProfileResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "email": { "type": "string", "format": "email", "title": "Email" }, "full_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Full Name" }, "company_id": { "type": "integer", "title": "Company Id" }, "is_active": { "type": "boolean", "title": "Is Active" }, "is_admin": { "type": "boolean", "title": "Is Admin" } }, "type": "object", "required": [ "id", "email", "company_id", "is_active", "is_admin" ], "title": "ProfileResponse", "description": "User profile response" }, "ProtectedResponse": { "properties": { "message": { "type": "string", "title": "Message" }, "user_id": { "type": "integer", "title": "User Id" }, "email": { "type": "string", "format": "email", "title": "Email" }, "company_id": { "type": "integer", "title": "Company Id" }, "is_admin": { "type": "boolean", "title": "Is Admin" } }, "type": "object", "required": [ "message", "user_id", "email", "company_id", "is_admin" ], "title": "ProtectedResponse", "description": "Response for protected route" }, "QuestionCreate": { "properties": { "questionText": { "type": "string", "title": "Questiontext" }, "questionTypeId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Questiontypeid", "default": 1 }, "aiModelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Aimodelid" }, "aiConfigOverride": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Aiconfigoverride" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "minAnswers": { "type": "integer", "title": "Minanswers", "default": 1 }, "maxAnswers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Maxanswers", "default": 1 }, "useAgentQa": { "type": "boolean", "title": "Useagentqa", "default": false } }, "type": "object", "required": [ "questionText" ], "title": "QuestionCreate" }, "QuestionLabelUpdate": { "properties": { "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" } }, "type": "object", "title": "QuestionLabelUpdate" }, "QuestionOptionCreate": { "properties": { "value": { "type": "string", "title": "Value" } }, "type": "object", "required": [ "value" ], "title": "QuestionOptionCreate" }, "QuestionOptionResponse": { "properties": { "value": { "type": "string", "title": "Value" }, "id": { "type": "integer", "title": "Id" }, "optionSetId": { "type": "integer", "title": "Optionsetid" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "value", "id", "optionSetId", "createdAt", "updatedAt" ], "title": "QuestionOptionResponse" }, "QuestionOptionSetCreate": { "properties": { "options": { "items": { "$ref": "#/components/schemas/QuestionOptionCreate" }, "type": "array", "title": "Options", "default": [] } }, "type": "object", "title": "QuestionOptionSetCreate" }, "QuestionOptionSetResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "questionId": { "type": "integer", "title": "Questionid" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" }, "options": { "items": { "$ref": "#/components/schemas/QuestionOptionResponse" }, "type": "array", "title": "Options", "default": [] } }, "type": "object", "required": [ "id", "questionId", "createdAt", "updatedAt" ], "title": "QuestionOptionSetResponse", "description": "Response model with full option set and options." }, "QuestionOptionSetUpdate": { "properties": { "options": { "anyOf": [ { "items": { "$ref": "#/components/schemas/QuestionOptionCreate" }, "type": "array" }, { "type": "null" } ], "title": "Options" } }, "type": "object", "title": "QuestionOptionSetUpdate" }, "QuestionResponse": { "properties": { "questionText": { "type": "string", "title": "Questiontext" }, "questionTypeId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Questiontypeid", "default": 1 }, "aiModelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Aimodelid" }, "aiConfigOverride": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Aiconfigoverride" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "minAnswers": { "type": "integer", "title": "Minanswers", "default": 1 }, "maxAnswers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Maxanswers", "default": 1 }, "useAgentQa": { "type": "boolean", "title": "Useagentqa", "default": false }, "id": { "type": "integer", "title": "Id" }, "matrixId": { "type": "integer", "title": "Matrixid" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" }, "aiModel": { "anyOf": [ { "$ref": "#/components/schemas/AIModelResponse" }, { "type": "null" } ] } }, "type": "object", "required": [ "questionText", "id", "matrixId", "createdAt", "updatedAt" ], "title": "QuestionResponse" }, "QuestionTypeResponse": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "validationSchema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Validationschema" }, "id": { "type": "integer", "title": "Id" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "name", "id", "createdAt", "updatedAt" ], "title": "QuestionTypeResponse" }, "QuestionUpdate": { "properties": { "questionText": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Questiontext" }, "questionTypeId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Questiontypeid" }, "aiModelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Aimodelid" }, "aiConfigOverride": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Aiconfigoverride" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "minAnswers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Minanswers" }, "maxAnswers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Maxanswers" }, "useAgentQa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Useagentqa" } }, "type": "object", "title": "QuestionUpdate" }, "QuestionWithOptionsCreate": { "properties": { "questionText": { "type": "string", "title": "Questiontext" }, "questionTypeId": { "type": "integer", "title": "Questiontypeid" }, "aiModelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Aimodelid" }, "aiConfigOverride": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Aiconfigoverride" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "minAnswers": { "type": "integer", "title": "Minanswers", "default": 1 }, "maxAnswers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Maxanswers", "default": 1 }, "useAgentQa": { "type": "boolean", "title": "Useagentqa", "default": false }, "options": { "items": { "$ref": "#/components/schemas/QuestionOptionCreate" }, "type": "array", "title": "Options", "default": [] } }, "type": "object", "required": [ "questionText", "questionTypeId" ], "title": "QuestionWithOptionsCreate", "description": "Model for creating a question with options in a single transaction." }, "QuestionWithOptionsUpdate": { "properties": { "questionText": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Questiontext" }, "questionTypeId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Questiontypeid" }, "aiModelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Aimodelid" }, "aiConfigOverride": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Aiconfigoverride" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "minAnswers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Minanswers" }, "maxAnswers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Maxanswers" }, "useAgentQa": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Useagentqa" }, "options": { "anyOf": [ { "items": { "$ref": "#/components/schemas/QuestionOptionCreate" }, "type": "array" }, { "type": "null" } ], "title": "Options" } }, "type": "object", "title": "QuestionWithOptionsUpdate", "description": "Model for updating a question with options in a single transaction." }, "QueuePendingCellsRequest": { "properties": { "matrixId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Matrixid" } }, "type": "object", "title": "QueuePendingCellsRequest", "description": "Request schema for queue_pending_cells operation." }, "QueuePendingCellsResponse": { "properties": { "totalPendingCells": { "type": "integer", "title": "Totalpendingcells" }, "queued": { "type": "integer", "title": "Queued" }, "failed": { "type": "integer", "title": "Failed" } }, "type": "object", "required": [ "totalPendingCells", "queued", "failed" ], "title": "QueuePendingCellsResponse", "description": "Response schema for queue_pending_cells operation." }, "QuotaStatusResponse": { "properties": { "metric_name": { "type": "string", "title": "Metric Name" }, "current_usage": { "type": "integer", "title": "Current Usage" }, "limit": { "type": "integer", "title": "Limit" }, "remaining": { "type": "integer", "title": "Remaining" }, "percentage_used": { "type": "number", "title": "Percentage Used" }, "warning_threshold_reached": { "type": "boolean", "title": "Warning Threshold Reached", "description": "True if usage is >= 80% of limit" }, "period_type": { "type": "string", "title": "Period Type", "description": "'daily' or 'monthly'" }, "period_end": { "type": "string", "format": "date-time", "title": "Period End" } }, "type": "object", "required": [ "metric_name", "current_usage", "limit", "remaining", "percentage_used", "warning_threshold_reached", "period_type", "period_end" ], "title": "QuotaStatusResponse", "description": "Quota status for a specific metric." }, "SelectAnswerData": { "properties": { "type": { "type": "string", "title": "Type", "default": "select" }, "option_id": { "type": "integer", "title": "Option Id" }, "option_value": { "type": "string", "title": "Option Value" }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 }, "citations": { "items": { "$ref": "#/components/schemas/CitationReference" }, "type": "array", "title": "Citations", "default": [] } }, "type": "object", "required": [ "option_id", "option_value" ], "title": "SelectAnswerData", "description": "Domain model for SELECT question type - represents a single selected option." }, "SelectAnswerDataResponse": { "properties": { "type": { "type": "string", "title": "Type", "default": "select" }, "optionId": { "type": "integer", "title": "Optionid" }, "optionValue": { "type": "string", "title": "Optionvalue" }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 } }, "type": "object", "required": [ "optionId", "optionValue" ], "title": "SelectAnswerDataResponse", "description": "Answer data for SELECT question type - represents a single selected option." }, "SubscriptionStatus": { "type": "string", "enum": [ "active", "past_due", "suspended", "cancelled" ], "title": "SubscriptionStatus", "description": "Subscription status lifecycle.\n\nFlow: active -> past_due -> suspended -> cancelled" }, "SubscriptionStatusResponse": { "properties": { "company_id": { "type": "integer", "title": "Company Id" }, "tier": { "$ref": "#/components/schemas/SubscriptionTier" }, "status": { "$ref": "#/components/schemas/SubscriptionStatus" }, "has_access": { "type": "boolean", "title": "Has Access", "description": "Whether company has product access" }, "current_period_start": { "type": "string", "format": "date-time", "title": "Current Period Start" }, "current_period_end": { "type": "string", "format": "date-time", "title": "Current Period End" }, "cancelled_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Cancelled At" }, "suspended_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Suspended At" } }, "type": "object", "required": [ "company_id", "tier", "status", "has_access", "current_period_start", "current_period_end" ], "title": "SubscriptionStatusResponse", "description": "Current subscription status." }, "SubscriptionTier": { "type": "string", "enum": [ "free", "starter", "professional", "business", "enterprise" ], "title": "SubscriptionTier", "description": "Subscription pricing tiers (consumer/prosumer model).\n\nMaps to Stripe price IDs." }, "SupportedExtensionsResponse": { "properties": { "extensions": { "items": { "type": "string" }, "type": "array", "title": "Extensions" }, "maxFileSizeMb": { "type": "integer", "title": "Maxfilesizemb" } }, "type": "object", "required": [ "extensions", "maxFileSizeMb" ], "title": "SupportedExtensionsResponse", "description": "Response schema for supported file extensions." }, "TemplateValidationResponse": { "properties": { "questionId": { "type": "integer", "title": "Questionid" }, "variablesInText": { "items": { "type": "string" }, "type": "array", "title": "Variablesintext" }, "associatedVariables": { "items": { "type": "string" }, "type": "array", "title": "Associatedvariables" }, "missingAssociations": { "items": { "type": "string" }, "type": "array", "title": "Missingassociations" }, "extraAssociations": { "items": { "type": "string" }, "type": "array", "title": "Extraassociations" }, "isValid": { "type": "boolean", "title": "Isvalid" } }, "type": "object", "required": [ "questionId", "variablesInText", "associatedVariables", "missingAssociations", "extraAssociations", "isValid" ], "title": "TemplateValidationResponse", "description": "Schema for template variable validation." }, "TemplateVariableOverride": { "properties": { "templateVariableId": { "type": "integer", "title": "Templatevariableid" }, "newValue": { "type": "string", "title": "Newvalue" } }, "type": "object", "required": [ "templateVariableId", "newValue" ], "title": "TemplateVariableOverride", "description": "Template variable value override for matrix duplication." }, "TemplateVariableUsageResponse": { "properties": { "variable": { "$ref": "#/components/schemas/MatrixTemplateVariableResponse" }, "usageCount": { "type": "integer", "title": "Usagecount", "description": "Number of questions using this variable" } }, "type": "object", "required": [ "variable", "usageCount" ], "title": "TemplateVariableUsageResponse", "description": "Schema for template variable with usage information." }, "TextAnswerData": { "properties": { "type": { "type": "string", "title": "Type", "default": "text" }, "value": { "type": "string", "title": "Value" }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 }, "citations": { "items": { "$ref": "#/components/schemas/CitationReference" }, "type": "array", "title": "Citations", "default": [] } }, "type": "object", "required": [ "value" ], "title": "TextAnswerData", "description": "Domain model for text-based question types (SHORT_ANSWER, LONG_ANSWER)." }, "TextAnswerDataResponse": { "properties": { "type": { "type": "string", "title": "Type", "default": "text" }, "value": { "type": "string", "title": "Value" }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 } }, "type": "object", "required": [ "value" ], "title": "TextAnswerDataResponse", "description": "Answer data for text-based question types (SHORT_ANSWER, LONG_ANSWER)." }, "ToolDefinition": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "parameters": { "additionalProperties": true, "type": "object", "title": "Parameters" } }, "type": "object", "required": [ "name", "description", "parameters" ], "title": "ToolDefinition" }, "ToolExecutionRequest": { "properties": { "tool_name": { "type": "string", "title": "Tool Name" }, "parameters": { "additionalProperties": true, "type": "object", "title": "Parameters" } }, "type": "object", "required": [ "tool_name", "parameters" ], "title": "ToolExecutionRequest" }, "ToolExecutionResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "result": { "title": "Result" }, "error": { "type": "string", "title": "Error" } }, "type": "object", "required": [ "success" ], "title": "ToolExecutionResponse" }, "ToolPermission": { "type": "string", "enum": [ "read", "write" ], "title": "ToolPermission" }, "UpgradeTierRequest": { "properties": { "new_tier": { "$ref": "#/components/schemas/SubscriptionTier" } }, "type": "object", "required": [ "new_tier" ], "title": "UpgradeTierRequest", "description": "Request to upgrade subscription tier." }, "UpgradeTierResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" }, "new_tier": { "$ref": "#/components/schemas/SubscriptionTier" }, "old_tier": { "$ref": "#/components/schemas/SubscriptionTier" } }, "type": "object", "required": [ "success", "message", "new_tier", "old_tier" ], "title": "UpgradeTierResponse", "description": "Response after tier upgrade." }, "UploadFileResponse": { "properties": { "filename": { "type": "string", "title": "Filename", "description": "Name of uploaded file" }, "size": { "type": "integer", "title": "Size", "description": "File size in bytes" }, "storagePath": { "type": "string", "title": "Storagepath", "description": "Storage path where file was uploaded" } }, "type": "object", "required": [ "filename", "size", "storagePath" ], "title": "UploadFileResponse", "description": "Response after uploading a file" }, "UploadManifestRequest": { "properties": { "manifest": { "additionalProperties": true, "type": "object", "title": "Manifest", "description": "Execution manifest JSON" } }, "type": "object", "required": [ "manifest" ], "title": "UploadManifestRequest", "description": "Request to upload execution manifest" }, "UploadManifestResponse": { "properties": { "storagePath": { "type": "string", "title": "Storagepath", "description": "Storage path where manifest was uploaded" }, "success": { "type": "boolean", "title": "Success", "description": "Whether upload succeeded" } }, "type": "object", "required": [ "storagePath", "success" ], "title": "UploadManifestResponse", "description": "Response after uploading manifest" }, "UsageStatsResponse": { "properties": { "companyId": { "type": "integer", "title": "Companyid" }, "tier": { "$ref": "#/components/schemas/SubscriptionTier" }, "cellOperations": { "type": "integer", "title": "Celloperations" }, "cellOperationsLimit": { "type": "integer", "title": "Celloperationslimit" }, "cellOperationsPercentage": { "type": "number", "title": "Celloperationspercentage", "description": "Percentage of monthly cell operations quota used" }, "agenticQa": { "type": "integer", "title": "Agenticqa" }, "agenticQaLimit": { "type": "integer", "title": "Agenticqalimit" }, "agenticQaPercentage": { "type": "number", "title": "Agenticqapercentage", "description": "Percentage of monthly agentic QA quota used" }, "workflows": { "type": "integer", "title": "Workflows" }, "workflowsLimit": { "type": "integer", "title": "Workflowslimit" }, "workflowsPercentage": { "type": "number", "title": "Workflowspercentage", "description": "Percentage of monthly workflows quota used" }, "storageBytes": { "type": "integer", "title": "Storagebytes" }, "storageBytesLimit": { "type": "integer", "title": "Storagebyteslimit" }, "storageBytesPercentage": { "type": "number", "title": "Storagebytespercentage", "description": "Percentage of monthly storage quota used" }, "agenticChunking": { "type": "integer", "title": "Agenticchunking" }, "agenticChunkingLimit": { "type": "integer", "title": "Agenticchunkinglimit" }, "agenticChunkingPercentage": { "type": "number", "title": "Agenticchunkingpercentage", "description": "Percentage of monthly AI document processing quota used" }, "documents": { "type": "integer", "title": "Documents" }, "documentsLimit": { "type": "integer", "title": "Documentslimit" }, "documentsPercentage": { "type": "number", "title": "Documentspercentage", "description": "Percentage of monthly document upload quota used" }, "periodStart": { "type": "string", "format": "date-time", "title": "Periodstart" }, "periodEnd": { "type": "string", "format": "date-time", "title": "Periodend" } }, "type": "object", "required": [ "companyId", "tier", "cellOperations", "cellOperationsLimit", "cellOperationsPercentage", "agenticQa", "agenticQaLimit", "agenticQaPercentage", "workflows", "workflowsLimit", "workflowsPercentage", "storageBytes", "storageBytesLimit", "storageBytesPercentage", "agenticChunking", "agenticChunkingLimit", "agenticChunkingPercentage", "documents", "documentsLimit", "documentsPercentage", "periodStart", "periodEnd" ], "title": "UsageStatsResponse", "description": "Complete usage statistics for the 5 quota types." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "WorkflowCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "triggerType": { "type": "string", "title": "Triggertype", "description": "Trigger type (manual)" }, "workspaceId": { "type": "integer", "title": "Workspaceid", "description": "Workspace ID" }, "outputType": { "type": "string", "title": "Outputtype", "description": "Output type (e.g., excel, pdf, docx)" } }, "type": "object", "required": [ "name", "triggerType", "workspaceId", "outputType" ], "title": "WorkflowCreate", "description": "Request to create a workflow" }, "WorkflowResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "companyId": { "type": "integer", "title": "Companyid" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "triggerType": { "type": "string", "title": "Triggertype" }, "workspaceId": { "type": "integer", "title": "Workspaceid" }, "outputType": { "type": "string", "title": "Outputtype" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "id", "companyId", "name", "triggerType", "workspaceId", "outputType", "createdAt", "updatedAt" ], "title": "WorkflowResponse", "description": "Response model for workflow" }, "WorkflowUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "triggerType": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Triggertype" }, "outputType": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Outputtype" } }, "type": "object", "title": "WorkflowUpdate", "description": "Request to update a workflow" }, "WorkspaceCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "name" ], "title": "WorkspaceCreate" }, "WorkspaceResponse": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "type": "integer", "title": "Id" }, "companyId": { "type": "integer", "title": "Companyid" }, "deleted": { "type": "boolean", "title": "Deleted" }, "createdAt": { "type": "string", "format": "date-time", "title": "Createdat" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "name", "id", "companyId", "deleted", "createdAt", "updatedAt" ], "title": "WorkspaceResponse" }, "WorkspaceUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "title": "WorkspaceUpdate" } } } }