{ "openapi": "3.1.0", "info": { "title": "Onyx API", "description": "Onyx API for AI-powered enterprise search and chat", "version": "Development" }, "servers": [ { "url": "https://cloud.onyx.app/api" } ], "paths": { "/chat/get-user-chat-sessions": { "get": { "tags": ["public"], "summary": "Get User Chat Sessions", "operationId": "get_user_chat_sessions", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Project Id" } }, { "name": "only_non_project_chats", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Only Non Project Chats" } }, { "name": "include_failed_chats", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Failed Chats" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatSessionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/chat/get-chat-session/{session_id}": { "get": { "tags": ["public"], "summary": "Get Chat Session", "operationId": "get_chat_session", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "is_shared", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Is Shared" } }, { "name": "include_deleted", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Deleted" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatSessionDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/chat/create-chat-session": { "post": { "tags": ["public"], "summary": "Create New Chat Session", "operationId": "create_new_chat_session", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatSessionCreationRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateChatSessionID" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/chat/delete-all-chat-sessions": { "delete": { "tags": ["public"], "summary": "Delete All Chat Sessions", "operationId": "delete_all_chat_sessions", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/chat/delete-chat-session/{session_id}": { "delete": { "tags": ["public"], "summary": "Delete Chat Session By Id", "operationId": "delete_chat_session_by_id", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "hard_delete", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Hard Delete" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/chat/send-chat-message": { "post": { "tags": ["public"], "summary": "Handle Send Chat Message", "description": "This endpoint is used to send a new chat message.\n\nArgs:\n chat_message_req (SendMessageRequest): Details about the new chat message.\n - When stream=True (default): Returns StreamingResponse with SSE\n - When stream=False: Returns ChatFullResponse with complete data\n request (Request): The current HTTP request context.\n user (User): The current user, obtained via dependency injection.\n _ (None): Rate limit check is run if user/group/global rate limits are enabled.\n\nReturns:\n StreamingResponse | ChatFullResponse: Either streams or returns complete response.", "operationId": "handle_send_chat_message", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendMessageRequest" } } } }, "responses": { "200": { "description": "If `stream=true`, returns `text/event-stream`.\nIf `stream=false`, returns `application/json` (ChatFullResponse).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatFullResponse" } }, "text/event-stream": { "schema": { "type": "string" }, "examples": { "stream": { "summary": "Stream of NDJSON AnswerStreamPart's", "value": "string" } } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/chat/seed-chat-session": { "post": { "tags": ["public"], "summary": "Seed Chat", "operationId": "seed_chat", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatSeedRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatSeedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/chat/file/{file_id}": { "get": { "tags": ["public"], "summary": "Fetch Chat File", "operationId": "fetch_chat_file", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/chat/search": { "get": { "tags": ["public"], "summary": "Search Chats", "description": "Search for chat sessions based on the provided query.\nIf no query is provided, returns recent chat sessions.", "operationId": "search_chats", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "query", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "default": 10, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/chat/stop-chat-session/{chat_session_id}": { "post": { "tags": ["public"], "summary": "Stop Chat Session", "description": "Stop a chat session by setting a stop signal in Redis.\nThis endpoint is called by the frontend when the user clicks the stop button.", "operationId": "stop_chat_session", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "chat_session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Chat Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Stop Chat Session Chat Stop Chat Session Chat Session Id Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/set-user-role": { "patch": { "tags": ["public"], "summary": "Set User Role", "operationId": "set_user_role", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRoleUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/users/accepted": { "get": { "tags": ["public"], "summary": "List Accepted Users", "operationId": "list_accepted_users", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Q" } }, { "name": "page_num", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Page Num" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 10, "title": "Page Size" } }, { "name": "roles", "in": "query", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserRole" }, "default": [], "title": "Roles" } }, { "name": "is_active", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedReturn_FullUserSnapshot_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/users/invited": { "get": { "tags": ["public"], "summary": "List Invited Users", "operationId": "list_invited_users", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvitedUserSnapshot" }, "title": "Response List Invited Users Manage Users Invited Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/users": { "get": { "tags": ["public"], "summary": "List All Users", "operationId": "list_all_users", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Q" } }, { "name": "accepted_page", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Accepted Page" } }, { "name": "slack_users_page", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Slack Users Page" } }, { "name": "invited_page", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Invited Page" } }, { "name": "include_api_keys", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Api Keys" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllUsersResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/users": { "put": { "tags": ["public"], "summary": "Bulk Invite Users", "description": "emails are string validated. If any email fails validation, no emails are\ninvited and an exception is raised.", "operationId": "bulk_invite_users", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Body_bulk_invite_users_manage_admin_users_put" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "integer", "title": "Response Bulk Invite Users Manage Admin Users Put" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/remove-invited-user": { "patch": { "tags": ["public"], "summary": "Remove Invited User", "operationId": "remove_invited_user", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserByEmail" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "integer", "title": "Response Remove Invited User Manage Admin Remove Invited User Patch" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/deactivate-user": { "patch": { "tags": ["public"], "summary": "Deactivate User Api", "operationId": "deactivate_user_api", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserByEmail" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/delete-user": { "delete": { "tags": ["public"], "summary": "Delete User", "operationId": "delete_user", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserByEmail" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/activate-user": { "patch": { "tags": ["public"], "summary": "Activate User Api", "operationId": "activate_user_api", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserByEmail" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/users": { "get": { "tags": ["public"], "summary": "List All Users Basic Info", "operationId": "list_all_users_basic_info", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MinimalUserSnapshot" }, "title": "Response List All Users Basic Info Users Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/get-user-role": { "get": { "tags": ["public"], "summary": "Get User Role", "operationId": "get_user_role", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRoleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/me": { "get": { "tags": ["public"], "summary": "Verify User Logged In", "operationId": "verify_user_logged_in", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/deletion-attempt": { "post": { "tags": ["public"], "summary": "Create Deletion Attempt For Connector Id", "operationId": "create_deletion_attempt_for_connector_id", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectorCredentialPairIdentifier" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/connector/file/upload": { "post": { "tags": ["public"], "summary": "Upload Files Api", "operationId": "upload_files_api", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_files_api_manage_admin_connector_file_upload_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/connector/{connector_id}/files": { "get": { "tags": ["public"], "summary": "List Connector Files", "description": "List all files in a file connector.", "operationId": "list_connector_files", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Connector Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectorFilesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/connector/{connector_id}/files/update": { "post": { "tags": ["public"], "summary": "Update Connector Files", "description": "Update files in a connector by adding new files and/or removing existing ones.\nThis is an atomic operation that validates, updates the connector config, and triggers indexing.", "operationId": "update_connector_files", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Connector Id" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_update_connector_files_manage_admin_connector__connector_id__files_update_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileUploadResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/connector": { "get": { "tags": ["public"], "summary": "Get Connectors By Credential", "description": "Get a list of connectors. Allow filtering by a specific credential id.", "operationId": "get_connectors_by_credential", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "credential", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Credential" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectorSnapshot" }, "title": "Response Get Connectors By Credential Manage Admin Connector Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["public"], "summary": "Create Connector From Model", "operationId": "create_connector_from_model", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectorUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectCreationIdResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/connector/failed-indexing-status": { "get": { "tags": ["public"], "summary": "Get Currently Failed Indexing Status", "operationId": "get_currently_failed_indexing_status", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "secondary_index", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Secondary Index" } }, { "name": "get_editable", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, return editable document sets", "default": false, "title": "Get Editable" }, "description": "If true, return editable document sets" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FailedConnectorIndexingStatus" }, "title": "Response Get Currently Failed Indexing Status Manage Admin Connector Failed Indexing Status Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/connector/status": { "get": { "tags": ["public"], "summary": "Get Connector Status", "operationId": "get_connector_status", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectorStatus" }, "title": "Response Get Connector Status Manage Admin Connector Status Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/connector/indexing-status": { "post": { "tags": ["public"], "summary": "Get Connector Indexing Status", "operationId": "get_connector_indexing_status", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IndexingStatusRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectorIndexingStatusLiteResponse" }, "title": "Response Get Connector Indexing Status Manage Admin Connector Indexing Status Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/connector/{connector_id}": { "patch": { "tags": ["public"], "summary": "Update Connector From Model", "operationId": "update_connector_from_model", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Connector Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectorUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ConnectorSnapshot" }, { "$ref": "#/components/schemas/StatusResponse_int_" } ], "title": "Response Update Connector From Model Manage Admin Connector Connector Id Patch" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["public"], "summary": "Delete Connector By Id", "operationId": "delete_connector_by_id", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Connector Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse_int_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/connector/run-once": { "post": { "tags": ["public"], "summary": "Connector Run Once", "description": "Used to trigger indexing on a set of cc_pairs associated with a\nsingle connector.", "operationId": "connector_run_once", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunConnectorRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse_int_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/connector": { "get": { "tags": ["public"], "summary": "Get Connectors", "operationId": "get_connectors", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectorSnapshot" }, "title": "Response Get Connectors Manage Connector Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/indexed-sources": { "get": { "tags": ["public"], "summary": "Get Indexed Sources", "operationId": "get_indexed_sources", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IndexedSourcesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/connector/{connector_id}": { "get": { "tags": ["public"], "summary": "Get Connector By Id", "operationId": "get_connector_by_id", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Connector Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ConnectorSnapshot" }, { "$ref": "#/components/schemas/StatusResponse_int_" } ], "title": "Response Get Connector By Id Manage Connector Connector Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/connector-status": { "get": { "tags": ["public"], "summary": "Get Basic Connector Indexing Status", "operationId": "get_basic_connector_indexing_status", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BasicCCPairInfo" }, "title": "Response Get Basic Connector Indexing Status Manage Connector Status Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/credential": { "get": { "tags": ["public"], "summary": "List Credentials Admin", "description": "Lists all public credentials", "operationId": "list_credentials_admin", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CredentialSnapshot" }, "title": "Response List Credentials Admin Manage Admin Credential Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/similar-credentials/{source_type}": { "get": { "tags": ["public"], "summary": "Get Cc Source Full Info", "operationId": "get_cc_source_full_info", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "source_type", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/DocumentSource" } }, { "name": "get_editable", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, return editable credentials", "default": false, "title": "Get Editable" }, "description": "If true, return editable credentials" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CredentialSnapshot" }, "title": "Response Get Cc Source Full Info Manage Admin Similar Credentials Source Type Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/credential/{credential_id}": { "delete": { "tags": ["public"], "summary": "Delete Credential By Id Admin", "description": "Same as the user endpoint, but can delete any credential (not just the user's own)", "operationId": "delete_credential_by_id_admin", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "credential_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Credential Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": ["public"], "summary": "Update Credential Data", "operationId": "update_credential_data", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "credential_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Credential Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialDataUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialBase" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/credential/swap": { "put": { "tags": ["public"], "summary": "Swap Credentials For Connector", "operationId": "swap_credentials_for_connector", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialSwapRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/credential": { "post": { "tags": ["public"], "summary": "Create Credential From Model", "operationId": "create_credential_from_model", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialBase" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectCreationIdResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": ["public"], "summary": "List Credentials", "operationId": "list_credentials", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CredentialSnapshot" }, "title": "Response List Credentials Manage Credential Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/credential/private-key": { "post": { "tags": ["public"], "summary": "Create Credential With Private Key", "operationId": "create_credential_with_private_key", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_create_credential_with_private_key_manage_credential_private_key_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectCreationIdResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/credential/{credential_id}": { "get": { "tags": ["public"], "summary": "Get Credential By Id", "operationId": "get_credential_by_id", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "credential_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Credential Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/CredentialSnapshot" }, { "$ref": "#/components/schemas/StatusResponse_int_" } ], "title": "Response Get Credential By Id Manage Credential Credential Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": ["public"], "summary": "Update Credential From Model", "operationId": "update_credential_from_model", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "credential_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Credential Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialBase" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/CredentialSnapshot" }, { "$ref": "#/components/schemas/StatusResponse_int_" } ], "title": "Response Update Credential From Model Manage Credential Credential Id Patch" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["public"], "summary": "Delete Credential By Id", "operationId": "delete_credential_by_id", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "credential_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Credential Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/credential/private-key/{credential_id}": { "put": { "tags": ["public"], "summary": "Update Credential Private Key", "operationId": "update_credential_private_key", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "credential_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Credential Id" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_update_credential_private_key_manage_admin_credential_private_key__credential_id__put" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialBase" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/credential/force/{credential_id}": { "delete": { "tags": ["public"], "summary": "Force Delete Credential By Id", "operationId": "force_delete_credential_by_id", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "credential_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Credential Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/cc-pair/{cc_pair_id}/index-attempts": { "get": { "tags": ["public"], "summary": "Get Cc Pair Index Attempts", "operationId": "get_cc_pair_index_attempts", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "cc_pair_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Cc Pair Id" } }, { "name": "page_num", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Page Num" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 10, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedReturn_IndexAttemptSnapshot_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/cc-pair/{cc_pair_id}": { "get": { "tags": ["public"], "summary": "Get Cc Pair Full Info", "operationId": "get_cc_pair_full_info", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "cc_pair_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Cc Pair Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CCPairFullInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/cc-pair/{cc_pair_id}/status": { "put": { "tags": ["public"], "summary": "Update Cc Pair Status", "description": "This method returns nearly immediately. It simply sets some signals and\noptimistically assumes any running background processes will clean themselves up.\nThis is done to improve the perceived end user experience.\n\nReturns HTTPStatus.OK if everything finished.", "operationId": "update_cc_pair_status", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "cc_pair_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Cc Pair Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CCStatusUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/cc-pair/{cc_pair_id}/prune": { "post": { "tags": ["public"], "summary": "Prune Cc Pair", "description": "Triggers pruning on a particular cc_pair immediately", "operationId": "prune_cc_pair", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "cc_pair_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Cc Pair Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse_list_int__" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/cc-pair/{cc_pair_id}/errors": { "get": { "tags": ["public"], "summary": "Get Cc Pair Indexing Errors", "description": "Gives back all errors for a given CC Pair. Allows pagination based on page and page_size params.\n\nArgs:\n cc_pair_id: ID of the connector-credential pair to get errors for\n include_resolved: Whether to include resolved errors in the results\n page_num: Page number for pagination, starting at 0\n page_size: Number of errors to return per page\n _: Current user, must be curator or admin\n db_session: Database session\n\nReturns:\n Paginated list of indexing errors for the CC pair.", "operationId": "get_cc_pair_indexing_errors", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "cc_pair_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Cc Pair Id" } }, { "name": "include_resolved", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Resolved" } }, { "name": "page_num", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Page Num" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedReturn_IndexAttemptErrorPydantic_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/connector/{connector_id}/credential/{credential_id}": { "put": { "tags": ["public"], "summary": "Associate Credential To Connector", "description": "NOTE(rkuo): internally discussed and the consensus is this endpoint\nand create_connector_with_mock_credential should be combined.\n\nThe intent of this endpoint is to handle connectors that actually need credentials.", "operationId": "associate_credential_to_connector", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Connector Id" } }, { "name": "credential_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Credential Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectorCredentialPairMetadata" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse_int_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["public"], "summary": "Dissociate Credential From Connector", "operationId": "dissociate_credential_from_connector", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Connector Id" } }, { "name": "credential_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Credential Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse_int_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/": { "get": { "tags": ["public"], "summary": "Get Projects", "operationId": "get_projects", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserProjectSnapshot" }, "title": "Response Get Projects User Projects Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/create": { "post": { "tags": ["public"], "summary": "Create Project", "operationId": "create_project", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string", "title": "Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserProjectSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/file/upload": { "post": { "tags": ["public"], "summary": "Upload User Files", "operationId": "upload_user_files", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_user_files_user_projects_file_upload_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategorizedFilesSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/{project_id}": { "get": { "tags": ["public"], "summary": "Get Project", "operationId": "get_project", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Project Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserProjectSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": ["public"], "summary": "Update Project", "operationId": "update_project", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Project Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProjectRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserProjectSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["public"], "summary": "Delete Project", "operationId": "delete_project", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Project Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/files/{project_id}": { "get": { "tags": ["public"], "summary": "Get Files In Project", "operationId": "get_files_in_project", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Project Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserFileSnapshot" }, "title": "Response Get Files In Project User Projects Files Project Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/{project_id}/files/{file_id}": { "delete": { "tags": ["public"], "summary": "Unlink User File From Project", "description": "Unlink an existing user file from a specific project for the current user.\n\nDoes not delete the underlying file; only removes the association.", "operationId": "unlink_user_file_from_project", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Project Id" } }, { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "File Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["public"], "summary": "Link User File To Project", "description": "Link an existing user file to a specific project for the current user.\n\nCreates the association in the Project__UserFile join table if it does not exist.\nReturns the linked user file snapshot.", "operationId": "link_user_file_to_project", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Project Id" } }, { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "File Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserFileSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/{project_id}/instructions": { "get": { "tags": ["public"], "summary": "Get Project Instructions", "operationId": "get_project_instructions", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Project Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectInstructionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["public"], "summary": "Upsert Project Instructions", "description": "Create or update this project's instructions stored on the project itself.", "operationId": "upsert_project_instructions", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Project Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertProjectInstructionsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectInstructionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/{project_id}/details": { "get": { "tags": ["public"], "summary": "Get Project Details", "operationId": "get_project_details", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Project Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectPayload" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/file/{file_id}": { "delete": { "tags": ["public"], "summary": "Delete User File", "description": "Delete a user file belonging to the current user.\n\nThis will also remove any project associations for the file.", "operationId": "delete_user_file", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "File Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserFileDeleteResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": ["public"], "summary": "Get User File", "description": "Fetch a single user file by ID for the current user.\n\nIncludes files in any status (including FAILED) to allow status polling.", "operationId": "get_user_file", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "File Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserFileSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/file/statuses": { "post": { "tags": ["public"], "summary": "Get User File Statuses", "description": "Fetch statuses for a set of user file IDs owned by the current user.\n\nIncludes files in any status so the client can detect transitions to FAILED.", "operationId": "get_user_file_statuses", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserFileIdsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserFileSnapshot" }, "title": "Response Get User File Statuses User Projects File Statuses Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/user/projects/session/{chat_session_id}/files": { "get": { "tags": ["public"], "summary": "Get Chat Session Project Files", "description": "Return user files for the project linked to the given chat session.\n\nIf the chat session has no project, returns an empty list.\nOnly returns files owned by the current user and not FAILED.", "operationId": "get_chat_session_project_files", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "chat_session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Chat Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserFileSnapshot" }, "title": "Response Get Chat Session Project Files User Projects Session Chat Session Id Files Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/persona": { "post": { "tags": ["public"], "summary": "Create Persona", "operationId": "create_persona", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaUpsertRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/persona/{persona_id}": { "patch": { "tags": ["public"], "summary": "Update Persona", "operationId": "update_persona", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Persona Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaUpsertRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["public"], "summary": "Delete Persona", "operationId": "delete_persona", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": ["public"], "summary": "Get Persona", "operationId": "get_persona", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FullPersonaSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/persona": { "get": { "tags": ["public"], "summary": "List Personas Admin", "operationId": "list_personas_admin", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "include_deleted", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Deleted" } }, { "name": "get_editable", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, return editable personas", "default": false, "title": "Get Editable" }, "description": "If true, return editable personas" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PersonaSnapshot" }, "title": "Response List Personas Admin Admin Persona Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/persona/{persona_id}/undelete": { "patch": { "tags": ["public"], "summary": "Undelete Persona", "operationId": "undelete_persona", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/agents": { "get": { "tags": ["public"], "summary": "Get Agents Paginated", "description": "Paginated endpoint for listing agents available to the user.\n\nReturns items for the requested page plus total count.\nPersonas are ordered by display_priority (ASC, nulls last) then by ID (ASC).\n\nNOTE: persona_ids filter is not supported with pagination. Use the\nnon-paginated endpoint if filtering by specific IDs is needed.", "operationId": "get_agents_paginated", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "page_num", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Page number (0-indexed).", "default": 0, "title": "Page Num" }, "description": "Page number (0-indexed)." }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "description": "Items per page.", "default": 10, "title": "Page Size" }, "description": "Items per page." }, { "name": "include_deleted", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, includes deleted personas.", "default": false, "title": "Include Deleted" }, "description": "If true, includes deleted personas." }, { "name": "get_editable", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, only returns editable personas.", "default": false, "title": "Get Editable" }, "description": "If true, only returns editable personas." }, { "name": "include_default", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, includes builtin/default personas.", "default": true, "title": "Include Default" }, "description": "If true, includes builtin/default personas." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedReturn_MinimalPersonaSnapshot_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/agents": { "get": { "tags": ["public"], "summary": "Get Agents Admin Paginated", "description": "Paginated endpoint for listing agents (formerly personas) (admin view).\n\nReturns items for the requested page plus total count.\nAgents are ordered by display_priority (ASC, nulls last) then by ID (ASC).", "operationId": "get_agents_admin_paginated", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "page_num", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Page number (0-indexed).", "default": 0, "title": "Page Num" }, "description": "Page number (0-indexed)." }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "description": "Items per page.", "default": 10, "title": "Page Size" }, "description": "Items per page." }, { "name": "include_deleted", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, includes deleted personas.", "default": false, "title": "Include Deleted" }, "description": "If true, includes deleted personas." }, { "name": "get_editable", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, only returns editable personas.", "default": false, "title": "Get Editable" }, "description": "If true, only returns editable personas." }, { "name": "include_default", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, includes builtin/default personas.", "default": true, "title": "Include Default" }, "description": "If true, includes builtin/default personas." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedReturn_PersonaSnapshot_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tool/openapi": { "get": { "tags": ["public"], "summary": "List Openapi Tools", "operationId": "list_openapi_tools", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ToolSnapshot" }, "title": "Response List Openapi Tools Tool Openapi Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tool/{tool_id}": { "get": { "tags": ["public"], "summary": "Get Custom Tool", "operationId": "get_custom_tool", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Tool Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tool": { "get": { "tags": ["public"], "summary": "List Tools", "operationId": "list_tools", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ToolSnapshot" }, "title": "Response List Tools Tool Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/tool/custom": { "post": { "tags": ["public"], "summary": "Create Custom Tool", "operationId": "create_custom_tool", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomToolCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/tool/custom/{tool_id}": { "put": { "tags": ["public"], "summary": "Update Custom Tool", "operationId": "update_custom_tool", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Tool Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomToolUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["public"], "summary": "Delete Custom Tool", "operationId": "delete_custom_tool", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Tool Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/tool/custom/validate": { "post": { "tags": ["public"], "summary": "Validate Tool", "operationId": "validate_tool", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateToolRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateToolResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/health": { "get": { "tags": ["public"], "summary": "Healthcheck", "operationId": "healthcheck", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse" } } } } } } }, "/auth/type": { "get": { "tags": ["public"], "summary": "Get Auth Type", "operationId": "get_auth_type", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthTypeResponse" } } } } } } }, "/version": { "get": { "tags": ["public"], "summary": "Get Version", "operationId": "get_version", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VersionResponse" } } } } } } }, "/versions": { "get": { "tags": ["public"], "summary": "Get Versions", "description": "Fetches the latest stable and beta versions of Onyx Docker images.\nSince DockerHub does not explicitly flag stable and beta images,\nthis endpoint can be used to programmatically check for new images.", "operationId": "get_versions", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllVersions" } } } } } } }, "/onyx-api/connector-docs/{cc_pair_id}": { "get": { "tags": ["public"], "summary": "Get Docs By Connector Credential Pair", "operationId": "get_docs_by_connector_credential_pair", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "cc_pair_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Cc Pair Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocMinimalInfo" }, "title": "Response Get Docs By Connector Credential Pair Onyx Api Connector Docs Cc Pair Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/onyx-api/ingestion": { "get": { "tags": ["public"], "summary": "Get Ingestion Docs", "operationId": "get_ingestion_docs", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocMinimalInfo" }, "title": "Response Get Ingestion Docs Onyx Api Ingestion Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["public"], "summary": "Upsert Ingestion Doc", "operationId": "upsert_ingestion_doc", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestionDocument" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestionResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/onyx-api/ingestion/{document_id}": { "delete": { "tags": ["public"], "summary": "Delete Ingestion Doc", "operationId": "delete_ingestion_doc", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "document_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Document Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/web-search/search": { "post": { "tags": ["public"], "summary": "Execute Web Search", "description": "Perform a web search and immediately fetch content for the returned URLs.\n\nUse this when you want both snippets and page contents from one call.\n\nIf you want to selectively fetch content (i.e. let the LLM decide which URLs to read),\nuse `/search-lite` and then call `/open-urls` separately.", "operationId": "execute_web_search", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebSearchToolRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebSearchWithContentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/web-search/search-lite": { "post": { "tags": ["public"], "summary": "Execute Web Search Lite", "description": "Lightweight search-only endpoint. Returns search snippets and URLs without\nfetching page contents. Pair with `/open-urls` if you need to fetch content\nlater.", "operationId": "execute_web_search_lite", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebSearchToolRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebSearchToolResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/web-search/open-urls": { "post": { "tags": ["public"], "summary": "Execute Open Urls", "description": "Fetch content for specific URLs using the configured content provider.\nIntended to complement `/search-lite` when you need content for a subset of URLs.", "operationId": "execute_open_urls", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenUrlsToolRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenUrlsToolResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/search": { "post": { "summary": "Search", "operationId": "search", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "tags": ["public"], "description": "Run Onyx's internal search and get back ranked document sections, with no LLM answer generated.\n\nThis is the same multi-stage retrieval pipeline the chat Search action uses: query expansion, hybrid retrieval, reranking and section merging. Results are ordered most relevant first and are always filtered by the calling user's document permissions." } }, "/search/send-search-message": { "post": { "summary": "Handle Send Search Message", "description": "Executes a search query with optional streaming.\n\nIf hybrid_alpha is unset and ONYX_SEARCH_UI_USES_OPENSEARCH_KEYWORD_SEARCH\nis True, executes pure keyword search.\n\nReturns:\n StreamingResponse with SSE if stream=True, otherwise SearchFullResponse.", "operationId": "handle_send_search_message", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendSearchQueryRequest" } } } }, "responses": { "200": { "description": "If `stream=true`, returns `text/event-stream`.\nIf `stream=false` (the default), returns `application/json` (SearchFullResponse).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchFullResponse" } }, "text/event-stream": { "schema": { "type": "string" }, "examples": { "stream": { "summary": "Stream of NDJSON search packets", "value": "string" } } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "tags": ["public"] } }, "/search/search-history": { "get": { "summary": "Get Search History", "description": "Fetch past search queries for the authenticated user.\n\nArgs:\n limit: Maximum number of queries to return (default 100)\n filter_days: Only return queries from the last N days (optional)\n\nReturns:\n SearchHistoryResponse with list of search queries, ordered by most recent first.", "operationId": "get_search_history", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" }, "description": "Maximum number of queries to return, from 1 to 1000." }, { "name": "filter_days", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Filter Days" }, "description": "Only return queries from the last N days. Omit for no time limit." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchHistoryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "tags": ["public"] } }, "/search/search-flow-classification": { "post": { "summary": "Search Flow Classification", "operationId": "search_flow_classification", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchFlowClassificationRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchFlowClassificationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "tags": ["public"], "description": "Classify whether a query should be answered by search or by chat. This powers the query bar in the Onyx Search UI.\n\nQueries longer than 200 characters are classified as a chat flow without calling an LLM. If classification fails, the endpoint falls back to `is_search_flow: false` rather than erroring." } }, "/admin/token-rate-limits/global": { "get": { "tags": ["public"], "summary": "Get Global Token Limit Settings", "operationId": "get_global_token_limit_settings", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TokenRateLimitDisplay" }, "title": "Response Get Global Token Limit Settings Admin Token Rate Limits Global Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["public"], "summary": "Create Global Token Limit Settings", "operationId": "create_global_token_limit_settings", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenRateLimitArgs" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenRateLimitDisplay" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/token-rate-limits/rate-limit/{token_rate_limit_id}": { "put": { "tags": ["public"], "summary": "Update Token Limit Settings", "operationId": "update_token_limit_settings", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "token_rate_limit_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Token Rate Limit Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenRateLimitArgs" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenRateLimitDisplay" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["public"], "summary": "Delete Token Limit Settings", "operationId": "delete_token_limit_settings", "security": [ { "BearerAuth": [] } ], "parameters": [ { "name": "token_rate_limit_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Token Rate Limit Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/me/permissions": { "get": { "tags": ["public"], "summary": "Get Current User Permissions", "operationId": "get_current_user_permissions", "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPermissionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/manage/admin/users/admin-access": { "patch": { "tags": ["public"], "summary": "Set User Admin Access Endpoint", "operationId": "set_user_admin_access_endpoint", "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserAdminAccessUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "CCPairSummary": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "source": { "$ref": "#/components/schemas/DocumentSource" }, "access_type": { "$ref": "#/components/schemas/AccessType" } }, "type": "object", "required": ["id", "name", "source", "access_type"], "title": "CCPairSummary", "description": "Simplified connector-credential pair information with just essential data" }, "CredentialDataUpdateRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "credential_json": { "additionalProperties": true, "type": "object", "title": "Credential Json" } }, "type": "object", "required": ["name", "credential_json"], "title": "CredentialDataUpdateRequest" }, "CitationInfo": { "properties": { "type": { "type": "string", "const": "citation_info", "title": "Type", "default": "citation_info" }, "citation_number": { "type": "integer", "title": "Citation Number" }, "document_id": { "type": "string", "title": "Document Id" } }, "type": "object", "required": ["citation_number", "document_id"], "title": "CitationInfo" }, "IngestionDocument": { "properties": { "document": { "$ref": "#/components/schemas/DocumentBase" }, "cc_pair_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Cc Pair Id" } }, "type": "object", "required": ["document"], "title": "IngestionDocument" }, "FullUserSnapshot": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "email": { "type": "string", "title": "Email" }, "role": { "$ref": "#/components/schemas/UserRole" }, "is_active": { "type": "boolean", "title": "Is Active" }, "password_configured": { "type": "boolean", "title": "Password Configured" } }, "type": "object", "required": ["id", "email", "role", "is_active", "password_configured"], "title": "FullUserSnapshot" }, "ChatSessionSummary": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "persona_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Persona Id" }, "time_created": { "type": "string", "format": "date-time", "title": "Time Created" }, "shared_status": { "$ref": "#/components/schemas/ChatSessionSharedStatus" }, "current_alternate_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Alternate Model" }, "current_temperature_override": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Current Temperature Override" } }, "type": "object", "required": ["id", "time_created", "shared_status"], "title": "ChatSessionSummary" }, "UserFileDeleteResult": { "properties": { "has_associations": { "type": "boolean", "title": "Has Associations" }, "project_names": { "items": { "type": "string" }, "type": "array", "title": "Project Names", "default": [] }, "assistant_names": { "items": { "type": "string" }, "type": "array", "title": "Assistant Names", "default": [] } }, "type": "object", "required": ["has_associations"], "title": "UserFileDeleteResult" }, "ConnectorFilesResponse": { "properties": { "files": { "items": { "$ref": "#/components/schemas/ConnectorFileInfo" }, "type": "array", "title": "Files" } }, "type": "object", "required": ["files"], "title": "ConnectorFilesResponse" }, "BaseFilters": { "properties": { "source_type": { "anyOf": [ { "items": { "$ref": "#/components/schemas/DocumentSource" }, "type": "array" }, { "type": "null" } ], "title": "Source Type" }, "document_set": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Document Set" }, "created_at_range": { "anyOf": [ { "$ref": "#/components/schemas/TimeRange" }, { "type": "null" } ] }, "updated_at_range": { "anyOf": [ { "$ref": "#/components/schemas/TimeRange" }, { "type": "null" } ] }, "tags": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Tag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "time_cutoff": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Time Cutoff" } }, "type": "object", "title": "BaseFilters" }, "UserFileStatus": { "type": "string", "enum": ["PROCESSING", "COMPLETED", "FAILED", "CANCELED", "DELETING"], "title": "UserFileStatus" }, "ValidateToolRequest": { "properties": { "definition": { "additionalProperties": true, "type": "object", "title": "Definition" } }, "type": "object", "required": ["definition"], "title": "ValidateToolRequest" }, "CredentialBase": { "properties": { "credential_json": { "additionalProperties": true, "type": "object", "title": "Credential Json" }, "admin_public": { "type": "boolean", "title": "Admin Public" }, "source": { "$ref": "#/components/schemas/DocumentSource" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "curator_public": { "type": "boolean", "title": "Curator Public", "default": false }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups" } }, "type": "object", "required": ["credential_json", "admin_public", "source"], "title": "CredentialBase" }, "DocumentSource": { "type": "string", "enum": [ "ingestion_api", "slack", "web", "google_drive", "gmail", "github", "gitbook", "gitlab", "guru", "bookstack", "outline", "confluence", "jira", "slab", "productboard", "file", "coda", "canvas", "notion", "zulip", "linear", "hubspot", "document360", "gong", "google_sites", "zendesk", "loopio", "box", "dropbox", "sharepoint", "teams", "salesforce", "discourse", "axero", "clickup", "mediawiki", "wikipedia", "asana", "s3", "r2", "google_cloud_storage", "oci_storage", "xenforo", "not_applicable", "discord", "freshdesk", "fireflies", "egnyte", "airtable", "highspot", "drupal_wiki", "imap", "bitbucket", "testrail", "braintrust", "lumapps", "mock_connector", "user_file", "craft_file" ], "title": "DocumentSource" }, "StatusResponse_int_": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "data": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Data" } }, "type": "object", "required": ["success"], "title": "StatusResponse[int]" }, "WebSearchWithContentResponse": { "properties": { "search_provider_type": { "$ref": "#/components/schemas/WebSearchProviderType" }, "content_provider_type": { "anyOf": [ { "$ref": "#/components/schemas/WebContentProviderType" }, { "type": "null" } ] }, "search_results": { "items": { "$ref": "#/components/schemas/LlmWebSearchResult" }, "type": "array", "title": "Search Results" }, "full_content_results": { "items": { "$ref": "#/components/schemas/LlmOpenUrlResult" }, "type": "array", "title": "Full Content Results" } }, "type": "object", "required": [ "search_provider_type", "search_results", "full_content_results" ], "title": "WebSearchWithContentResponse" }, "TenantSnapshot": { "properties": { "number_of_users": { "type": "integer", "title": "Number Of Users" } }, "type": "object", "required": ["number_of_users"], "title": "TenantSnapshot" }, "IntermediateReportStart": { "properties": { "type": { "type": "string", "const": "intermediate_report_start", "title": "Type", "default": "intermediate_report_start" } }, "type": "object", "title": "IntermediateReportStart" }, "UserProjectSnapshot": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Id" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "chat_sessions": { "items": { "$ref": "#/components/schemas/ChatSessionDetails" }, "type": "array", "title": "Chat Sessions" } }, "type": "object", "required": [ "id", "name", "description", "created_at", "user_id", "chat_sessions" ], "title": "UserProjectSnapshot" }, "IndexingStatus": { "type": "string", "enum": [ "not_started", "in_progress", "success", "canceled", "failed", "completed_with_errors" ], "title": "IndexingStatus" }, "CustomToolDelta": { "properties": { "type": { "type": "string", "const": "custom_tool_delta", "title": "Type", "default": "custom_tool_delta" }, "tool_name": { "type": "string", "title": "Tool Name" }, "response_type": { "type": "string", "title": "Response Type" }, "data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "items": {}, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" } ], "title": "Data" }, "file_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "File Ids" } }, "type": "object", "required": ["tool_name", "response_type"], "title": "CustomToolDelta" }, "ImageGenerationToolHeartbeat": { "properties": { "type": { "type": "string", "const": "image_generation_heartbeat", "title": "Type", "default": "image_generation_heartbeat" } }, "type": "object", "title": "ImageGenerationToolHeartbeat" }, "ValidateToolResponse": { "properties": { "methods": { "items": { "$ref": "#/components/schemas/MethodSpec" }, "type": "array", "title": "Methods" } }, "type": "object", "required": ["methods"], "title": "ValidateToolResponse" }, "CredentialSnapshot": { "properties": { "credential_json": { "additionalProperties": true, "type": "object", "title": "Credential Json" }, "admin_public": { "type": "boolean", "title": "Admin Public" }, "source": { "$ref": "#/components/schemas/DocumentSource" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "curator_public": { "type": "boolean", "title": "Curator Public", "default": false }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups" }, "id": { "type": "integer", "title": "Id" }, "user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Id" }, "user_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Email" }, "time_created": { "type": "string", "format": "date-time", "title": "Time Created" }, "time_updated": { "type": "string", "format": "date-time", "title": "Time Updated" } }, "type": "object", "required": [ "credential_json", "admin_public", "source", "id", "user_id", "time_created", "time_updated" ], "title": "CredentialSnapshot" }, "Header": { "properties": { "key": { "type": "string", "title": "Key" }, "value": { "type": "string", "title": "Value" } }, "type": "object", "required": ["key", "value"], "title": "Header" }, "Placement": { "properties": { "turn_index": { "type": "integer", "title": "Turn Index" }, "tab_index": { "type": "integer", "title": "Tab Index", "default": 0 }, "sub_turn_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sub Turn Index" } }, "type": "object", "required": ["turn_index"], "title": "Placement" }, "ObjectCreationIdResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "credential": { "anyOf": [ { "$ref": "#/components/schemas/CredentialSnapshot" }, { "type": "null" } ] } }, "type": "object", "required": ["id"], "title": "ObjectCreationIdResponse" }, "OpenUrlUrls": { "properties": { "type": { "type": "string", "const": "open_url_urls", "title": "Type", "default": "open_url_urls" }, "urls": { "items": { "type": "string" }, "type": "array", "title": "Urls" } }, "type": "object", "required": ["urls"], "title": "OpenUrlUrls", "description": "URLs to be fetched (sent before crawling begins)." }, "DeletionAttemptSnapshot": { "properties": { "connector_id": { "type": "integer", "title": "Connector Id" }, "credential_id": { "type": "integer", "title": "Credential Id" }, "status": { "$ref": "#/components/schemas/TaskStatus" } }, "type": "object", "required": ["connector_id", "credential_id", "status"], "title": "DeletionAttemptSnapshot" }, "UserInfo": { "properties": { "id": { "type": "string", "title": "Id" }, "email": { "type": "string", "title": "Email" }, "is_active": { "type": "boolean", "title": "Is Active" }, "is_superuser": { "type": "boolean", "title": "Is Superuser" }, "is_verified": { "type": "boolean", "title": "Is Verified" }, "role": { "$ref": "#/components/schemas/UserRole" }, "preferences": { "$ref": "#/components/schemas/UserPreferences" }, "personalization": { "$ref": "#/components/schemas/UserPersonalization" }, "oidc_expiry": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Oidc Expiry" }, "current_token_created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Current Token Created At" }, "current_token_expiry_length": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Current Token Expiry Length" }, "is_cloud_superuser": { "type": "boolean", "title": "Is Cloud Superuser", "default": false }, "team_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Team Name" }, "is_anonymous_user": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Anonymous User" }, "password_configured": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Password Configured" }, "tenant_info": { "anyOf": [ { "$ref": "#/components/schemas/TenantInfo" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "email", "is_active", "is_superuser", "is_verified", "role", "preferences" ], "title": "UserInfo" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "ConnectorSnapshot": { "properties": { "name": { "type": "string", "title": "Name" }, "source": { "$ref": "#/components/schemas/DocumentSource" }, "input_type": { "$ref": "#/components/schemas/InputType" }, "connector_specific_config": { "additionalProperties": true, "type": "object", "title": "Connector Specific Config" }, "refresh_freq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Refresh Freq" }, "prune_freq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Prune Freq" }, "indexing_start": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Indexing Start" }, "id": { "type": "integer", "title": "Id" }, "credential_ids": { "items": { "type": "integer" }, "type": "array", "title": "Credential Ids" }, "time_created": { "type": "string", "format": "date-time", "title": "Time Created" }, "time_updated": { "type": "string", "format": "date-time", "title": "Time Updated" } }, "type": "object", "required": [ "name", "source", "input_type", "connector_specific_config", "id", "credential_ids", "time_created", "time_updated" ], "title": "ConnectorSnapshot" }, "IndexedSourcesResponse": { "properties": { "sources": { "items": { "$ref": "#/components/schemas/DocumentSource" }, "type": "array", "title": "Sources" } }, "type": "object", "required": ["sources"], "title": "IndexedSourcesResponse" }, "Body_update_credential_private_key_manage_admin_credential_private_key__credential_id__put": { "properties": { "name": { "type": "string", "title": "Name" }, "credential_json": { "type": "string", "title": "Credential Json" }, "uploaded_file": { "type": "string", "format": "binary", "title": "Uploaded File" }, "field_key": { "type": "string", "title": "Field Key" }, "type_definition_key": { "type": "string", "title": "Type Definition Key" } }, "type": "object", "required": [ "name", "credential_json", "uploaded_file", "field_key", "type_definition_key" ], "title": "Body_update_credential_private_key_manage_admin_credential_private_key__credential_id__put" }, "RunConnectorRequest": { "properties": { "connector_id": { "type": "integer", "title": "Connector Id" }, "credential_ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Credential Ids" }, "from_beginning": { "type": "boolean", "title": "From Beginning", "default": false } }, "type": "object", "required": ["connector_id"], "title": "RunConnectorRequest" }, "PermissionSyncStatus": { "type": "string", "enum": [ "not_started", "in_progress", "success", "canceled", "failed", "completed_with_errors" ], "title": "PermissionSyncStatus", "description": "Status enum for permission sync attempts" }, "ThemePreference": { "type": "string", "enum": ["light", "dark", "system"], "title": "ThemePreference" }, "OpenUrlStart": { "properties": { "type": { "type": "string", "const": "open_url_start", "title": "Type", "default": "open_url_start" } }, "type": "object", "title": "OpenUrlStart", "description": "Signal that OpenURL tool has started." }, "FederatedConnectorSummary": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "source": { "$ref": "#/components/schemas/FederatedConnectorSource" }, "entities": { "additionalProperties": true, "type": "object", "title": "Entities" } }, "type": "object", "required": ["id", "name", "source", "entities"], "title": "FederatedConnectorSummary", "description": "Simplified federated connector information with just essential data" }, "InputType": { "type": "string", "enum": ["load_state", "poll", "event", "slim_retrieval"], "title": "InputType" }, "UserRoleResponse": { "properties": { "role": { "type": "string", "title": "Role" } }, "type": "object", "required": ["role"], "title": "UserRoleResponse" }, "Body_create_credential_with_private_key_manage_credential_private_key_post": { "properties": { "credential_json": { "type": "string", "title": "Credential Json" }, "admin_public": { "type": "boolean", "title": "Admin Public", "default": false }, "curator_public": { "type": "boolean", "title": "Curator Public", "default": false }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups", "default": [] }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "source": { "type": "string", "title": "Source" }, "uploaded_file": { "type": "string", "format": "binary", "title": "Uploaded File" }, "field_key": { "type": "string", "title": "Field Key" }, "type_definition_key": { "type": "string", "title": "Type Definition Key" } }, "type": "object", "required": [ "credential_json", "source", "uploaded_file", "field_key", "type_definition_key" ], "title": "Body_create_credential_with_private_key_manage_credential_private_key_post" }, "SearchToolDocumentsDelta": { "properties": { "type": { "type": "string", "const": "search_tool_documents_delta", "title": "Type", "default": "search_tool_documents_delta" }, "documents": { "items": { "$ref": "#/components/schemas/SearchDoc" }, "type": "array", "title": "Documents" } }, "type": "object", "required": ["documents"], "title": "SearchToolDocumentsDelta" }, "PythonToolDelta": { "properties": { "type": { "type": "string", "const": "python_tool_delta", "title": "Type", "default": "python_tool_delta" }, "stdout": { "type": "string", "title": "Stdout", "default": "" }, "stderr": { "type": "string", "title": "Stderr", "default": "" }, "file_ids": { "items": { "type": "string" }, "type": "array", "title": "File Ids", "default": [] } }, "type": "object", "title": "PythonToolDelta" }, "Body_upload_files_api_manage_admin_connector_file_upload_post": { "properties": { "files": { "items": { "type": "string", "format": "binary" }, "type": "array", "title": "Files" } }, "type": "object", "required": ["files"], "title": "Body_upload_files_api_manage_admin_connector_file_upload_post" }, "IndexAttemptSnapshot": { "properties": { "id": { "type": "integer", "title": "Id" }, "status": { "anyOf": [ { "$ref": "#/components/schemas/IndexingStatus" }, { "type": "null" } ] }, "from_beginning": { "type": "boolean", "title": "From Beginning" }, "new_docs_indexed": { "type": "integer", "title": "New Docs Indexed" }, "total_docs_indexed": { "type": "integer", "title": "Total Docs Indexed" }, "docs_removed_from_index": { "type": "integer", "title": "Docs Removed From Index" }, "error_msg": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Msg" }, "error_count": { "type": "integer", "title": "Error Count" }, "full_exception_trace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Full Exception Trace" }, "time_started": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Time Started" }, "time_updated": { "type": "string", "title": "Time Updated" }, "poll_range_start": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Poll Range Start" }, "poll_range_end": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Poll Range End" } }, "type": "object", "required": [ "id", "status", "from_beginning", "new_docs_indexed", "total_docs_indexed", "docs_removed_from_index", "error_msg", "error_count", "full_exception_trace", "time_started", "time_updated" ], "title": "IndexAttemptSnapshot" }, "PaginatedReturn_PersonaSnapshot_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PersonaSnapshot" }, "type": "array", "title": "Items" }, "total_items": { "type": "integer", "title": "Total Items" } }, "type": "object", "required": ["items", "total_items"], "title": "PaginatedReturn[PersonaSnapshot]" }, "ChatSessionGroup": { "properties": { "title": { "type": "string", "title": "Title" }, "chats": { "items": { "$ref": "#/components/schemas/ChatSessionSummary" }, "type": "array", "title": "Chats" } }, "type": "object", "required": ["title", "chats"], "title": "ChatSessionGroup" }, "IndexAttemptErrorPydantic": { "properties": { "id": { "type": "integer", "title": "Id" }, "connector_credential_pair_id": { "type": "integer", "title": "Connector Credential Pair Id" }, "document_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Document Id" }, "document_link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Document Link" }, "entity_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entity Id" }, "failed_time_range_start": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Failed Time Range Start" }, "failed_time_range_end": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Failed Time Range End" }, "failure_message": { "type": "string", "title": "Failure Message" }, "is_resolved": { "type": "boolean", "title": "Is Resolved", "default": false }, "time_created": { "type": "string", "format": "date-time", "title": "Time Created" }, "index_attempt_id": { "type": "integer", "title": "Index Attempt Id" } }, "type": "object", "required": [ "id", "connector_credential_pair_id", "document_id", "document_link", "entity_id", "failed_time_range_start", "failed_time_range_end", "failure_message", "time_created", "index_attempt_id" ], "title": "IndexAttemptErrorPydantic" }, "FederatedConnectorSource": { "type": "string", "enum": ["federated_slack"], "title": "FederatedConnectorSource" }, "ReasoningDone": { "properties": { "type": { "type": "string", "const": "reasoning_done", "title": "Type", "default": "reasoning_done" } }, "type": "object", "title": "ReasoningDone" }, "UserByEmail": { "properties": { "user_email": { "type": "string", "title": "User Email" } }, "type": "object", "required": ["user_email"], "title": "UserByEmail" }, "AllVersions": { "properties": { "stable": { "$ref": "#/components/schemas/ContainerVersions" }, "dev": { "$ref": "#/components/schemas/ContainerVersions" }, "migration": { "$ref": "#/components/schemas/ContainerVersions" } }, "type": "object", "required": ["stable", "dev", "migration"], "title": "AllVersions" }, "OpenUrlsToolResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/LlmOpenUrlResult" }, "type": "array", "title": "Results" }, "provider_type": { "anyOf": [ { "$ref": "#/components/schemas/WebContentProviderType" }, { "type": "null" } ] } }, "type": "object", "required": ["results"], "title": "OpenUrlsToolResponse" }, "DocumentBase": { "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Id" }, "sections": { "items": { "anyOf": [ { "$ref": "#/components/schemas/TextSection" }, { "$ref": "#/components/schemas/ImageSection" } ] }, "type": "array", "title": "Sections" }, "source": { "anyOf": [ { "$ref": "#/components/schemas/DocumentSource" }, { "type": "null" } ] }, "semantic_identifier": { "type": "string", "title": "Semantic Identifier" }, "metadata": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ] }, "type": "object", "title": "Metadata" }, "doc_updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Doc Updated At" }, "chunk_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Count" }, "primary_owners": { "anyOf": [ { "items": { "$ref": "#/components/schemas/BasicExpertInfo" }, "type": "array" }, { "type": "null" } ], "title": "Primary Owners" }, "secondary_owners": { "anyOf": [ { "items": { "$ref": "#/components/schemas/BasicExpertInfo" }, "type": "array" }, { "type": "null" } ], "title": "Secondary Owners" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "from_ingestion_api": { "type": "boolean", "title": "From Ingestion Api", "default": false }, "additional_info": { "title": "Additional Info" }, "external_access": { "anyOf": [ { "$ref": "#/components/schemas/ExternalAccess" }, { "type": "null" } ] }, "doc_metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Doc Metadata" } }, "type": "object", "required": ["sections", "semantic_identifier", "metadata"], "title": "DocumentBase", "description": "Used for Onyx ingestion api, the ID is inferred before use if not provided" }, "ConnectorStatus": { "properties": { "cc_pair_id": { "type": "integer", "title": "Cc Pair Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "connector": { "$ref": "#/components/schemas/ConnectorSnapshot" }, "credential": { "$ref": "#/components/schemas/CredentialSnapshot" }, "access_type": { "$ref": "#/components/schemas/AccessType" }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups" } }, "type": "object", "required": [ "cc_pair_id", "name", "connector", "credential", "access_type", "groups" ], "title": "ConnectorStatus", "description": "Represents the status of a connector,\nincluding indexing status elated information" }, "ProjectInstructionsResponse": { "properties": { "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" } }, "type": "object", "required": ["instructions"], "title": "ProjectInstructionsResponse" }, "MethodSpec": { "properties": { "name": { "type": "string", "title": "Name" }, "summary": { "type": "string", "title": "Summary" }, "path": { "type": "string", "title": "Path" }, "method": { "type": "string", "title": "Method" }, "spec": { "additionalProperties": true, "type": "object", "title": "Spec" } }, "type": "object", "required": ["name", "summary", "path", "method", "spec"], "title": "MethodSpec" }, "AgentResponseStart": { "properties": { "type": { "type": "string", "const": "message_start", "title": "Type", "default": "message_start" }, "final_documents": { "anyOf": [ { "items": { "$ref": "#/components/schemas/SearchDoc" }, "type": "array" }, { "type": "null" } ], "title": "Final Documents" } }, "type": "object", "title": "AgentResponseStart" }, "ChatSessionsResponse": { "properties": { "sessions": { "items": { "$ref": "#/components/schemas/ChatSessionDetails" }, "type": "array", "title": "Sessions" } }, "type": "object", "required": ["sessions"], "title": "ChatSessionsResponse" }, "PromptOverride": { "properties": { "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "task_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Prompt" } }, "type": "object", "title": "PromptOverride" }, "DocMinimalInfo": { "properties": { "document_id": { "type": "string", "title": "Document Id" }, "semantic_id": { "type": "string", "title": "Semantic Id" }, "link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link" } }, "type": "object", "required": ["document_id", "semantic_id"], "title": "DocMinimalInfo" }, "TenantInfo": { "properties": { "invitation": { "anyOf": [ { "$ref": "#/components/schemas/TenantSnapshot" }, { "type": "null" } ] }, "new_tenant": { "anyOf": [ { "$ref": "#/components/schemas/TenantSnapshot" }, { "type": "null" } ] } }, "type": "object", "title": "TenantInfo" }, "AuthType": { "type": "string", "enum": ["disabled", "basic", "google_oauth", "oidc", "saml", "cloud"], "title": "AuthType" }, "ConnectorCredentialPairMetadata": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "access_type": { "$ref": "#/components/schemas/AccessType" }, "auto_sync_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Auto Sync Options" }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups" } }, "type": "object", "required": ["access_type"], "title": "ConnectorCredentialPairMetadata" }, "Packet": { "properties": { "placement": { "$ref": "#/components/schemas/Placement" }, "obj": { "oneOf": [ { "$ref": "#/components/schemas/OverallStop" }, { "$ref": "#/components/schemas/SectionEnd" }, { "$ref": "#/components/schemas/TopLevelBranching" }, { "$ref": "#/components/schemas/AgentResponseStart" }, { "$ref": "#/components/schemas/AgentResponseDelta" }, { "$ref": "#/components/schemas/SearchToolStart" }, { "$ref": "#/components/schemas/SearchToolQueriesDelta" }, { "$ref": "#/components/schemas/SearchToolDocumentsDelta" }, { "$ref": "#/components/schemas/ImageGenerationToolStart" }, { "$ref": "#/components/schemas/ImageGenerationToolHeartbeat" }, { "$ref": "#/components/schemas/ImageGenerationFinal" }, { "$ref": "#/components/schemas/OpenUrlStart" }, { "$ref": "#/components/schemas/OpenUrlUrls" }, { "$ref": "#/components/schemas/OpenUrlDocuments" }, { "$ref": "#/components/schemas/PythonToolStart" }, { "$ref": "#/components/schemas/PythonToolDelta" }, { "$ref": "#/components/schemas/CustomToolStart" }, { "$ref": "#/components/schemas/CustomToolDelta" }, { "$ref": "#/components/schemas/ReasoningStart" }, { "$ref": "#/components/schemas/ReasoningDelta" }, { "$ref": "#/components/schemas/ReasoningDone" }, { "$ref": "#/components/schemas/CitationInfo" }, { "$ref": "#/components/schemas/DeepResearchPlanStart" }, { "$ref": "#/components/schemas/DeepResearchPlanDelta" }, { "$ref": "#/components/schemas/ResearchAgentStart" }, { "$ref": "#/components/schemas/IntermediateReportStart" }, { "$ref": "#/components/schemas/IntermediateReportDelta" }, { "$ref": "#/components/schemas/IntermediateReportCitedDocs" } ], "title": "Obj", "discriminator": { "propertyName": "type", "mapping": { "citation_info": "#/components/schemas/CitationInfo", "custom_tool_delta": "#/components/schemas/CustomToolDelta", "custom_tool_start": "#/components/schemas/CustomToolStart", "deep_research_plan_delta": "#/components/schemas/DeepResearchPlanDelta", "deep_research_plan_start": "#/components/schemas/DeepResearchPlanStart", "image_generation_final": "#/components/schemas/ImageGenerationFinal", "image_generation_heartbeat": "#/components/schemas/ImageGenerationToolHeartbeat", "image_generation_start": "#/components/schemas/ImageGenerationToolStart", "intermediate_report_cited_docs": "#/components/schemas/IntermediateReportCitedDocs", "intermediate_report_delta": "#/components/schemas/IntermediateReportDelta", "intermediate_report_start": "#/components/schemas/IntermediateReportStart", "message_delta": "#/components/schemas/AgentResponseDelta", "message_start": "#/components/schemas/AgentResponseStart", "open_url_documents": "#/components/schemas/OpenUrlDocuments", "open_url_start": "#/components/schemas/OpenUrlStart", "open_url_urls": "#/components/schemas/OpenUrlUrls", "python_tool_delta": "#/components/schemas/PythonToolDelta", "python_tool_start": "#/components/schemas/PythonToolStart", "reasoning_delta": "#/components/schemas/ReasoningDelta", "reasoning_done": "#/components/schemas/ReasoningDone", "reasoning_start": "#/components/schemas/ReasoningStart", "research_agent_start": "#/components/schemas/ResearchAgentStart", "search_tool_documents_delta": "#/components/schemas/SearchToolDocumentsDelta", "search_tool_queries_delta": "#/components/schemas/SearchToolQueriesDelta", "search_tool_start": "#/components/schemas/SearchToolStart", "section_end": "#/components/schemas/SectionEnd", "stop": "#/components/schemas/OverallStop", "top_level_branching": "#/components/schemas/TopLevelBranching" } } } }, "type": "object", "required": ["placement", "obj"], "title": "Packet" }, "ConnectorCredentialPairStatus": { "type": "string", "enum": [ "SCHEDULED", "INITIAL_INDEXING", "ACTIVE", "PAUSED", "DELETING", "INVALID" ], "title": "ConnectorCredentialPairStatus" }, "Body_upload_user_files_user_projects_file_upload_post": { "properties": { "files": { "items": { "type": "string", "format": "binary" }, "type": "array", "title": "Files" }, "project_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Project Id" }, "temp_id_map": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Temp Id Map" } }, "type": "object", "required": ["files"], "title": "Body_upload_user_files_user_projects_file_upload_post" }, "FileDescriptor": { "properties": { "id": { "type": "string", "title": "Id" }, "type": { "$ref": "#/components/schemas/ChatFileType" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "user_file_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User File Id" } }, "type": "object", "required": ["id", "type"], "title": "FileDescriptor", "description": "NOTE: is a `TypedDict` so it can be used as a type hint for a JSONB column\nin Postgres" }, "SourceSummary": { "properties": { "total_connectors": { "type": "integer", "title": "Total Connectors" }, "active_connectors": { "type": "integer", "title": "Active Connectors" }, "public_connectors": { "type": "integer", "title": "Public Connectors" }, "total_docs_indexed": { "type": "integer", "title": "Total Docs Indexed" } }, "type": "object", "required": [ "total_connectors", "active_connectors", "public_connectors", "total_docs_indexed" ], "title": "SourceSummary" }, "PythonToolStart": { "properties": { "type": { "type": "string", "const": "python_tool_start", "title": "Type", "default": "python_tool_start" }, "code": { "type": "string", "title": "Code" } }, "type": "object", "required": ["code"], "title": "PythonToolStart" }, "AllUsersResponse": { "properties": { "accepted": { "items": { "$ref": "#/components/schemas/FullUserSnapshot" }, "type": "array", "title": "Accepted" }, "invited": { "items": { "$ref": "#/components/schemas/InvitedUserSnapshot" }, "type": "array", "title": "Invited" }, "slack_users": { "items": { "$ref": "#/components/schemas/FullUserSnapshot" }, "type": "array", "title": "Slack Users" }, "accepted_pages": { "type": "integer", "title": "Accepted Pages" }, "invited_pages": { "type": "integer", "title": "Invited Pages" }, "slack_users_pages": { "type": "integer", "title": "Slack Users Pages" } }, "type": "object", "required": [ "accepted", "invited", "slack_users", "accepted_pages", "invited_pages", "slack_users_pages" ], "title": "AllUsersResponse" }, "AuthTypeResponse": { "properties": { "auth_type": { "$ref": "#/components/schemas/AuthType" }, "requires_verification": { "type": "boolean", "title": "Requires Verification" }, "anonymous_user_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Anonymous User Enabled" }, "password_min_length": { "type": "integer", "title": "Password Min Length" } }, "type": "object", "required": [ "auth_type", "requires_verification", "password_min_length" ], "title": "AuthTypeResponse" }, "TokenRateLimitArgs": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" }, "token_budget": { "type": "integer", "title": "Token Budget" }, "period_hours": { "type": "integer", "title": "Period Hours" } }, "type": "object", "required": ["enabled", "token_budget", "period_hours"], "title": "TokenRateLimitArgs" }, "ToolSnapshot": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "definition": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Definition" }, "display_name": { "type": "string", "title": "Display Name" }, "in_code_tool_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "In Code Tool Id" }, "custom_headers": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Custom Headers" }, "passthrough_auth": { "type": "boolean", "title": "Passthrough Auth" }, "mcp_server_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Mcp Server Id" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" }, "oauth_config_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Oauth Config Id" }, "oauth_config_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oauth Config Name" }, "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "chat_selectable": { "type": "boolean", "title": "Chat Selectable", "default": true }, "agent_creation_selectable": { "type": "boolean", "title": "Agent Creation Selectable", "default": true }, "default_enabled": { "type": "boolean", "title": "Default Enabled", "default": false } }, "type": "object", "required": [ "id", "name", "description", "definition", "display_name", "in_code_tool_id", "custom_headers", "passthrough_auth" ], "title": "ToolSnapshot" }, "LLMOverride": { "properties": { "model_configuration_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Model Configuration Id" }, "model_provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Provider" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Version" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" } }, "type": "object", "title": "LLMOverride", "description": "Per-request LLM settings that override persona defaults.\n\nAll fields are optional \u2014 only the fields that differ from the persona's\nconfigured LLM need to be supplied. Used both over the wire (API requests)\nand for multi-model comparison, where one override is supplied per model.\n\nAttributes:\n model_configuration_id: Exact model configuration to use. Preferred\n over the name-based fields \u2014 provider display names are not\n unique, so only the id routes unambiguously.\n model_provider: LLM provider display name. When ``None``, the\n persona's default provider is used.\n model_version: Specific model version string (e.g. ``\"gpt-4o\"``).\n When ``None``, the persona's default model is used.\n temperature: Sampling temperature in ``[0, 2]``. When ``None``, the\n persona's default temperature is used.\n display_name: Human-readable label shown in the UI for this model,\n e.g. ``\"GPT-4 Turbo\"``. Optional; falls back to ``model_version``\n when not set." }, "PaginatedReturn_FullUserSnapshot_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/FullUserSnapshot" }, "type": "array", "title": "Items" }, "total_items": { "type": "integer", "title": "Total Items" } }, "type": "object", "required": ["items", "total_items"], "title": "PaginatedReturn[FullUserSnapshot]" }, "UpsertProjectInstructionsRequest": { "properties": { "instructions": { "type": "string", "title": "Instructions" } }, "type": "object", "required": ["instructions"], "title": "UpsertProjectInstructionsRequest" }, "DocumentSetSummary": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "cc_pair_summaries": { "items": { "$ref": "#/components/schemas/CCPairSummary" }, "type": "array", "title": "Cc Pair Summaries" }, "is_up_to_date": { "type": "boolean", "title": "Is Up To Date" }, "is_public": { "type": "boolean", "title": "Is Public" }, "users": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Users" }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups" }, "federated_connector_summaries": { "items": { "$ref": "#/components/schemas/FederatedConnectorSummary" }, "type": "array", "title": "Federated Connector Summaries" } }, "type": "object", "required": [ "id", "name", "description", "cc_pair_summaries", "is_up_to_date", "is_public", "users", "groups" ], "title": "DocumentSetSummary", "description": "Simplified document set model with minimal data for list views" }, "MinimalPersonaSnapshot": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "tools": { "items": { "$ref": "#/components/schemas/ToolSnapshot" }, "type": "array", "title": "Tools" }, "starter_messages": { "anyOf": [ { "items": { "$ref": "#/components/schemas/StarterMessage" }, "type": "array" }, { "type": "null" } ], "title": "Starter Messages" }, "llm_relevance_filter": { "type": "boolean", "title": "Llm Relevance Filter" }, "llm_filter_extraction": { "type": "boolean", "title": "Llm Filter Extraction" }, "document_sets": { "items": { "$ref": "#/components/schemas/DocumentSetSummary" }, "type": "array", "title": "Document Sets" }, "llm_model_version_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Llm Model Version Override" }, "llm_model_provider_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Llm Model Provider Override" }, "uploaded_image_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Uploaded Image Id" }, "icon_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon Name" }, "is_public": { "type": "boolean", "title": "Is Public" }, "is_visible": { "type": "boolean", "title": "Is Visible" }, "display_priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Display Priority" }, "is_default_persona": { "type": "boolean", "title": "Is Default Persona" }, "builtin_persona": { "type": "boolean", "title": "Builtin Persona" }, "labels": { "items": { "$ref": "#/components/schemas/PersonaLabelSnapshot" }, "type": "array", "title": "Labels" }, "owner": { "anyOf": [ { "$ref": "#/components/schemas/MinimalUserSnapshot" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "name", "description", "tools", "starter_messages", "llm_relevance_filter", "llm_filter_extraction", "document_sets", "llm_model_version_override", "llm_model_provider_override", "uploaded_image_id", "icon_name", "is_public", "is_visible", "display_priority", "is_default_persona", "builtin_persona", "labels", "owner" ], "title": "MinimalPersonaSnapshot", "description": "Minimal persona model optimized for ChatPage.tsx - only includes fields actually used" }, "CreateChatSessionID": { "properties": { "chat_session_id": { "type": "string", "format": "uuid", "title": "Chat Session Id" } }, "type": "object", "required": ["chat_session_id"], "title": "CreateChatSessionID" }, "SectionEnd": { "properties": { "type": { "type": "string", "const": "section_end", "title": "Type", "default": "section_end" } }, "type": "object", "title": "SectionEnd" }, "ConnectorUpdateRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "source": { "$ref": "#/components/schemas/DocumentSource" }, "input_type": { "$ref": "#/components/schemas/InputType" }, "connector_specific_config": { "additionalProperties": true, "type": "object", "title": "Connector Specific Config" }, "refresh_freq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Refresh Freq" }, "prune_freq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Prune Freq" }, "indexing_start": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Indexing Start" }, "access_type": { "$ref": "#/components/schemas/AccessType" }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups" } }, "type": "object", "required": [ "name", "source", "input_type", "connector_specific_config", "access_type" ], "title": "ConnectorUpdateRequest" }, "UserFileIdsRequest": { "properties": { "file_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "File Ids" } }, "type": "object", "required": ["file_ids"], "title": "UserFileIdsRequest" }, "ConnectorIndexingStatusLiteResponse": { "properties": { "source": { "$ref": "#/components/schemas/DocumentSource" }, "summary": { "$ref": "#/components/schemas/SourceSummary" }, "current_page": { "type": "integer", "title": "Current Page" }, "total_pages": { "type": "integer", "title": "Total Pages" }, "indexing_statuses": { "items": { "anyOf": [ { "$ref": "#/components/schemas/ConnectorIndexingStatusLite" }, { "$ref": "#/components/schemas/FederatedConnectorStatus" } ] }, "type": "array", "title": "Indexing Statuses" } }, "type": "object", "required": [ "source", "summary", "current_page", "total_pages", "indexing_statuses" ], "title": "ConnectorIndexingStatusLiteResponse" }, "ChatSessionDetails": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "persona_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Persona Id" }, "time_created": { "type": "string", "title": "Time Created" }, "time_updated": { "type": "string", "title": "Time Updated" }, "shared_status": { "$ref": "#/components/schemas/ChatSessionSharedStatus" }, "current_alternate_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Alternate Model" }, "current_temperature_override": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Current Temperature Override" } }, "type": "object", "required": [ "id", "name", "time_created", "time_updated", "shared_status" ], "title": "ChatSessionDetails" }, "StatusResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "data": { "anyOf": [ {}, { "type": "null" } ], "title": "Data" } }, "type": "object", "required": ["success"], "title": "StatusResponse" }, "PaginatedReturn_MinimalPersonaSnapshot_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MinimalPersonaSnapshot" }, "type": "array", "title": "Items" }, "total_items": { "type": "integer", "title": "Total Items" } }, "type": "object", "required": ["items", "total_items"], "title": "PaginatedReturn[MinimalPersonaSnapshot]" }, "MinimalUserSnapshot": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "email": { "type": "string", "title": "Email" } }, "type": "object", "required": ["id", "email"], "title": "MinimalUserSnapshot" }, "SearchToolStart": { "properties": { "type": { "type": "string", "const": "search_tool_start", "title": "Type", "default": "search_tool_start" }, "is_internet_search": { "type": "boolean", "title": "Is Internet Search", "default": false } }, "type": "object", "title": "SearchToolStart" }, "TextSection": { "properties": { "link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link" }, "text": { "type": "string", "title": "Text" }, "image_file_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image File Id" } }, "type": "object", "required": ["text"], "title": "TextSection", "description": "Section containing text content" }, "MessageType": { "type": "string", "enum": [ "system", "user", "assistant", "tool_call_response", "user_reminder" ], "title": "MessageType" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "CCStatusUpdateRequest": { "properties": { "status": { "$ref": "#/components/schemas/ConnectorCredentialPairStatus" } }, "type": "object", "required": ["status"], "title": "CCStatusUpdateRequest" }, "StatusResponse_list_int__": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "data": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Data" } }, "type": "object", "required": ["success"], "title": "StatusResponse[list[int]]" }, "IntermediateReportDelta": { "properties": { "type": { "type": "string", "const": "intermediate_report_delta", "title": "Type", "default": "intermediate_report_delta" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": ["content"], "title": "IntermediateReportDelta" }, "DocsCountOperator": { "type": "string", "enum": [">", "<", "="], "title": "DocsCountOperator" }, "PaginatedReturn_IndexAttemptErrorPydantic_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/IndexAttemptErrorPydantic" }, "type": "array", "title": "Items" }, "total_items": { "type": "integer", "title": "Total Items" } }, "type": "object", "required": ["items", "total_items"], "title": "PaginatedReturn[IndexAttemptErrorPydantic]" }, "CredentialSwapRequest": { "properties": { "new_credential_id": { "type": "integer", "title": "New Credential Id" }, "connector_id": { "type": "integer", "title": "Connector Id" }, "access_type": { "$ref": "#/components/schemas/AccessType" } }, "type": "object", "required": ["new_credential_id", "connector_id", "access_type"], "title": "CredentialSwapRequest" }, "AgentResponseDelta": { "properties": { "type": { "type": "string", "const": "message_delta", "title": "Type", "default": "message_delta" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": ["content"], "title": "AgentResponseDelta" }, "RejectedFile": { "properties": { "file_name": { "type": "string", "title": "File Name" }, "reason": { "type": "string", "title": "Reason" } }, "type": "object", "required": ["file_name", "reason"], "title": "RejectedFile" }, "AccessType": { "type": "string", "enum": ["public", "private", "sync"], "title": "AccessType" }, "SearchToolQueriesDelta": { "properties": { "type": { "type": "string", "const": "search_tool_queries_delta", "title": "Type", "default": "search_tool_queries_delta" }, "queries": { "items": { "type": "string" }, "type": "array", "title": "Queries" } }, "type": "object", "required": ["queries"], "title": "SearchToolQueriesDelta" }, "DeepResearchPlanStart": { "properties": { "type": { "type": "string", "const": "deep_research_plan_start", "title": "Type", "default": "deep_research_plan_start" } }, "type": "object", "title": "DeepResearchPlanStart" }, "LlmOpenUrlResult": { "properties": { "document_citation_number": { "type": "integer", "title": "Document Citation Number" }, "unique_identifier_to_strip_away": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unique Identifier To Strip Away" }, "type": { "type": "string", "const": "open_url", "title": "Type", "default": "open_url" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": ["document_citation_number", "content"], "title": "LlmOpenUrlResult", "description": "Result from opening/fetching a URL" }, "UserFileSnapshot": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "temp_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Temp Id" }, "name": { "type": "string", "title": "Name" }, "project_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Project Id" }, "user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Id" }, "file_id": { "type": "string", "title": "File Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "status": { "$ref": "#/components/schemas/UserFileStatus" }, "last_accessed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Accessed At" }, "file_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Type" }, "chat_file_type": { "$ref": "#/components/schemas/ChatFileType" }, "token_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Token Count" }, "chunk_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Count" } }, "type": "object", "required": [ "id", "name", "user_id", "file_id", "created_at", "status", "last_accessed_at", "file_type", "chat_file_type", "token_count", "chunk_count" ], "title": "UserFileSnapshot" }, "UserPreferences": { "properties": { "chosen_assistants": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Chosen Assistants" }, "hidden_assistants": { "items": { "type": "integer" }, "type": "array", "title": "Hidden Assistants", "default": [] }, "visible_assistants": { "items": { "type": "integer" }, "type": "array", "title": "Visible Assistants", "default": [] }, "default_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Default Model" }, "pinned_assistants": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Pinned Assistants" }, "shortcut_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Shortcut Enabled" }, "auto_scroll": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Auto Scroll" }, "temperature_override_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Temperature Override Enabled" }, "theme_preference": { "anyOf": [ { "$ref": "#/components/schemas/ThemePreference" }, { "type": "null" } ] }, "assistant_specific_configs": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/UserSpecificAssistantPreference" }, "type": "object" }, { "type": "null" } ], "title": "Assistant Specific Configs" } }, "type": "object", "title": "UserPreferences" }, "MessageOrigin": { "type": "string", "enum": [ "webapp", "chrome_extension", "api", "slackbot", "widget", "discordbot", "mobile", "unknown", "unset" ], "title": "MessageOrigin", "description": "Origin of a chat message for telemetry tracking." }, "TaskStatus": { "type": "string", "enum": ["PENDING", "STARTED", "SUCCESS", "FAILURE"], "title": "TaskStatus" }, "PersonaSnapshot": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "is_public": { "type": "boolean", "title": "Is Public" }, "is_visible": { "type": "boolean", "title": "Is Visible" }, "uploaded_image_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Uploaded Image Id" }, "icon_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon Name" }, "user_file_ids": { "items": { "type": "string" }, "type": "array", "title": "User File Ids" }, "display_priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Display Priority" }, "is_default_persona": { "type": "boolean", "title": "Is Default Persona" }, "builtin_persona": { "type": "boolean", "title": "Builtin Persona" }, "starter_messages": { "anyOf": [ { "items": { "$ref": "#/components/schemas/StarterMessage" }, "type": "array" }, { "type": "null" } ], "title": "Starter Messages" }, "llm_relevance_filter": { "type": "boolean", "title": "Llm Relevance Filter" }, "llm_filter_extraction": { "type": "boolean", "title": "Llm Filter Extraction" }, "tools": { "items": { "$ref": "#/components/schemas/ToolSnapshot" }, "type": "array", "title": "Tools" }, "labels": { "items": { "$ref": "#/components/schemas/PersonaLabelSnapshot" }, "type": "array", "title": "Labels" }, "owner": { "anyOf": [ { "$ref": "#/components/schemas/MinimalUserSnapshot" }, { "type": "null" } ] }, "users": { "items": { "$ref": "#/components/schemas/MinimalUserSnapshot" }, "type": "array", "title": "Users" }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups" }, "document_sets": { "items": { "$ref": "#/components/schemas/DocumentSetSummary" }, "type": "array", "title": "Document Sets" }, "llm_model_provider_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Llm Model Provider Override" }, "llm_model_version_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Llm Model Version Override" }, "num_chunks": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Num Chunks" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "replace_base_system_prompt": { "type": "boolean", "title": "Replace Base System Prompt", "default": false }, "task_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Prompt" }, "datetime_aware": { "type": "boolean", "title": "Datetime Aware", "default": true } }, "type": "object", "required": [ "id", "name", "description", "is_public", "is_visible", "uploaded_image_id", "icon_name", "user_file_ids", "display_priority", "is_default_persona", "builtin_persona", "starter_messages", "llm_relevance_filter", "llm_filter_extraction", "tools", "labels", "owner", "users", "groups", "document_sets", "llm_model_provider_override", "llm_model_version_override", "num_chunks" ], "title": "PersonaSnapshot" }, "ChatSessionCreationRequest": { "properties": { "persona_id": { "type": "integer", "title": "Persona Id", "default": 0 }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "project_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Project Id" }, "incognito": { "type": "boolean", "title": "Incognito", "default": false }, "incognito_session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Incognito Session Id" } }, "type": "object", "title": "ChatSessionCreationRequest" }, "UserRole": { "type": "string", "enum": [ "limited", "basic", "admin", "curator", "global_curator", "slack_user", "ext_perm_user" ], "title": "UserRole", "description": "User roles\n- Basic can't perform any admin actions\n- Admin can perform all admin actions\n- Curator can perform admin actions for\n groups they are curators of\n- Global Curator can perform admin actions\n for all groups they are a member of\n- Limited can access a limited set of basic api endpoints\n- Slack are users that have used onyx via slack but dont have a web login\n- External permissioned users that have been picked up during the external permissions sync process but don't have a web login" }, "RecencyBiasSetting": { "type": "string", "enum": ["favor_recent", "base_decay", "no_decay", "auto"], "title": "RecencyBiasSetting" }, "ImageGenerationFinal": { "properties": { "type": { "type": "string", "const": "image_generation_final", "title": "Type", "default": "image_generation_final" }, "images": { "items": { "$ref": "#/components/schemas/GeneratedImage" }, "type": "array", "title": "Images" } }, "type": "object", "required": ["images"], "title": "ImageGenerationFinal" }, "CustomToolCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "definition": { "additionalProperties": true, "type": "object", "title": "Definition" }, "custom_headers": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Header" }, "type": "array" }, { "type": "null" } ], "title": "Custom Headers" }, "passthrough_auth": { "type": "boolean", "title": "Passthrough Auth" }, "oauth_config_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Oauth Config Id" } }, "type": "object", "required": ["name", "definition", "passthrough_auth"], "title": "CustomToolCreate" }, "TokenRateLimitDisplay": { "properties": { "token_id": { "type": "integer", "title": "Token Id" }, "enabled": { "type": "boolean", "title": "Enabled" }, "token_budget": { "type": "integer", "title": "Token Budget" }, "period_hours": { "type": "integer", "title": "Period Hours" } }, "type": "object", "required": ["token_id", "enabled", "token_budget", "period_hours"], "title": "TokenRateLimitDisplay" }, "Body_update_connector_files_manage_admin_connector__connector_id__files_update_post": { "properties": { "files": { "anyOf": [ { "items": { "type": "string", "format": "binary" }, "type": "array" }, { "type": "null" } ], "title": "Files" }, "file_ids_to_remove": { "type": "string", "title": "File Ids To Remove", "default": "[]" } }, "type": "object", "title": "Body_update_connector_files_manage_admin_connector__connector_id__files_update_post" }, "ExternalAccess": { "properties": { "external_user_emails": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "External User Emails" }, "external_user_group_ids": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "External User Group Ids" }, "is_public": { "type": "boolean", "title": "Is Public" } }, "type": "object", "required": [ "external_user_emails", "external_user_group_ids", "is_public" ], "title": "ExternalAccess" }, "OverallStop": { "properties": { "type": { "type": "string", "const": "stop", "title": "Type", "default": "stop" }, "stop_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Stop Reason" } }, "type": "object", "title": "OverallStop" }, "IntermediateReportCitedDocs": { "properties": { "type": { "type": "string", "const": "intermediate_report_cited_docs", "title": "Type", "default": "intermediate_report_cited_docs" }, "cited_docs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/SearchDoc" }, "type": "array" }, { "type": "null" } ], "title": "Cited Docs" } }, "type": "object", "title": "IntermediateReportCitedDocs" }, "VersionResponse": { "properties": { "backend_version": { "type": "string", "title": "Backend Version" } }, "type": "object", "required": ["backend_version"], "title": "VersionResponse" }, "FileUploadResponse": { "properties": { "file_paths": { "items": { "type": "string" }, "type": "array", "title": "File Paths" }, "file_names": { "items": { "type": "string" }, "type": "array", "title": "File Names" }, "zip_metadata": { "additionalProperties": true, "type": "object", "title": "Zip Metadata" } }, "type": "object", "required": ["file_paths", "file_names", "zip_metadata"], "title": "FileUploadResponse" }, "CustomToolStart": { "properties": { "type": { "type": "string", "const": "custom_tool_start", "title": "Type", "default": "custom_tool_start" }, "tool_name": { "type": "string", "title": "Tool Name" } }, "type": "object", "required": ["tool_name"], "title": "CustomToolStart" }, "WebContentProviderType": { "type": "string", "enum": ["onyx_web_crawler", "firecrawl", "exa"], "title": "WebContentProviderType" }, "GeneratedImage": { "properties": { "file_id": { "type": "string", "title": "File Id" }, "url": { "type": "string", "title": "Url" }, "revised_prompt": { "type": "string", "title": "Revised Prompt" }, "shape": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Shape" } }, "type": "object", "required": ["file_id", "url", "revised_prompt"], "title": "GeneratedImage", "description": "Represents an image generated by an image generation tool." }, "UserPersonalization": { "properties": { "name": { "type": "string", "title": "Name", "default": "" }, "role": { "type": "string", "title": "Role", "default": "" }, "use_memories": { "type": "boolean", "title": "Use Memories", "default": true }, "memories": { "items": { "type": "string" }, "type": "array", "title": "Memories" } }, "type": "object", "title": "UserPersonalization" }, "SendMessageRequest": { "properties": { "message": { "type": "string", "title": "Message" }, "llm_override": { "anyOf": [ { "$ref": "#/components/schemas/LLMOverride" }, { "type": "null" } ] }, "llm_overrides": { "anyOf": [ { "items": { "$ref": "#/components/schemas/LLMOverride" }, "type": "array" }, { "type": "null" } ], "title": "Llm Overrides", "description": "Two or three LLM overrides to run in parallel (multi-model mode), one entry per model. Requires `stream=true`: a request carrying more than one entry with `stream=false` is rejected with a 400 `INVALID_INPUT` error. A list with a single entry is ignored \u2014 use `llm_override` to change the model for an ordinary single-model request." }, "allowed_tool_ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Allowed Tool Ids" }, "forced_tool_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Forced Tool Id" }, "file_descriptors": { "items": { "$ref": "#/components/schemas/FileDescriptor" }, "type": "array", "title": "File Descriptors", "default": [] }, "internal_search_filters": { "anyOf": [ { "$ref": "#/components/schemas/BaseFilters" }, { "type": "null" } ] }, "deep_research": { "type": "boolean", "title": "Deep Research", "default": false }, "mcp_headers": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Mcp Headers", "description": "Headers forwarded to MCP tool calls made while answering this message, e.g. `{\"Authorization\": \"Bearer \", \"X-User-ID\": \"user123\"}`. Use this to pass end-user credentials through to MCP servers that require them." }, "origin": { "$ref": "#/components/schemas/MessageOrigin", "default": "unset" }, "parent_message_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Parent Message Id", "default": -1 }, "chat_session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Chat Session Id" }, "chat_session_info": { "anyOf": [ { "$ref": "#/components/schemas/ChatSessionCreationRequest" }, { "type": "null" } ] }, "stream": { "type": "boolean", "title": "Stream", "default": true }, "include_citations": { "type": "boolean", "title": "Include Citations", "default": true }, "additional_context": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Additional Context", "description": "A string of extra context injected into the LLM call for this request. The context is passed to the model but is not stored in the database and will not appear in the chat history. Use this to supply ephemeral, request-scoped information (e.g. the user's current page URL, session metadata, or any runtime context) without polluting the persistent conversation history. Pass null or omit the field to use no additional context." } }, "type": "object", "required": ["message"], "title": "SendMessageRequest" }, "UserSpecificAssistantPreference": { "properties": { "disabled_tool_ids": { "items": { "type": "integer" }, "type": "array", "title": "Disabled Tool Ids" } }, "type": "object", "required": ["disabled_tool_ids"], "title": "UserSpecificAssistantPreference" }, "ChatSessionSharedStatus": { "type": "string", "enum": ["public", "private"], "title": "ChatSessionSharedStatus" }, "StarterMessage": { "properties": { "name": { "type": "string", "title": "Name" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": ["name", "message"], "title": "StarterMessage", "description": "Starter message for a persona." }, "ResearchAgentStart": { "properties": { "type": { "type": "string", "const": "research_agent_start", "title": "Type", "default": "research_agent_start" }, "research_task": { "type": "string", "title": "Research Task" } }, "type": "object", "required": ["research_task"], "title": "ResearchAgentStart" }, "SavedSearchDoc": { "properties": { "document_id": { "type": "string", "title": "Document Id" }, "chunk_ind": { "type": "integer", "title": "Chunk Ind" }, "semantic_identifier": { "type": "string", "title": "Semantic Identifier" }, "link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link" }, "blurb": { "type": "string", "title": "Blurb" }, "source_type": { "$ref": "#/components/schemas/DocumentSource" }, "boost": { "type": "integer", "title": "Boost" }, "hidden": { "type": "boolean", "title": "Hidden" }, "metadata": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ] }, "type": "object", "title": "Metadata" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score", "default": 0.0 }, "is_relevant": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Relevant" }, "relevance_explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Relevance Explanation" }, "match_highlights": { "items": { "type": "string" }, "type": "array", "title": "Match Highlights" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" }, "primary_owners": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Primary Owners" }, "secondary_owners": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Secondary Owners" }, "is_internet": { "type": "boolean", "title": "Is Internet", "default": false }, "db_doc_id": { "type": "integer", "title": "Db Doc Id" } }, "type": "object", "required": [ "document_id", "chunk_ind", "semantic_identifier", "blurb", "source_type", "boost", "hidden", "metadata", "match_highlights", "db_doc_id" ], "title": "SavedSearchDoc" }, "OpenUrlsToolRequest": { "properties": { "urls": { "items": { "type": "string" }, "type": "array", "minItems": 1, "title": "Urls", "description": "URLs to fetch using the configured content provider." } }, "type": "object", "required": ["urls"], "title": "OpenUrlsToolRequest" }, "CustomToolUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "definition": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Definition" }, "custom_headers": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Header" }, "type": "array" }, { "type": "null" } ], "title": "Custom Headers" }, "passthrough_auth": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Passthrough Auth" }, "oauth_config_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Oauth Config Id" } }, "type": "object", "title": "CustomToolUpdate" }, "CCPairFullInfo": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "status": { "$ref": "#/components/schemas/ConnectorCredentialPairStatus" }, "in_repeated_error_state": { "type": "boolean", "title": "In Repeated Error State" }, "num_docs_indexed": { "type": "integer", "title": "Num Docs Indexed" }, "connector": { "$ref": "#/components/schemas/ConnectorSnapshot" }, "credential": { "$ref": "#/components/schemas/CredentialSnapshot" }, "number_of_index_attempts": { "type": "integer", "title": "Number Of Index Attempts" }, "last_index_attempt_status": { "anyOf": [ { "$ref": "#/components/schemas/IndexingStatus" }, { "type": "null" } ] }, "latest_deletion_attempt": { "anyOf": [ { "$ref": "#/components/schemas/DeletionAttemptSnapshot" }, { "type": "null" } ] }, "access_type": { "$ref": "#/components/schemas/AccessType" }, "is_editable_for_current_user": { "type": "boolean", "title": "Is Editable For Current User" }, "deletion_failure_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Deletion Failure Message" }, "indexing": { "type": "boolean", "title": "Indexing" }, "creator": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Creator" }, "creator_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Creator Email" }, "last_indexed": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Indexed" }, "last_pruned": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Pruned" }, "last_full_permission_sync": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Full Permission Sync" }, "overall_indexing_speed": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Overall Indexing Speed" }, "latest_checkpoint_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Latest Checkpoint Description" }, "last_permission_sync_attempt_status": { "anyOf": [ { "$ref": "#/components/schemas/PermissionSyncStatus" }, { "type": "null" } ] }, "permission_syncing": { "type": "boolean", "title": "Permission Syncing" }, "last_permission_sync_attempt_finished": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Permission Sync Attempt Finished" }, "last_permission_sync_attempt_error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Permission Sync Attempt Error Message" } }, "type": "object", "required": [ "id", "name", "status", "in_repeated_error_state", "num_docs_indexed", "connector", "credential", "number_of_index_attempts", "last_index_attempt_status", "latest_deletion_attempt", "access_type", "is_editable_for_current_user", "deletion_failure_message", "indexing", "creator", "creator_email", "last_indexed", "last_pruned", "last_full_permission_sync", "overall_indexing_speed", "latest_checkpoint_description", "last_permission_sync_attempt_status", "permission_syncing", "last_permission_sync_attempt_finished", "last_permission_sync_attempt_error_message" ], "title": "CCPairFullInfo" }, "ChatFileType": { "type": "string", "enum": ["image", "document", "plain_text", "tabular"], "title": "ChatFileType" }, "LlmWebSearchResult": { "properties": { "document_citation_number": { "type": "integer", "title": "Document Citation Number" }, "unique_identifier_to_strip_away": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unique Identifier To Strip Away" }, "type": { "type": "string", "const": "web_search", "title": "Type", "default": "web_search" }, "url": { "type": "string", "title": "Url" }, "title": { "type": "string", "title": "Title" }, "snippet": { "type": "string", "title": "Snippet" } }, "type": "object", "required": ["document_citation_number", "url", "title", "snippet"], "title": "LlmWebSearchResult", "description": "Result from a web search query" }, "ReasoningStart": { "properties": { "type": { "type": "string", "const": "reasoning_start", "title": "Type", "default": "reasoning_start" } }, "type": "object", "title": "ReasoningStart" }, "IngestionResult": { "properties": { "document_id": { "type": "string", "title": "Document Id" }, "already_existed": { "type": "boolean", "title": "Already Existed" } }, "type": "object", "required": ["document_id", "already_existed"], "title": "IngestionResult" }, "PersonaLabelSnapshot": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": ["id", "name"], "title": "PersonaLabelSnapshot" }, "FailedConnectorIndexingStatus": { "properties": { "cc_pair_id": { "type": "integer", "title": "Cc Pair Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "error_msg": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Msg" }, "is_deletable": { "type": "boolean", "title": "Is Deletable" }, "connector_id": { "type": "integer", "title": "Connector Id" }, "credential_id": { "type": "integer", "title": "Credential Id" } }, "type": "object", "required": [ "cc_pair_id", "name", "error_msg", "is_deletable", "connector_id", "credential_id" ], "title": "FailedConnectorIndexingStatus", "description": "Simplified version of ConnectorIndexingStatus for failed indexing attempts" }, "FederatedConnectorStatus": { "properties": { "id": { "type": "integer", "title": "Id" }, "source": { "$ref": "#/components/schemas/FederatedConnectorSource" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": ["id", "source", "name"], "title": "FederatedConnectorStatus" }, "UserRoleUpdateRequest": { "properties": { "user_email": { "type": "string", "title": "User Email" }, "new_role": { "$ref": "#/components/schemas/UserRole" }, "explicit_override": { "type": "boolean", "title": "Explicit Override", "default": false } }, "type": "object", "required": ["user_email", "new_role"], "title": "UserRoleUpdateRequest" }, "ConnectorFileInfo": { "properties": { "file_id": { "type": "string", "title": "File Id" }, "file_name": { "type": "string", "title": "File Name" }, "file_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "File Size" }, "upload_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Upload Date" } }, "type": "object", "required": ["file_id", "file_name"], "title": "ConnectorFileInfo" }, "WebSearchToolResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/LlmWebSearchResult" }, "type": "array", "title": "Results" }, "provider_type": { "$ref": "#/components/schemas/WebSearchProviderType" } }, "type": "object", "required": ["results", "provider_type"], "title": "WebSearchToolResponse" }, "ReasoningDelta": { "properties": { "type": { "type": "string", "const": "reasoning_delta", "title": "Type", "default": "reasoning_delta" }, "reasoning": { "type": "string", "title": "Reasoning" } }, "type": "object", "required": ["reasoning"], "title": "ReasoningDelta" }, "ImageSection": { "properties": { "link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link" }, "text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Text" }, "image_file_id": { "type": "string", "title": "Image File Id" } }, "type": "object", "required": ["image_file_id"], "title": "ImageSection", "description": "Section containing an image reference" }, "PersonaUpsertRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "document_set_ids": { "items": { "type": "integer" }, "type": "array", "title": "Document Set Ids" }, "num_chunks": { "type": "number", "title": "Num Chunks" }, "is_public": { "type": "boolean", "title": "Is Public" }, "recency_bias": { "$ref": "#/components/schemas/RecencyBiasSetting" }, "llm_filter_extraction": { "type": "boolean", "title": "Llm Filter Extraction" }, "llm_relevance_filter": { "type": "boolean", "title": "Llm Relevance Filter" }, "llm_model_provider_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Llm Model Provider Override" }, "llm_model_version_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Llm Model Version Override" }, "starter_messages": { "anyOf": [ { "items": { "$ref": "#/components/schemas/StarterMessage" }, "type": "array" }, { "type": "null" } ], "title": "Starter Messages" }, "users": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Users" }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups" }, "tool_ids": { "items": { "type": "integer" }, "type": "array", "title": "Tool Ids" }, "remove_image": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Remove Image" }, "uploaded_image_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Uploaded Image Id" }, "icon_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon Name" }, "search_start_date": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Search Start Date" }, "label_ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Label Ids" }, "is_default_persona": { "type": "boolean", "title": "Is Default Persona", "default": false }, "display_priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Display Priority" }, "user_file_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "User File Ids" }, "system_prompt": { "type": "string", "title": "System Prompt" }, "replace_base_system_prompt": { "type": "boolean", "title": "Replace Base System Prompt", "default": false }, "task_prompt": { "type": "string", "title": "Task Prompt" }, "datetime_aware": { "type": "boolean", "title": "Datetime Aware" } }, "type": "object", "required": [ "name", "description", "document_set_ids", "num_chunks", "is_public", "recency_bias", "llm_filter_extraction", "llm_relevance_filter", "tool_ids", "system_prompt", "task_prompt", "datetime_aware" ], "title": "PersonaUpsertRequest" }, "OpenUrlDocuments": { "properties": { "type": { "type": "string", "const": "open_url_documents", "title": "Type", "default": "open_url_documents" }, "documents": { "items": { "$ref": "#/components/schemas/SearchDoc" }, "type": "array", "title": "Documents" } }, "type": "object", "required": ["documents"], "title": "OpenUrlDocuments", "description": "Final documents after crawling completes." }, "ChatSeedResponse": { "properties": { "redirect_url": { "type": "string", "title": "Redirect Url" } }, "type": "object", "required": ["redirect_url"], "title": "ChatSeedResponse" }, "ChatSessionDetailResponse": { "properties": { "chat_session_id": { "type": "string", "format": "uuid", "title": "Chat Session Id" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "persona_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Persona Id" }, "persona_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Persona Name" }, "personal_icon_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Personal Icon Name" }, "messages": { "items": { "$ref": "#/components/schemas/ChatMessageDetail" }, "type": "array", "title": "Messages" }, "time_created": { "type": "string", "format": "date-time", "title": "Time Created" }, "shared_status": { "$ref": "#/components/schemas/ChatSessionSharedStatus" }, "current_alternate_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Alternate Model" }, "current_temperature_override": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Current Temperature Override" }, "deleted": { "type": "boolean", "title": "Deleted", "default": false }, "packets": { "items": { "items": { "$ref": "#/components/schemas/Packet" }, "type": "array" }, "type": "array", "title": "Packets" } }, "type": "object", "required": [ "chat_session_id", "description", "persona_name", "personal_icon_name", "messages", "time_created", "shared_status", "current_alternate_model", "current_temperature_override", "packets" ], "title": "ChatSessionDetailResponse" }, "WebSearchToolRequest": { "properties": { "queries": { "items": { "type": "string" }, "type": "array", "minItems": 1, "title": "Queries", "description": "List of search queries to send to the configured provider." }, "max_results": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Results", "description": "Optional cap on number of results to return per query. Defaults to 10.", "default": 10 } }, "type": "object", "required": ["queries"], "title": "WebSearchToolRequest" }, "Tag": { "properties": { "tag_key": { "type": "string", "title": "Tag Key" }, "tag_value": { "type": "string", "title": "Tag Value" } }, "type": "object", "required": ["tag_key", "tag_value"], "title": "Tag" }, "UpdateProjectRequest": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "title": "UpdateProjectRequest" }, "InvitedUserSnapshot": { "properties": { "email": { "type": "string", "title": "Email" } }, "type": "object", "required": ["email"], "title": "InvitedUserSnapshot" }, "CategorizedFilesSnapshot": { "properties": { "user_files": { "items": { "$ref": "#/components/schemas/UserFileSnapshot" }, "type": "array", "title": "User Files" }, "rejected_files": { "items": { "$ref": "#/components/schemas/RejectedFile" }, "type": "array", "title": "Rejected Files" } }, "type": "object", "required": ["user_files", "rejected_files"], "title": "CategorizedFilesSnapshot" }, "FullPersonaSnapshot": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "is_public": { "type": "boolean", "title": "Is Public" }, "is_visible": { "type": "boolean", "title": "Is Visible" }, "uploaded_image_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Uploaded Image Id" }, "icon_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon Name" }, "user_file_ids": { "items": { "type": "string" }, "type": "array", "title": "User File Ids" }, "display_priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Display Priority" }, "is_default_persona": { "type": "boolean", "title": "Is Default Persona" }, "builtin_persona": { "type": "boolean", "title": "Builtin Persona" }, "starter_messages": { "anyOf": [ { "items": { "$ref": "#/components/schemas/StarterMessage" }, "type": "array" }, { "type": "null" } ], "title": "Starter Messages" }, "llm_relevance_filter": { "type": "boolean", "title": "Llm Relevance Filter", "default": false }, "llm_filter_extraction": { "type": "boolean", "title": "Llm Filter Extraction", "default": false }, "tools": { "items": { "$ref": "#/components/schemas/ToolSnapshot" }, "type": "array", "title": "Tools" }, "labels": { "items": { "$ref": "#/components/schemas/PersonaLabelSnapshot" }, "type": "array", "title": "Labels" }, "owner": { "anyOf": [ { "$ref": "#/components/schemas/MinimalUserSnapshot" }, { "type": "null" } ] }, "users": { "items": { "$ref": "#/components/schemas/MinimalUserSnapshot" }, "type": "array", "title": "Users" }, "groups": { "items": { "type": "integer" }, "type": "array", "title": "Groups" }, "document_sets": { "items": { "$ref": "#/components/schemas/DocumentSetSummary" }, "type": "array", "title": "Document Sets" }, "llm_model_provider_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Llm Model Provider Override" }, "llm_model_version_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Llm Model Version Override" }, "num_chunks": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Num Chunks" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "replace_base_system_prompt": { "type": "boolean", "title": "Replace Base System Prompt", "default": false }, "task_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Prompt" }, "datetime_aware": { "type": "boolean", "title": "Datetime Aware", "default": true }, "search_start_date": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Search Start Date" } }, "type": "object", "required": [ "id", "name", "description", "is_public", "is_visible", "uploaded_image_id", "icon_name", "user_file_ids", "display_priority", "is_default_persona", "builtin_persona", "starter_messages", "tools", "labels", "owner", "users", "groups", "document_sets", "llm_model_provider_override", "llm_model_version_override", "num_chunks" ], "title": "FullPersonaSnapshot" }, "WebSearchProviderType": { "type": "string", "enum": ["google_pse", "serper", "exa", "searxng"], "title": "WebSearchProviderType" }, "ChatSeedRequest": { "properties": { "persona_id": { "type": "integer", "title": "Persona Id" }, "llm_override": { "anyOf": [ { "$ref": "#/components/schemas/LLMOverride" }, { "type": "null" } ] }, "prompt_override": { "anyOf": [ { "$ref": "#/components/schemas/PromptOverride" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" } }, "type": "object", "required": ["persona_id"], "title": "ChatSeedRequest" }, "TopLevelBranching": { "properties": { "type": { "type": "string", "const": "top_level_branching", "title": "Type", "default": "top_level_branching" }, "num_parallel_branches": { "type": "integer", "title": "Num Parallel Branches" } }, "type": "object", "required": ["num_parallel_branches"], "title": "TopLevelBranching" }, "IndexingStatusRequest": { "properties": { "secondary_index": { "type": "boolean", "title": "Secondary Index", "default": false }, "source": { "anyOf": [ { "$ref": "#/components/schemas/DocumentSource" }, { "type": "null" } ] }, "access_type_filters": { "items": { "$ref": "#/components/schemas/AccessType" }, "type": "array", "title": "Access Type Filters" }, "last_status_filters": { "items": { "$ref": "#/components/schemas/IndexingStatus" }, "type": "array", "title": "Last Status Filters" }, "docs_count_operator": { "anyOf": [ { "$ref": "#/components/schemas/DocsCountOperator" }, { "type": "null" } ] }, "docs_count_value": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Docs Count Value" }, "name_filter": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name Filter" }, "source_to_page": { "additionalProperties": { "type": "integer" }, "propertyNames": { "$ref": "#/components/schemas/DocumentSource" }, "type": "object", "title": "Source To Page" }, "get_all_connectors": { "type": "boolean", "title": "Get All Connectors", "default": false } }, "type": "object", "title": "IndexingStatusRequest" }, "SearchDoc": { "properties": { "document_id": { "type": "string", "title": "Document Id" }, "chunk_ind": { "type": "integer", "title": "Chunk Ind" }, "semantic_identifier": { "type": "string", "title": "Semantic Identifier" }, "link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link" }, "blurb": { "type": "string", "title": "Blurb" }, "source_type": { "$ref": "#/components/schemas/DocumentSource" }, "boost": { "type": "integer", "title": "Boost" }, "hidden": { "type": "boolean", "title": "Hidden" }, "metadata": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ] }, "type": "object", "title": "Metadata" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" }, "is_relevant": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Relevant" }, "relevance_explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Relevance Explanation" }, "match_highlights": { "items": { "type": "string" }, "type": "array", "title": "Match Highlights" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" }, "primary_owners": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Primary Owners" }, "secondary_owners": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Secondary Owners" }, "is_internet": { "type": "boolean", "title": "Is Internet", "default": false }, "file_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Id" } }, "type": "object", "required": [ "document_id", "chunk_ind", "semantic_identifier", "blurb", "source_type", "boost", "hidden", "metadata", "match_highlights" ], "title": "SearchDoc" }, "ChatSearchResponse": { "properties": { "groups": { "items": { "$ref": "#/components/schemas/ChatSessionGroup" }, "type": "array", "title": "Groups" }, "has_more": { "type": "boolean", "title": "Has More" }, "next_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Next Page" } }, "type": "object", "required": ["groups", "has_more"], "title": "ChatSearchResponse" }, "BasicExpertInfo": { "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "first_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "First Name" }, "middle_initial": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Middle Initial" }, "last_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Name" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" } }, "type": "object", "title": "BasicExpertInfo", "description": "Basic Information for the owner of a document, any of the fields can be left as None\nDisplay fallback goes as follows:\n- first_name + (optional middle_initial) + last_name\n- display_name\n- email\n- first_name" }, "ChatMessageDetail": { "properties": { "chat_session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Chat Session Id" }, "message_id": { "type": "integer", "title": "Message Id" }, "parent_message": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Parent Message" }, "latest_child_message": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latest Child Message" }, "message": { "type": "string", "title": "Message" }, "reasoning_tokens": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reasoning Tokens" }, "message_type": { "$ref": "#/components/schemas/MessageType" }, "context_docs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/SavedSearchDoc" }, "type": "array" }, { "type": "null" } ], "title": "Context Docs" }, "citations": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Citations" }, "time_sent": { "type": "string", "format": "date-time", "title": "Time Sent" }, "files": { "items": { "$ref": "#/components/schemas/FileDescriptor" }, "type": "array", "title": "Files" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "current_feedback": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Feedback" } }, "type": "object", "required": [ "message_id", "message", "message_type", "time_sent", "files" ], "title": "ChatMessageDetail" }, "ImageGenerationToolStart": { "properties": { "type": { "type": "string", "const": "image_generation_start", "title": "Type", "default": "image_generation_start" } }, "type": "object", "title": "ImageGenerationToolStart" }, "ConnectorIndexingStatusLite": { "properties": { "cc_pair_id": { "type": "integer", "title": "Cc Pair Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "source": { "$ref": "#/components/schemas/DocumentSource" }, "access_type": { "$ref": "#/components/schemas/AccessType" }, "cc_pair_status": { "$ref": "#/components/schemas/ConnectorCredentialPairStatus" }, "in_progress": { "type": "boolean", "title": "In Progress" }, "in_repeated_error_state": { "type": "boolean", "title": "In Repeated Error State" }, "last_finished_status": { "anyOf": [ { "$ref": "#/components/schemas/IndexingStatus" }, { "type": "null" } ] }, "last_status": { "anyOf": [ { "$ref": "#/components/schemas/IndexingStatus" }, { "type": "null" } ] }, "last_success": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Success" }, "is_editable": { "type": "boolean", "title": "Is Editable" }, "docs_indexed": { "type": "integer", "title": "Docs Indexed" }, "latest_index_attempt_docs_indexed": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latest Index Attempt Docs Indexed" } }, "type": "object", "required": [ "cc_pair_id", "name", "source", "access_type", "cc_pair_status", "in_progress", "in_repeated_error_state", "last_finished_status", "last_status", "last_success", "is_editable", "docs_indexed", "latest_index_attempt_docs_indexed" ], "title": "ConnectorIndexingStatusLite" }, "PaginatedReturn_IndexAttemptSnapshot_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/IndexAttemptSnapshot" }, "type": "array", "title": "Items" }, "total_items": { "type": "integer", "title": "Total Items" } }, "type": "object", "required": ["items", "total_items"], "title": "PaginatedReturn[IndexAttemptSnapshot]" }, "ContainerVersions": { "properties": { "onyx": { "type": "string", "title": "Onyx" }, "relational_db": { "type": "string", "title": "Relational Db" }, "index": { "type": "string", "title": "Index" }, "nginx": { "type": "string", "title": "Nginx" } }, "type": "object", "required": ["onyx", "relational_db", "index", "nginx"], "title": "ContainerVersions" }, "DeepResearchPlanDelta": { "properties": { "type": { "type": "string", "const": "deep_research_plan_delta", "title": "Type", "default": "deep_research_plan_delta" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": ["content"], "title": "DeepResearchPlanDelta" }, "ConnectorCredentialPairIdentifier": { "properties": { "connector_id": { "type": "integer", "title": "Connector Id" }, "credential_id": { "type": "integer", "title": "Credential Id" } }, "type": "object", "required": ["connector_id", "credential_id"], "title": "ConnectorCredentialPairIdentifier" }, "BasicCCPairInfo": { "properties": { "has_successful_run": { "type": "boolean", "title": "Has Successful Run" }, "source": { "$ref": "#/components/schemas/DocumentSource" } }, "type": "object", "required": ["has_successful_run", "source"], "title": "BasicCCPairInfo" }, "ProjectPayload": { "properties": { "project": { "$ref": "#/components/schemas/UserProjectSnapshot" }, "files": { "anyOf": [ { "items": { "$ref": "#/components/schemas/UserFileSnapshot" }, "type": "array" }, { "type": "null" } ], "title": "Files" }, "persona_id_to_is_default": { "anyOf": [ { "additionalProperties": { "type": "boolean" }, "type": "object" }, { "type": "null" } ], "title": "Persona Id To Is Default" } }, "type": "object", "required": ["project"], "title": "ProjectPayload" }, "Body_bulk_invite_users_manage_admin_users_put": { "properties": { "emails": { "items": { "type": "string" }, "type": "array", "title": "Emails" } }, "type": "object", "required": ["emails"], "title": "Body_bulk_invite_users_manage_admin_users_put" }, "UserAdminAccessUpdateRequest": { "properties": { "user_email": { "type": "string", "title": "User Email" }, "is_admin": { "type": "boolean", "title": "Is Admin" } }, "type": "object", "required": ["user_email", "is_admin"], "title": "UserAdminAccessUpdateRequest" }, "UserPermissionsResponse": { "properties": { "permissions": { "items": { "type": "string" }, "type": "array", "title": "Permissions" }, "is_manager": { "type": "boolean", "title": "Is Manager" }, "managed_group_ids": { "items": { "type": "integer" }, "type": "array", "title": "Managed Group Ids" } }, "type": "object", "required": ["permissions", "is_manager", "managed_group_ids"], "title": "UserPermissionsResponse" }, "ChatFullResponse": { "properties": { "answer": { "type": "string", "title": "Answer" }, "answer_citationless": { "type": "string", "title": "Answer Citationless" }, "pre_answer_reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pre Answer Reasoning" }, "tool_calls": { "items": { "$ref": "#/components/schemas/ToolCallResponse" }, "type": "array", "title": "Tool Calls", "default": [] }, "top_documents": { "items": { "$ref": "#/components/schemas/SearchDoc" }, "type": "array", "title": "Top Documents" }, "citation_info": { "items": { "$ref": "#/components/schemas/CitationInfo" }, "type": "array", "title": "Citation Info" }, "message_id": { "type": "integer", "title": "Message Id" }, "chat_session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Chat Session Id" }, "incognito": { "type": "boolean", "title": "Incognito", "default": false }, "error_msg": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Msg" } }, "type": "object", "required": [ "answer", "answer_citationless", "top_documents", "citation_info", "message_id" ], "title": "ChatFullResponse", "description": "Complete non-streaming response with all available data." }, "TimeRange": { "properties": { "start": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Start" }, "end": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "End" } }, "type": "object", "title": "TimeRange", "description": "An inclusive [start, end] window; either bound may be None (open).\nNaive (timezone-less) bounds are treated as UTC." }, "ToolCallResponse": { "properties": { "tool_name": { "type": "string", "title": "Tool Name" }, "tool_arguments": { "additionalProperties": true, "type": "object", "title": "Tool Arguments" }, "tool_result": { "type": "string", "title": "Tool Result" }, "search_docs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/SearchDoc" }, "type": "array" }, { "type": "null" } ], "title": "Search Docs" }, "generated_images": { "anyOf": [ { "items": { "$ref": "#/components/schemas/GeneratedImage" }, "type": "array" }, { "type": "null" } ], "title": "Generated Images" }, "pre_reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pre Reasoning" } }, "type": "object", "required": ["tool_name", "tool_arguments", "tool_result"], "title": "ToolCallResponse", "description": "Tool call with full details for non-streaming response." }, "ChatMinimalTextMessage": { "properties": { "message": { "type": "string", "title": "Message" }, "message_type": { "$ref": "#/components/schemas/MessageType" } }, "type": "object", "required": ["message", "message_type"], "title": "ChatMinimalTextMessage" }, "SearchDocWithContent": { "properties": { "document_id": { "type": "string", "title": "Document Id" }, "chunk_ind": { "type": "integer", "title": "Chunk Ind" }, "semantic_identifier": { "type": "string", "title": "Semantic Identifier" }, "link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link" }, "blurb": { "type": "string", "title": "Blurb" }, "source_type": { "$ref": "#/components/schemas/DocumentSource" }, "boost": { "type": "integer", "title": "Boost" }, "hidden": { "type": "boolean", "title": "Hidden" }, "metadata": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ] }, "type": "object", "title": "Metadata" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" }, "is_relevant": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Relevant" }, "relevance_explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Relevance Explanation" }, "match_highlights": { "items": { "type": "string" }, "type": "array", "title": "Match Highlights" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" }, "primary_owners": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Primary Owners" }, "secondary_owners": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Secondary Owners" }, "is_internet": { "type": "boolean", "title": "Is Internet", "default": false }, "file_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Id" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content" } }, "type": "object", "required": [ "document_id", "chunk_ind", "semantic_identifier", "blurb", "source_type", "boost", "hidden", "metadata", "match_highlights", "content" ], "title": "SearchDocWithContent" }, "SearchFlowClassificationRequest": { "properties": { "user_query": { "type": "string", "title": "User Query", "description": "The query to classify." } }, "type": "object", "required": ["user_query"], "title": "SearchFlowClassificationRequest" }, "SearchFlowClassificationResponse": { "properties": { "is_search_flow": { "type": "boolean", "title": "Is Search Flow", "description": "True when the query looks like a search for documents, false when it should be sent to chat." } }, "type": "object", "required": ["is_search_flow"], "title": "SearchFlowClassificationResponse" }, "SearchFullResponse": { "properties": { "all_executed_queries": { "items": { "type": "string" }, "type": "array", "title": "All Executed Queries", "description": "Every query that was run, starting with the original. Contains more than one entry only when `run_query_expansion` was set." }, "search_docs": { "items": { "$ref": "#/components/schemas/SearchDocWithContent" }, "type": "array", "title": "Search Docs", "description": "Matched sections, most relevant first." }, "doc_selection_reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Doc Selection Reasoning", "description": "Reserved for the LLM's document-selection reasoning. Not currently populated \u2014 always `null` on this endpoint." }, "llm_selected_doc_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Llm Selected Doc Ids", "description": "Document ids the LLM picked out of `search_docs`. `null` when LLM selection was not requested or failed, an empty list when it ran and chose nothing." }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error", "description": "Set when the search failed partway through; the other fields hold whatever was gathered before the failure." } }, "type": "object", "required": ["all_executed_queries", "search_docs"], "title": "SearchFullResponse" }, "SearchHistoryResponse": { "properties": { "search_queries": { "items": { "$ref": "#/components/schemas/SearchQueryResponse" }, "type": "array", "title": "Search Queries" } }, "type": "object", "required": ["search_queries"], "title": "SearchHistoryResponse" }, "SearchQueryResponse": { "properties": { "query": { "type": "string", "title": "Query", "description": "The query as the user typed it." }, "query_expansions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Query Expansions", "description": "Extra keyword queries generated for this search, or `null` when expansion was not run." }, "created_at": { "type": "string", "format": "date-time", "title": "Created At", "description": "When the query was run." } }, "type": "object", "required": ["query", "query_expansions", "created_at"], "title": "SearchQueryResponse" }, "SearchRequest": { "properties": { "query": { "type": "string", "maxLength": 2048, "minLength": 1, "title": "Query", "description": "The query to search for." }, "sources": { "anyOf": [ { "items": { "$ref": "#/components/schemas/DocumentSource" }, "type": "array" }, { "type": "null" } ], "title": "Sources", "description": "Restrict results to these connector source types." }, "document_sets": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Document Sets", "description": "Restrict results to documents in these document sets, by name." }, "tags": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Tag" }, "type": "array" }, { "type": "null" } ], "title": "Tags", "description": "Restrict results to documents carrying all of these metadata tags." }, "time_cutoff": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Time Cutoff", "description": "ISO 8601 timestamp. Only documents updated on or after this moment are returned. Timestamps without a timezone are treated as UTC." }, "persona_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Persona Id", "description": "Search as this Agent: its document sets, attached documents and search start date are applied on top of the other filters, and its LLM is used unless `provider`/`model` say otherwise." }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider", "description": "Name of the LLM provider to use for query expansion and section selection. Must be sent together with `model`, and the caller must have access to the provider." }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model", "description": "Model to use from `provider`. Must be sent together with `provider`." }, "skip_query_expansion": { "type": "boolean", "title": "Skip Query Expansion", "default": false, "description": "When true, the query is run as written instead of being rewritten and expanded first." }, "message_history": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ChatMinimalTextMessage" }, "type": "array" }, { "type": "null" } ], "title": "Message History", "description": "Preceding conversation turns, used to interpret a query that depends on earlier context. Defaults to `query` on its own." } }, "type": "object", "required": ["query"], "title": "SearchRequest" }, "SearchResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/SearchResult" }, "type": "array", "title": "Results" } }, "type": "object", "required": ["results"], "title": "SearchResponse" }, "SearchResult": { "properties": { "citation_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Citation Id", "description": "1-based index of the source document. Several results share one `citation_id` when the search returned multiple non-overlapping sections of the same document." }, "title": { "type": "string", "title": "Title", "description": "Document title." }, "content": { "type": "string", "title": "Content", "description": "Full text of the matched section." }, "link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link", "description": "Link to the source document, when the connector provides one." }, "source_type": { "type": "string", "title": "Source Type", "description": "Connector source type the document came from." }, "updated_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Updated At", "description": "When the document was last updated, when the connector provides it." } }, "type": "object", "required": [ "citation_id", "title", "content", "link", "source_type", "updated_at" ], "title": "SearchResult" }, "SendSearchQueryRequest": { "properties": { "search_query": { "type": "string", "title": "Search Query", "description": "The query to search for." }, "filters": { "anyOf": [ { "$ref": "#/components/schemas/BaseFilters" }, { "type": "null" } ], "description": "Restrict which documents are searched. All fields are optional and combine with AND." }, "num_docs_fed_to_llm_selection": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Num Docs Fed To Llm Selection", "description": "When set to 1 or more, the top N merged sections are handed to an LLM that picks the most relevant ones, and their document ids come back in `llm_selected_doc_ids`. Omit it (or send `null`) to skip LLM selection and the extra LLM call it costs." }, "run_query_expansion": { "type": "boolean", "title": "Run Query Expansion", "default": false, "description": "When true, an LLM generates extra keyword queries from `search_query`. Every query runs in parallel and the results are merged with weighted reciprocal-rank fusion, with the original query weighted twice as heavily as each expansion. The queries that actually ran come back in `all_executed_queries`. Expansion failures are non-fatal: the original query still runs on its own." }, "num_hits": { "type": "integer", "title": "Num Hits", "default": 30, "description": "Maximum number of merged sections to return." }, "hybrid_alpha": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Hybrid Alpha", "description": "Balance between vector and keyword matching, from `0.0` (pure keyword) to `1.0` (pure vector). Leave unset to use the deployment's `HYBRID_ALPHA` (`0.5` by default) \u2014 except on deployments configured for OpenSearch keyword search, where leaving it unset runs a pure keyword search." }, "include_content": { "type": "boolean", "title": "Include Content", "default": false, "description": "When true, each returned document carries the full text of the matched section in `content`. When false, `content` is `null` and only `blurb` is populated." }, "stream": { "type": "boolean", "title": "Stream", "default": false, "description": "When true, responds with a stream of newline-delimited JSON packets. When false (the default), returns the aggregated `SearchFullResponse`." } }, "type": "object", "required": ["search_query"], "title": "SendSearchQueryRequest" } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Authorization header with Bearer token" } } } }