From 3368e452345039dcd5dbad4630a3b2dd2ec60d61 Mon Sep 17 00:00:00 2001 From: raphaelchristi <79842132+raphaelchristi@users.noreply.github.com> Date: Mon, 21 Apr 2025 20:14:30 +0000 Subject: [PATCH] docs: OpenAPI spec version upgraded from 1.3.2 to 1.3.4 --- docs/openapi.json | 173 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 165 insertions(+), 8 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index 82b6804b8806..f60b8564c4ea 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "Langflow", - "version": "1.3.2" + "version": "1.3.4" }, "paths": { "/api/v1/build/{flow_id}/vertices": { @@ -104,7 +104,7 @@ "Chat" ], "summary": "Build Flow", - "description": "Build and process a flow, returning a job ID for event polling.\n\nThis endpoint requires authentication through the CurrentActiveUser dependency.\nFor public flows that don't require authentication, use the /build_public_tmp/flow_id/flow endpoint.\n\nArgs:\n flow_id: UUID of the flow to build\n background_tasks: Background tasks manager\n inputs: Optional input values for the flow\n data: Optional flow data\n files: Optional files to include\n stop_component_id: Optional ID of component to stop at\n start_component_id: Optional ID of component to start from\n log_builds: Whether to log the build process\n current_user: The authenticated user\n queue_service: Queue service for job management\n flow_name: Optional name for the flow\n settings_service: Settings service\n\nReturns:\n Dict with job_id that can be used to poll for build status", + "description": "Build and process a flow, returning a job ID for event polling.\n\nThis endpoint requires authentication through the CurrentActiveUser dependency.\nFor public flows that don't require authentication, use the /build_public_tmp/{flow_id}/flow endpoint.\n\nArgs:\n flow_id: UUID of the flow to build\n background_tasks: Background tasks manager\n inputs: Optional input values for the flow\n data: Optional flow data\n files: Optional files to include\n stop_component_id: Optional ID of component to stop at\n start_component_id: Optional ID of component to start from\n log_builds: Whether to log the build process\n current_user: The authenticated user\n queue_service: Queue service for job management\n flow_name: Optional name for the flow\n event_delivery: Optional event delivery type - default is streaming\n\nReturns:\n Dict with job_id that can be used to poll for build status", "operationId": "build_flow_api_v1_build__flow_id__flow_post", "security": [ { @@ -185,6 +185,15 @@ ], "title": "Flow Name" } + }, + { + "name": "event_delivery", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/EventDeliveryType", + "default": "polling" + } } ], "requestBody": { @@ -237,13 +246,12 @@ } }, { - "name": "stream", + "name": "event_delivery", "in": "query", "required": false, "schema": { - "type": "boolean", - "default": true, - "title": "Stream" + "$ref": "#/components/schemas/EventDeliveryType", + "default": "streaming" } } ], @@ -439,7 +447,7 @@ "Chat" ], "summary": "Build Public Tmp", - "description": "Build a public flow without requiring authentication.\n\nThis endpoint is specifically for public flows that don't require authentication.\nIt uses a client_id cookie to create a deterministic flow ID for tracking purposes.\n\nThe endpoint:\n1. Verifies the requested flow is marked as public in the database\n2. Creates a deterministic UUID based on client_id and flow_id\n3. Uses the flow owner's permissions to build the flow\n\nRequirements:\n- The flow must be marked as PUBLIC in the database\n- The request must include a client_id cookie\n\nArgs:\n flow_id: UUID of the public flow to build\n background_tasks: Background tasks manager\n inputs: Optional input values for the flow\n data: Optional flow data\n files: Optional files to include\n stop_component_id: Optional ID of component to stop at\n start_component_id: Optional ID of component to start from\n log_builds: Whether to log the build process\n flow_name: Optional name for the flow\n request: FastAPI request object (needed for cookie access)\n queue_service: Queue service for job management\n\nReturns:\n Dict with job_id that can be used to poll for build status", + "description": "Build a public flow without requiring authentication.\n\nThis endpoint is specifically for public flows that don't require authentication.\nIt uses a client_id cookie to create a deterministic flow ID for tracking purposes.\n\nThe endpoint:\n1. Verifies the requested flow is marked as public in the database\n2. Creates a deterministic UUID based on client_id and flow_id\n3. Uses the flow owner's permissions to build the flow\n\nRequirements:\n- The flow must be marked as PUBLIC in the database\n- The request must include a client_id cookie\n\nArgs:\n flow_id: UUID of the public flow to build\n background_tasks: Background tasks manager\n inputs: Optional input values for the flow\n data: Optional flow data\n files: Optional files to include\n stop_component_id: Optional ID of component to stop at\n start_component_id: Optional ID of component to start from\n log_builds: Whether to log the build process\n flow_name: Optional name for the flow\n request: FastAPI request object (needed for cookie access)\n queue_service: Queue service for job management\n event_delivery: Optional event delivery type - default is streaming\n\nReturns:\n Dict with job_id that can be used to poll for build status", "operationId": "build_public_tmp_api_v1_build_public_tmp__flow_id__flow_post", "parameters": [ { @@ -516,6 +524,15 @@ ], "title": "Flow Name" } + }, + { + "name": "event_delivery", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/EventDeliveryType", + "default": "polling" + } } ], "requestBody": { @@ -746,7 +763,7 @@ "Base" ], "summary": "Experimental Run Flow", - "description": "Executes a specified flow by ID with optional input values, output selection, tweaks, and streaming capability.\n\nThis endpoint supports running flows with caching to enhance performance and efficiency.\n\n### Parameters:\n- `flow_id` (str): The unique identifier of the flow to be executed.\n- `inputs` (List[InputValueRequest], optional): A list of inputs specifying the input values and components\n for the flow. Each input can target specific components and provide custom values.\n- `outputs` (List[str], optional): A list of output names to retrieve from the executed flow.\n If not provided, all outputs are returned.\n- `tweaks` (Optional[Tweaks], optional): A dictionary of tweaks to customize the flow execution.\n The tweaks can be used to modify the flow's parameters and components.\n Tweaks can be overridden by the input values.\n- `stream` (bool, optional): Specifies whether the results should be streamed. Defaults to False.\n- `session_id` (Union[None, str], optional): An optional session ID to utilize existing session data for the flow\n execution.\n- `api_key_user` (User): The user associated with the current API key. Automatically resolved from the API key.\n\n### Returns:\nA `RunResponse` object containing the selected outputs (or all if not specified) of the executed flow\nand the session ID.\nThe structure of the response accommodates multiple inputs, providing a nested list of outputs for each input.\n\n### Raises:\nHTTPException: Indicates issues with finding the specified flow, invalid input formats, or internal errors during\nflow execution.\n\n### Example usage:\n```json\nPOST /run/flow_id\nx-api-key: YOUR_API_KEY\nPayload:\n{\n \"inputs\": [\n {\"components\": [\"component1\"], \"input_value\": \"value1\"},\n {\"components\": [\"component3\"], \"input_value\": \"value2\"}\n ],\n \"outputs\": [\"Component Name\", \"component_id\"],\n \"tweaks\": {\"parameter_name\": \"value\", \"Component Name\": {\"parameter_name\": \"value\"}, \"component_id\": {\"parameter_name\": \"value\"}}\n \"stream\": false\n}\n```\n\nThis endpoint facilitates complex flow executions with customized inputs, outputs, and configurations,\ncatering to diverse application requirements.", + "description": "Executes a specified flow by ID with optional input values, output selection, tweaks, and streaming capability.\n\nThis endpoint supports running flows with caching to enhance performance and efficiency.\n\n### Parameters:\n- `flow_id` (str): The unique identifier of the flow to be executed.\n- `inputs` (List[InputValueRequest], optional): A list of inputs specifying the input values and components\n for the flow. Each input can target specific components and provide custom values.\n- `outputs` (List[str], optional): A list of output names to retrieve from the executed flow.\n If not provided, all outputs are returned.\n- `tweaks` (Optional[Tweaks], optional): A dictionary of tweaks to customize the flow execution.\n The tweaks can be used to modify the flow's parameters and components.\n Tweaks can be overridden by the input values.\n- `stream` (bool, optional): Specifies whether the results should be streamed. Defaults to False.\n- `session_id` (Union[None, str], optional): An optional session ID to utilize existing session data for the flow\n execution.\n- `api_key_user` (User): The user associated with the current API key. Automatically resolved from the API key.\n\n### Returns:\nA `RunResponse` object containing the selected outputs (or all if not specified) of the executed flow\nand the session ID.\nThe structure of the response accommodates multiple inputs, providing a nested list of outputs for each input.\n\n### Raises:\nHTTPException: Indicates issues with finding the specified flow, invalid input formats, or internal errors during\nflow execution.\n\n### Example usage:\n```json\nPOST /run/{flow_id}\nx-api-key: YOUR_API_KEY\nPayload:\n{\n \"inputs\": [\n {\"components\": [\"component1\"], \"input_value\": \"value1\"},\n {\"components\": [\"component3\"], \"input_value\": \"value2\"}\n ],\n \"outputs\": [\"Component Name\", \"component_id\"],\n \"tweaks\": {\"parameter_name\": \"value\", \"Component Name\": {\"parameter_name\": \"value\"}, \"component_id\": {\"parameter_name\": \"value\"}}\n \"stream\": false\n}\n```\n\nThis endpoint facilitates complex flow executions with customized inputs, outputs, and configurations,\ncatering to diverse application requirements.", "operationId": "experimental_run_flow_api_v1_run_advanced__flow_id__post", "security": [ { @@ -4615,6 +4632,123 @@ } } }, + "/api/v2/files/": { + "get": { + "tags": [ + "Files" + ], + "summary": "List Files", + "description": "List the files available to the current user.", + "operationId": "list_files_api_v2_files__get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/langflow__services__database__models__file__model__File" + }, + "type": "array", + "title": "Response List Files Api V2 Files Get" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "API key query": [] + }, + { + "API key header": [] + } + ] + }, + "post": { + "tags": [ + "Files" + ], + "summary": "Upload User File", + "description": "Upload a file for the current user and track it in the database.", + "operationId": "upload_user_file_api_v2_files__post", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_upload_user_file_api_v2_files__post" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/langflow__api__schemas__UploadFileResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "API key query": [] + }, + { + "API key header": [] + } + ] + }, + "delete": { + "tags": [ + "Files" + ], + "summary": "Delete All Files", + "description": "Delete all files for the current user.", + "operationId": "delete_all_files_api_v2_files__delete", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "API key query": [] + }, + { + "API key header": [] + } + ] + } + }, "/api/v2/files": { "get": { "tags": [ @@ -5546,6 +5680,20 @@ ], "title": "Body_upload_file_api_v1_folders_upload__post" }, + "Body_upload_user_file_api_v2_files__post": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File" + } + }, + "type": "object", + "required": [ + "file" + ], + "title": "Body_upload_user_file_api_v2_files__post" + }, "Body_upload_user_file_api_v2_files_post": { "properties": { "file": { @@ -6011,6 +6159,15 @@ ], "title": "ErrorLog" }, + "EventDeliveryType": { + "type": "string", + "enum": [ + "streaming", + "direct", + "polling" + ], + "title": "EventDeliveryType" + }, "FeatureFlags": { "properties": { "mvp_components": {