diff --git a/api/controllers/common/schema.py b/api/controllers/common/schema.py
index 70d24b005ff..e3172f81c73 100644
--- a/api/controllers/common/schema.py
+++ b/api/controllers/common/schema.py
@@ -1,9 +1,9 @@
"""Helpers for registering Pydantic models with Flask-RESTX namespaces.
Flask-RESTX treats `SchemaModel` bodies as opaque JSON schemas; it does not
-promote Pydantic's nested `$defs` into top-level Swagger `definitions`.
+promote Pydantic's nested `$defs` into top-level OpenAPI component schemas.
These helpers keep that translation centralized so models registered through
-`register_schema_models` emit resolvable Swagger 2.0 references.
+`register_schema_models` emit resolvable OpenAPI 3 references.
"""
from collections.abc import Iterable, Mapping
@@ -14,7 +14,7 @@ from flask import request
from flask_restx import Namespace
from pydantic import BaseModel, TypeAdapter
-DEFAULT_REF_TEMPLATE_SWAGGER_2_0 = "#/definitions/{model}"
+DEFAULT_REF_TEMPLATE_OPENAPI_3_0 = "#/components/schemas/{model}"
QueryParamDoc = TypedDict(
@@ -48,7 +48,6 @@ class QueryArgs(Protocol):
def _register_json_schema(namespace: Namespace, name: str, schema: dict) -> None:
"""Register a JSON schema and promote any nested Pydantic `$defs`."""
- schema = _swagger_2_compatible_schema(schema)
nested_definitions = schema.get("$defs")
schema_to_register = dict(schema)
if isinstance(nested_definitions, dict):
@@ -71,41 +70,12 @@ def _register_schema_model(namespace: Namespace, model: type[BaseModel], *, mode
_register_json_schema(
namespace,
model.__name__,
- model.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_SWAGGER_2_0, mode=mode),
+ model.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_OPENAPI_3_0, mode=mode),
)
-def _swagger_2_compatible_schema(value: Any) -> Any:
- if isinstance(value, list):
- return [_swagger_2_compatible_schema(item) for item in value]
-
- if not isinstance(value, dict):
- return value
-
- converted = {key: _swagger_2_compatible_schema(child) for key, child in value.items()}
- any_of = value.get("anyOf")
- if not isinstance(any_of, list):
- return converted
-
- non_null_candidates = [
- candidate for candidate in any_of if isinstance(candidate, Mapping) and candidate.get("type") != "null"
- ]
- has_null_candidate = any(isinstance(candidate, Mapping) and candidate.get("type") == "null" for candidate in any_of)
- if not has_null_candidate or len(non_null_candidates) != 1:
- return converted
-
- non_null_schema = _swagger_2_compatible_schema(dict(non_null_candidates[0]))
- if not isinstance(non_null_schema, dict):
- return converted
-
- converted.pop("anyOf", None)
- converted.update(non_null_schema)
- converted["x-nullable"] = True
- return converted
-
-
def register_schema_model(namespace: Namespace, model: type[BaseModel]) -> None:
- """Register a BaseModel and its nested schema definitions for Swagger documentation."""
+ """Register a BaseModel and its nested component schemas for OpenAPI documentation."""
_register_schema_model(namespace, model, mode="validation")
@@ -146,7 +116,7 @@ def register_enum_models(namespace: Namespace, *models: type[StrEnum]) -> None:
_register_json_schema(
namespace,
model.__name__,
- TypeAdapter(model).json_schema(ref_template=DEFAULT_REF_TEMPLATE_SWAGGER_2_0),
+ TypeAdapter(model).json_schema(ref_template=DEFAULT_REF_TEMPLATE_OPENAPI_3_0),
)
@@ -155,10 +125,10 @@ def query_params_from_model(model: type[BaseModel]) -> dict[str, QueryParamDoc]:
`Namespace.expect()` treats Pydantic schema models as request bodies, so GET
endpoints should keep runtime validation on the Pydantic model and feed this
- derived mapping to `Namespace.doc(params=...)` for Swagger documentation.
+ derived mapping to `Namespace.doc(params=...)` for OpenAPI documentation.
"""
- schema = model.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_SWAGGER_2_0)
+ schema = model.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_OPENAPI_3_0)
properties = schema.get("properties", {})
if not isinstance(properties, Mapping):
return {}
@@ -203,7 +173,7 @@ def query_params_from_request[ModelT: BaseModel](
def _drop_malformed_defaulted_integer_params(model: type[BaseModel], params: dict[str, Any]) -> None:
- properties = model.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_SWAGGER_2_0).get("properties", {})
+ properties = model.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_OPENAPI_3_0).get("properties", {})
if not isinstance(properties, Mapping):
return
@@ -297,7 +267,7 @@ def _nullable_property_schema(property_schema: Mapping[str, Any]) -> Mapping[str
__all__ = [
- "DEFAULT_REF_TEMPLATE_SWAGGER_2_0",
+ "DEFAULT_REF_TEMPLATE_OPENAPI_3_0",
"get_or_create_model",
"query_params_from_model",
"query_params_from_request",
diff --git a/api/controllers/console/app/advanced_prompt_template.py b/api/controllers/console/app/advanced_prompt_template.py
index ad21671176f..0ad7eee7cdf 100644
--- a/api/controllers/console/app/advanced_prompt_template.py
+++ b/api/controllers/console/app/advanced_prompt_template.py
@@ -2,6 +2,7 @@ from flask import request
from flask_restx import Resource, fields
from pydantic import BaseModel, Field
+from controllers.common.schema import DEFAULT_REF_TEMPLATE_OPENAPI_3_0
from controllers.console import console_ns
from controllers.console.wraps import account_initialization_required, setup_required
from libs.login import login_required
@@ -17,7 +18,7 @@ class AdvancedPromptTemplateQuery(BaseModel):
console_ns.schema_model(
AdvancedPromptTemplateQuery.__name__,
- AdvancedPromptTemplateQuery.model_json_schema(ref_template="#/definitions/{model}"),
+ AdvancedPromptTemplateQuery.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_OPENAPI_3_0),
)
diff --git a/api/controllers/console/billing/compliance.py b/api/controllers/console/billing/compliance.py
index 3d528e1ddd3..b0b364e54d2 100644
--- a/api/controllers/console/billing/compliance.py
+++ b/api/controllers/console/billing/compliance.py
@@ -7,6 +7,7 @@ from libs.login import login_required
from models import Account
from services.billing_service import BillingService
+from ...common.schema import DEFAULT_REF_TEMPLATE_OPENAPI_3_0
from .. import console_ns
from ..wraps import (
account_initialization_required,
@@ -23,7 +24,7 @@ class ComplianceDownloadQuery(BaseModel):
console_ns.schema_model(
ComplianceDownloadQuery.__name__,
- ComplianceDownloadQuery.model_json_schema(ref_template="#/definitions/{model}"),
+ ComplianceDownloadQuery.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_OPENAPI_3_0),
)
diff --git a/api/controllers/console/extension.py b/api/controllers/console/extension.py
index 26a348da404..6f1da8783e9 100644
--- a/api/controllers/console/extension.py
+++ b/api/controllers/console/extension.py
@@ -14,7 +14,7 @@ from models.api_based_extension import APIBasedExtension
from services.api_based_extension_service import APIBasedExtensionService
from services.code_based_extension_service import CodeBasedExtensionService
-from ..common.schema import DEFAULT_REF_TEMPLATE_SWAGGER_2_0, register_schema_models
+from ..common.schema import DEFAULT_REF_TEMPLATE_OPENAPI_3_0, register_schema_models
from . import console_ns
from .wraps import account_initialization_required, setup_required, with_current_tenant_id
@@ -63,7 +63,7 @@ class APIBasedExtensionResponse(ResponseModel):
register_schema_models(console_ns, APIBasedExtensionPayload, CodeBasedExtensionResponse, APIBasedExtensionResponse)
console_ns.schema_model(
"APIBasedExtensionListResponse",
- TypeAdapter(list[APIBasedExtensionResponse]).json_schema(ref_template=DEFAULT_REF_TEMPLATE_SWAGGER_2_0),
+ TypeAdapter(list[APIBasedExtensionResponse]).json_schema(ref_template=DEFAULT_REF_TEMPLATE_OPENAPI_3_0),
)
diff --git a/api/dev/generate_fastopenapi_specs.py b/api/dev/generate_fastopenapi_specs.py
index 5a94d32b939..2a7f9450884 100644
--- a/api/dev/generate_fastopenapi_specs.py
+++ b/api/dev/generate_fastopenapi_specs.py
@@ -1,4 +1,4 @@
-"""Generate FastOpenAPI OpenAPI 3.0 specs without booting the full backend."""
+"""Generate FastOpenAPI OpenAPI 3.1 specs without booting the full backend."""
from __future__ import annotations
diff --git a/api/dev/generate_swagger_markdown_docs.py b/api/dev/generate_swagger_markdown_docs.py
index 75575b355b3..7028f740e02 100644
--- a/api/dev/generate_swagger_markdown_docs.py
+++ b/api/dev/generate_swagger_markdown_docs.py
@@ -1,7 +1,7 @@
"""Generate OpenAPI JSON specs and split Markdown API docs.
The Markdown step uses `swagger-markdown`, the same converter family as the
-Swagger Markdown UI, so CI and local regeneration catch converter-incompatible
+legacy Markdown UI, so CI and local regeneration catch converter-incompatible
OpenAPI output early.
"""
@@ -25,19 +25,21 @@ from dev.generate_swagger_specs import SPEC_TARGETS, generate_specs
logger = logging.getLogger(__name__)
SWAGGER_MARKDOWN_PACKAGE = "swagger-markdown@3.0.0"
-CONSOLE_SWAGGER_FILENAME = "console-swagger.json"
+CONSOLE_OPENAPI_FILENAME = "console-openapi.json"
STALE_COMBINED_MARKDOWN_FILENAME = "api-reference.md"
-def _definition_ref_name(schema: object) -> str | None:
+def _schema_ref_name(schema: object) -> str | None:
if not isinstance(schema, dict):
return None
ref = schema.get("$ref")
- if not isinstance(ref, str) or not ref.startswith("#/definitions/"):
+ if not isinstance(ref, str):
return None
- return ref.removeprefix("#/definitions/")
+ if ref.startswith("#/components/schemas/"):
+ return ref.removeprefix("#/components/schemas/")
+ return None
def _markdown_anchor(name: str) -> str:
@@ -48,7 +50,7 @@ def _schema_markdown_type(schema: object) -> str:
if not isinstance(schema, dict):
return ""
- ref_name = _definition_ref_name(schema)
+ ref_name = _schema_ref_name(schema)
if ref_name is not None:
return f"[{ref_name}](#{_markdown_anchor(ref_name)})"
@@ -111,15 +113,16 @@ def _has_union_schema(schema: object) -> bool:
def _patch_union_schema_markdown(markdown: str, spec_path: Path) -> str:
- """Fill Swagger Markdown table cells that `swagger-markdown` leaves blank for union schemas."""
+ """Fill Markdown table cells that `swagger-markdown` leaves blank for union schemas."""
spec = json.loads(spec_path.read_text(encoding="utf-8"))
- definitions = spec.get("definitions")
- if not isinstance(definitions, dict):
+ components = spec.get("components")
+ schemas = components.get("schemas") if isinstance(components, dict) else None
+ if not isinstance(schemas, dict):
return markdown
- for definition_name, schema in definitions.items():
- if not isinstance(definition_name, str) or not isinstance(schema, dict):
+ for schema_name, schema in schemas.items():
+ if not isinstance(schema_name, str) or not isinstance(schema, dict):
continue
properties = schema.get("properties")
@@ -128,7 +131,7 @@ def _patch_union_schema_markdown(markdown: str, spec_path: Path) -> str:
if isinstance(property_name, str) and _has_union_schema(property_schema):
markdown = _replace_schema_table_type(
markdown,
- definition_name,
+ schema_name,
property_name,
_schema_markdown_type(property_schema),
)
@@ -139,14 +142,14 @@ def _patch_union_schema_markdown(markdown: str, spec_path: Path) -> str:
markdown = _replace_schema_table_type(
markdown,
- definition_name,
- definition_name,
+ schema_name,
+ schema_name,
_schema_markdown_type(schema),
)
for variant in union_variants:
- variant_name = _definition_ref_name(variant)
- variant_schema = definitions.get(variant_name) if variant_name is not None else None
+ variant_name = _schema_ref_name(variant)
+ variant_schema = schemas.get(variant_name) if variant_name is not None else None
if not isinstance(variant_name, str) or not isinstance(variant_schema, dict):
continue
properties = variant_schema.get("properties")
@@ -229,7 +232,7 @@ def _append_fastopenapi_markdown(console_markdown_path: Path, fastopenapi_markdo
"\n\n".join(
[
console_markdown,
- "## FastOpenAPI Preview (OpenAPI 3.0)",
+ "## FastOpenAPI Preview (OpenAPI 3.1)",
fastopenapi_markdown,
]
)
@@ -239,17 +242,17 @@ def _append_fastopenapi_markdown(console_markdown_path: Path, fastopenapi_markdo
def generate_markdown_docs(
- swagger_dir: Path,
+ openapi_dir: Path,
markdown_dir: Path,
*,
keep_swagger_json: bool = False,
) -> list[Path]:
"""Generate intermediate specs, convert them to split Markdown API docs, and return Markdown paths."""
- swagger_paths = generate_specs(swagger_dir)
- fastopenapi_paths = generate_fastopenapi_specs(swagger_dir)
- spec_paths = [*swagger_paths, *fastopenapi_paths]
- swagger_paths_by_name = {path.name: path for path in swagger_paths}
+ openapi_paths = generate_specs(openapi_dir)
+ fastopenapi_paths = generate_fastopenapi_specs(openapi_dir)
+ spec_paths = [*openapi_paths, *fastopenapi_paths]
+ openapi_paths_by_name = {path.name: path for path in openapi_paths}
fastopenapi_paths_by_name = {path.name: path for path in fastopenapi_paths}
markdown_dir.mkdir(parents=True, exist_ok=True)
@@ -260,9 +263,9 @@ def generate_markdown_docs(
temp_markdown_dir = Path(temp_dir)
for target in SPEC_TARGETS:
- swagger_path = swagger_paths_by_name[target.filename]
- markdown_path = markdown_dir / f"{swagger_path.stem}.md"
- _convert_spec_to_markdown(swagger_path, markdown_path)
+ openapi_path = openapi_paths_by_name[target.filename]
+ markdown_path = markdown_dir / f"{openapi_path.stem}.md"
+ _convert_spec_to_markdown(openapi_path, markdown_path)
written_paths.append(markdown_path)
for target in FASTOPENAPI_SPEC_TARGETS: # type: ignore
@@ -270,7 +273,7 @@ def generate_markdown_docs(
markdown_path = temp_markdown_dir / f"{fastopenapi_path.stem}.md"
_convert_spec_to_markdown(fastopenapi_path, markdown_path)
- console_markdown_path = markdown_dir / f"{Path(CONSOLE_SWAGGER_FILENAME).stem}.md"
+ console_markdown_path = markdown_dir / f"{Path(CONSOLE_OPENAPI_FILENAME).stem}.md"
_append_fastopenapi_markdown(console_markdown_path, markdown_path)
(markdown_dir / STALE_COMBINED_MARKDOWN_FILENAME).unlink(missing_ok=True)
@@ -286,6 +289,8 @@ def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--swagger-dir",
+ "--openapi-dir",
+ dest="openapi_dir",
type=Path,
default=Path("openapi"),
help="Directory where intermediate JSON spec files will be written.",
@@ -307,7 +312,7 @@ def parse_args() -> argparse.Namespace:
def main() -> int:
args = parse_args()
written_paths = generate_markdown_docs(
- args.swagger_dir,
+ args.openapi_dir,
args.markdown_dir,
keep_swagger_json=args.keep_swagger_json,
)
diff --git a/api/dev/generate_swagger_specs.py b/api/dev/generate_swagger_specs.py
index b7c58d64441..6b959b6d17e 100644
--- a/api/dev/generate_swagger_specs.py
+++ b/api/dev/generate_swagger_specs.py
@@ -1,9 +1,9 @@
-"""Generate Flask-RESTX Swagger 2.0 specs without booting the full backend.
+"""Generate Flask-RESTX OpenAPI 3 specs without booting the full backend.
This helper intentionally avoids `app_factory.create_app()`. The normal backend
startup eagerly initializes database, Redis, Celery, and storage extensions,
which is unnecessary when the goal is only to serialize the Flask-RESTX
-`/swagger.json` documents.
+`/openapi.json` documents.
"""
from __future__ import annotations
@@ -42,10 +42,10 @@ class RestxApi(Protocol):
SPEC_TARGETS: tuple[SpecTarget, ...] = (
- SpecTarget(route="/console/api/swagger.json", filename="console-swagger.json", namespace="console"),
- SpecTarget(route="/api/swagger.json", filename="web-swagger.json", namespace="web"),
- SpecTarget(route="/v1/swagger.json", filename="service-swagger.json", namespace="service"),
- SpecTarget(route="/openapi/v1/swagger.json", filename="openapi-swagger.json", namespace="openapi"),
+ SpecTarget(route="/console/api/openapi.json", filename="console-openapi.json", namespace="console"),
+ SpecTarget(route="/api/openapi.json", filename="web-openapi.json", namespace="web"),
+ SpecTarget(route="/v1/openapi.json", filename="service-openapi.json", namespace="service"),
+ SpecTarget(route="/openapi/v1/openapi.json", filename="openapi-openapi.json", namespace="openapi"),
)
@@ -126,7 +126,7 @@ def _inline_model_signature(nested_fields: dict[object, object]) -> object:
def _inline_model_name(nested_fields: dict[object, object]) -> str:
- """Return a stable Swagger model name for an anonymous inline field map."""
+ """Return a stable OpenAPI model name for an anonymous inline field map."""
signature = json.dumps(_inline_model_signature(nested_fields), sort_keys=True, separators=(",", ":"))
digest = hashlib.sha1(signature.encode("utf-8")).hexdigest()[:12]
@@ -134,7 +134,7 @@ def _inline_model_name(nested_fields: dict[object, object]) -> str:
def apply_runtime_defaults() -> None:
- """Force the small config surface required for Swagger generation."""
+ """Force the small config surface required for OpenAPI generation."""
os.environ.setdefault("SECRET_KEY", "spec-export")
os.environ.setdefault("STORAGE_TYPE", "local")
@@ -150,7 +150,7 @@ def apply_runtime_defaults() -> None:
def create_spec_app() -> Flask:
- """Build a minimal Flask app that only mounts the Swagger-producing blueprints."""
+ """Build a minimal Flask app that only mounts the OpenAPI-producing blueprints."""
apply_runtime_defaults()
@@ -182,7 +182,7 @@ def create_spec_app() -> Flask:
def _registered_models(namespace: str) -> dict[str, object]:
- """Return the Flask-RESTX models registered for a Swagger namespace."""
+ """Return the Flask-RESTX models registered for an OpenAPI namespace."""
if namespace == "console":
from controllers.console import console_ns
@@ -213,7 +213,7 @@ def _registered_models(namespace: str) -> dict[str, object]:
models.update(api.models)
return models
- raise ValueError(f"unknown Swagger namespace: {namespace}")
+ raise ValueError(f"unknown OpenAPI namespace: {namespace}")
def _materialize_inline_model_definitions(api: RestxApi) -> None:
@@ -289,7 +289,7 @@ def drop_null_values(value: object) -> object:
def sort_openapi_arrays(value: object, *, parent_key: str | None = None) -> object:
- """Sort order-insensitive Swagger arrays so generated Markdown is stable."""
+ """Sort order-insensitive OpenAPI arrays so generated Markdown is stable."""
if isinstance(value, dict):
return {key: sort_openapi_arrays(item, parent_key=key) for key, item in value.items()}
@@ -313,23 +313,174 @@ def sort_openapi_arrays(value: object, *, parent_key: str | None = None) -> obje
return sorted_items
-def _merge_registered_definitions(payload: dict[str, object], namespace: str) -> dict[str, object]:
- """Include registered but route-indirect models in the exported Swagger definitions."""
+def _replace_legacy_refs(value: object) -> object:
+ if isinstance(value, dict):
+ replaced: dict[object, object] = {}
+ for key, item in value.items():
+ if key == "$ref" and isinstance(item, str) and item.startswith("#/definitions/"):
+ replaced[key] = item.replace("#/definitions/", "#/components/schemas/", 1)
+ else:
+ replaced[key] = _replace_legacy_refs(item)
+ return replaced
+ if isinstance(value, list):
+ return [_replace_legacy_refs(item) for item in value]
+ return value
- definitions = payload.setdefault("definitions", {})
- if not isinstance(definitions, dict):
- raise RuntimeError("unexpected Swagger definitions payload")
+
+HTTP_METHODS = {"delete", "get", "head", "options", "patch", "post", "put", "trace"}
+
+
+def _resolve_component_schema(payload: dict[str, object], schema: object) -> dict[str, object] | None:
+ if not isinstance(schema, dict):
+ return None
+
+ ref = schema.get("$ref")
+ if isinstance(ref, str) and ref.startswith("#/components/schemas/"):
+ name = ref.removeprefix("#/components/schemas/")
+ components = payload.get("components")
+ if not isinstance(components, dict):
+ return None
+ schemas = components.get("schemas")
+ if not isinstance(schemas, dict):
+ return None
+ resolved = schemas.get(name)
+ return resolved if isinstance(resolved, dict) else None
+
+ return schema
+
+
+def _request_body_schema(request_body: object) -> object | None:
+ if not isinstance(request_body, dict):
+ return None
+ content = request_body.get("content")
+ if not isinstance(content, dict):
+ return None
+ media_type = content.get("application/json")
+ if not isinstance(media_type, dict):
+ return None
+ return media_type.get("schema")
+
+
+def _query_parameters_from_schema(schema: dict[str, object]) -> list[dict[str, object]]:
+ properties = schema.get("properties")
+ if not isinstance(properties, dict):
+ return []
+
+ required = schema.get("required")
+ required_names = set(required) if isinstance(required, list) else set()
+ parameters: list[dict[str, object]] = []
+
+ for name, property_schema in sorted(properties.items()):
+ if not isinstance(name, str) or not isinstance(property_schema, dict):
+ continue
+ schema_copy = dict(property_schema)
+ description = schema_copy.get("description")
+ parameter: dict[str, object] = {
+ "name": name,
+ "in": "query",
+ "required": name in required_names,
+ "schema": schema_copy,
+ }
+ if isinstance(description, str):
+ parameter["description"] = description
+ parameters.append(parameter)
+
+ return parameters
+
+
+def _move_get_request_bodies_to_query_parameters(payload: dict[str, object]) -> dict[str, object]:
+ """Represent GET request bodies as query parameters in exported specs."""
+
+ paths = payload.get("paths")
+ if not isinstance(paths, dict):
+ return payload
+
+ for path_item in paths.values():
+ if not isinstance(path_item, dict):
+ continue
+ operation = path_item.get("get")
+ if not isinstance(operation, dict) or "requestBody" not in operation:
+ continue
+
+ schema = _resolve_component_schema(payload, _request_body_schema(operation.get("requestBody")))
+ existing_parameters = operation.get("parameters")
+ parameters = list(existing_parameters) if isinstance(existing_parameters, list) else []
+ existing_query_names = {
+ parameter.get("name")
+ for parameter in parameters
+ if isinstance(parameter, dict) and parameter.get("in") == "query"
+ }
+
+ if schema is not None:
+ for parameter in _query_parameters_from_schema(schema):
+ if parameter["name"] not in existing_query_names:
+ parameters.append(parameter)
+
+ if parameters:
+ operation["parameters"] = parameters
+ operation.pop("requestBody", None)
+
+ return payload
+
+
+def _deduplicate_operation_ids(payload: dict[str, object]) -> dict[str, object]:
+ """Make operationId values unique while preserving already-unique IDs."""
+
+ paths = payload.get("paths")
+ if not isinstance(paths, dict):
+ return payload
+
+ operations_by_id: dict[str, list[tuple[str, str, dict[str, object]]]] = {}
+ for path, path_item in paths.items():
+ if not isinstance(path, str) or not isinstance(path_item, dict):
+ continue
+ for method, operation in path_item.items():
+ if method not in HTTP_METHODS or not isinstance(operation, dict):
+ continue
+ operation_id = operation.get("operationId")
+ if isinstance(operation_id, str):
+ operations_by_id.setdefault(operation_id, []).append((method, path, operation))
+
+ for operation_id, operations in operations_by_id.items():
+ if len(operations) < 2:
+ continue
+ for method, path, operation in operations:
+ digest = hashlib.sha1(f"{method}:{path}".encode()).hexdigest()[:8]
+ operation["operationId"] = f"{operation_id}_{digest}"
+
+ return payload
+
+
+def _component_schemas(payload: dict[str, object]) -> dict[str, object]:
+ components = payload.setdefault("components", {})
+ if not isinstance(components, dict):
+ raise RuntimeError("unexpected OpenAPI components payload")
+
+ schemas = components.setdefault("schemas", {})
+ if not isinstance(schemas, dict):
+ raise RuntimeError("unexpected OpenAPI component schemas payload")
+
+ return schemas
+
+
+def _merge_registered_schemas(payload: dict[str, object], namespace: str) -> dict[str, object]:
+ """Include registered but route-indirect models in exported OpenAPI schemas."""
+
+ schemas = _component_schemas(payload)
for name, model in _registered_models(namespace).items():
schema = getattr(model, "__schema__", None)
if isinstance(schema, dict):
- definitions.setdefault(name, schema)
+ schemas.setdefault(name, _replace_legacy_refs(schema))
+
+ payload.pop("definitions", None)
+ payload = _replace_legacy_refs(payload) # type: ignore[assignment]
return payload
def generate_specs(output_dir: Path) -> list[Path]:
- """Write all Swagger specs to `output_dir` and return the written paths."""
+ """Write all OpenAPI specs to `output_dir` and return the written paths."""
output_dir.mkdir(parents=True, exist_ok=True)
@@ -345,7 +496,9 @@ def generate_specs(output_dir: Path) -> list[Path]:
payload = response.get_json()
if not isinstance(payload, dict):
raise RuntimeError(f"unexpected response payload for {target.route}")
- payload = _merge_registered_definitions(payload, target.namespace)
+ payload = _merge_registered_schemas(payload, target.namespace)
+ payload = _move_get_request_bodies_to_query_parameters(payload)
+ payload = _deduplicate_operation_ids(payload)
payload = drop_null_values(payload)
payload = sort_openapi_arrays(payload)
@@ -363,7 +516,7 @@ def parse_args() -> argparse.Namespace:
"--output-dir",
type=Path,
default=Path("openapi"),
- help="Directory where the Swagger JSON files will be written.",
+ help="Directory where the OpenAPI JSON files will be written.",
)
return parser.parse_args()
diff --git a/api/extensions/ext_fastopenapi.py b/api/extensions/ext_fastopenapi.py
index 569203e974f..d51f2781fc5 100644
--- a/api/extensions/ext_fastopenapi.py
+++ b/api/extensions/ext_fastopenapi.py
@@ -26,7 +26,7 @@ def init_app(app: DifyApp) -> None:
docs_url=docs_url,
redoc_url=redoc_url,
openapi_url=openapi_url,
- openapi_version="3.0.0",
+ openapi_version="3.1.0",
title="Dify API (FastOpenAPI PoC)",
version="1.0",
description="FastOpenAPI proof of concept for Dify API",
diff --git a/api/libs/flask_restx_compat.py b/api/libs/flask_restx_compat.py
index 34e0d586a07..08fd3d9055d 100644
--- a/api/libs/flask_restx_compat.py
+++ b/api/libs/flask_restx_compat.py
@@ -1,8 +1,8 @@
-"""Compatibility helpers for Dify's Flask-RESTX Swagger integration.
+"""Compatibility helpers for Dify's Flask-RESTX OpenAPI integration.
These helpers are temporary bridges for legacy Flask-RESTX field contracts
while controllers migrate their request and response documentation to Pydantic
-models. Keep the behavior centralized so live Swagger endpoints and offline
+models. Keep the behavior centralized so live OpenAPI endpoints and offline
spec export fail or succeed in the same way.
"""
@@ -91,7 +91,7 @@ def _inline_model_signature(nested_fields: dict[object, object]) -> object:
def _inline_model_name(nested_fields: dict[object, object]) -> str:
- """Return a stable Swagger model name for an anonymous inline field map."""
+ """Return a stable OpenAPI model name for an anonymous inline field map."""
signature = json.dumps(_inline_model_signature(nested_fields), sort_keys=True, separators=(",", ":"))
digest = hashlib.sha1(signature.encode("utf-8")).hexdigest()[:12]
@@ -99,11 +99,11 @@ def _inline_model_name(nested_fields: dict[object, object]) -> str:
def patch_swagger_for_inline_nested_dicts() -> None:
- """Allow Swagger generation to handle legacy inline Flask-RESTX field dicts.
+ """Allow OpenAPI generation to handle legacy inline Flask-RESTX field dicts.
Some existing controllers use raw field mappings in `fields.Nested({...})`
or directly in `@namespace.response(...)`. Runtime marshalling accepts that,
- but Flask-RESTX Swagger registration expects a named model. Convert those
+ but Flask-RESTX registration expects a named model. Convert those
anonymous mappings into temporary named models during docs generation.
"""
diff --git a/api/openapi/markdown/console-swagger.md b/api/openapi/markdown/console-openapi.md
similarity index 70%
rename from api/openapi/markdown/console-swagger.md
rename to api/openapi/markdown/console-openapi.md
index 2b66bcab70a..c0d9fb653a3 100644
--- a/api/openapi/markdown/console-swagger.md
+++ b/api/openapi/markdown/console-openapi.md
@@ -3,944 +3,829 @@ Console management APIs for app configuration, monitoring, and administration
## Version: 1.0
-### Security
-**Bearer**
-
-| apiKey | *API Key* |
-| ------ | --------- |
-| Description | Type: Bearer {your-api-key} |
-| In | header |
-| Name | Authorization |
+### Available authorizations
+#### Bearer (API Key Authentication)
+Type: Bearer {your-api-key}
+**Name:** Authorization
+**In:** header
---
## console
Console management API operations
-### /account/avatar
-
-#### GET
-##### Description
-
+### [GET] /account/avatar
Get account avatar url
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| avatar | query | Avatar file ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [AvatarUrlResponse](#avatarurlresponse) |
+| 200 | Success | **application/json**: [AvatarUrlResponse](#avatarurlresponse)
|
-#### POST
-##### Parameters
+### [POST] /account/avatar
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AccountAvatarPayload](#accountavatarpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AccountAvatarPayload](#accountavatarpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [Account](#account) |
+| 200 | Success | **application/json**: [Account](#account)
|
-### /account/change-email
+### [POST] /account/change-email
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChangeEmailSendPayload](#changeemailsendpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChangeEmailSendPayload](#changeemailsendpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultDataResponse](#simpleresultdataresponse) |
+| 200 | Success | **application/json**: [SimpleResultDataResponse](#simpleresultdataresponse)
|
-### /account/change-email/check-email-unique
+### [POST] /account/change-email/check-email-unique
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CheckEmailUniquePayload](#checkemailuniquepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [CheckEmailUniquePayload](#checkemailuniquepayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /account/change-email/reset
+### [POST] /account/change-email/reset
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChangeEmailResetPayload](#changeemailresetpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChangeEmailResetPayload](#changeemailresetpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [Account](#account) |
+| 200 | Success | **application/json**: [Account](#account)
|
-### /account/change-email/validity
+### [POST] /account/change-email/validity
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChangeEmailValidityPayload](#changeemailvaliditypayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChangeEmailValidityPayload](#changeemailvaliditypayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [VerificationTokenResponse](#verificationtokenresponse) |
+| 200 | Success | **application/json**: [VerificationTokenResponse](#verificationtokenresponse)
|
-### /account/delete
+### [POST] /account/delete
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AccountDeletePayload](#accountdeletepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AccountDeletePayload](#accountdeletepayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /account/delete/feedback
+### [POST] /account/delete/feedback
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AccountDeletionFeedbackPayload](#accountdeletionfeedbackpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AccountDeletionFeedbackPayload](#accountdeletionfeedbackpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /account/delete/verify
-
-#### GET
-##### Responses
+### [GET] /account/delete/verify
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultDataResponse](#simpleresultdataresponse) |
+| 200 | Success | **application/json**: [SimpleResultDataResponse](#simpleresultdataresponse)
|
-### /account/education
-
-#### GET
-##### Responses
+### [GET] /account/education
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [EducationStatusResponse](#educationstatusresponse) |
+| 200 | Success | **application/json**: [EducationStatusResponse](#educationstatusresponse)
|
-#### POST
-##### Parameters
+### [POST] /account/education
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EducationActivatePayload](#educationactivatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EducationActivatePayload](#educationactivatepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /account/education/autocomplete
-
-#### GET
-##### Parameters
+### [GET] /account/education/autocomplete
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EducationAutocompleteQuery](#educationautocompletequery) |
+| keywords | query | | Yes | string |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [EducationAutocompleteResponse](#educationautocompleteresponse) |
+| 200 | Success | **application/json**: [EducationAutocompleteResponse](#educationautocompleteresponse)
|
-### /account/education/verify
-
-#### GET
-##### Responses
+### [GET] /account/education/verify
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [EducationVerifyResponse](#educationverifyresponse) |
+| 200 | Success | **application/json**: [EducationVerifyResponse](#educationverifyresponse)
|
-### /account/init
+### [POST] /account/init
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AccountInitPayload](#accountinitpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AccountInitPayload](#accountinitpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /account/integrates
-
-#### GET
-##### Responses
+### [GET] /account/integrates
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [AccountIntegrateListResponse](#accountintegratelistresponse) |
+| 200 | Success | **application/json**: [AccountIntegrateListResponse](#accountintegratelistresponse)
|
-### /account/interface-language
+### [POST] /account/interface-language
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AccountInterfaceLanguagePayload](#accountinterfacelanguagepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AccountInterfaceLanguagePayload](#accountinterfacelanguagepayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [Account](#account) |
+| 200 | Success | **application/json**: [Account](#account)
|
-### /account/interface-theme
+### [POST] /account/interface-theme
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AccountInterfaceThemePayload](#accountinterfacethemepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AccountInterfaceThemePayload](#accountinterfacethemepayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [Account](#account) |
+| 200 | Success | **application/json**: [Account](#account)
|
-### /account/name
+### [POST] /account/name
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AccountNamePayload](#accountnamepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AccountNamePayload](#accountnamepayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [Account](#account) |
+| 200 | Success | **application/json**: [Account](#account)
|
-### /account/password
+### [POST] /account/password
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AccountPasswordPayload](#accountpasswordpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AccountPasswordPayload](#accountpasswordpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [Account](#account) |
+| 200 | Success | **application/json**: [Account](#account)
|
-### /account/profile
-
-#### GET
-##### Responses
+### [GET] /account/profile
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [Account](#account) |
+| 200 | Success | **application/json**: [Account](#account)
|
-### /account/timezone
+### [POST] /account/timezone
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AccountTimezonePayload](#accounttimezonepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AccountTimezonePayload](#accounttimezonepayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [Account](#account) |
-
-### /activate
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [Account](#account)
|
+### [POST] /activate
Activate account with invitation token
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ActivatePayload](#activatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ActivatePayload](#activatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Account activated successfully | [ActivationResponse](#activationresponse) |
+| 200 | Account activated successfully | **application/json**: [ActivationResponse](#activationresponse)
|
| 400 | Already activated or invalid token | |
-### /activate/check
-
-#### GET
-##### Description
-
+### [GET] /activate/check
Check if activation token is valid
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ActivateCheckQuery](#activatecheckquery) |
+| email | query | | No | |
+| token | query | | Yes | string |
+| workspace_id | query | | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [ActivationCheckResponse](#activationcheckresponse) |
+| 200 | Success | **application/json**: [ActivationCheckResponse](#activationcheckresponse)
|
-### /agents
-
-#### GET
-##### Parameters
+### [GET] /agents
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| keyword | query | | No | string |
-| limit | query | | No | integer |
-| page | query | | No | integer |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Agent roster list | [AgentRosterListResponse](#agentrosterlistresponse) |
+| 200 | Agent roster list | **application/json**: [AgentRosterListResponse](#agentrosterlistresponse)
|
-#### POST
-##### Parameters
+### [POST] /agents
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [RosterAgentCreatePayload](#rosteragentcreatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [RosterAgentCreatePayload](#rosteragentcreatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Agent created | [AgentRosterResponse](#agentrosterresponse) |
+| 201 | Agent created | **application/json**: [AgentRosterResponse](#agentrosterresponse)
|
-### /agents/invite-options
-
-#### GET
-##### Parameters
+### [GET] /agents/invite-options
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | query | Workflow app id for in-current-workflow markers | No | string |
| keyword | query | | No | string |
-| limit | query | | No | integer |
-| page | query | | No | integer |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Agent invite options | [AgentInviteOptionsResponse](#agentinviteoptionsresponse) |
+| 200 | Agent invite options | **application/json**: [AgentInviteOptionsResponse](#agentinviteoptionsresponse)
|
-### /agents/{agent_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /agents/{agent_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| agent_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Agent archived |
-#### GET
-##### Parameters
+### [GET] /agents/{agent_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| agent_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Agent detail | [AgentRosterResponse](#agentrosterresponse) |
+| 200 | Agent detail | **application/json**: [AgentRosterResponse](#agentrosterresponse)
|
-#### PATCH
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| agent_id | path | | Yes | string |
-| payload | body | | Yes | [RosterAgentUpdatePayload](#rosteragentupdatepayload) |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 200 | Agent updated | [AgentRosterResponse](#agentrosterresponse) |
-
-### /agents/{agent_id}/versions
-
-#### GET
-##### Parameters
+### [PATCH] /agents/{agent_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| agent_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [RosterAgentUpdatePayload](#rosteragentupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Agent versions | [AgentConfigSnapshotListResponse](#agentconfigsnapshotlistresponse) |
+| 200 | Agent updated | **application/json**: [AgentRosterResponse](#agentrosterresponse)
|
-### /agents/{agent_id}/versions/{version_id}
+### [GET] /agents/{agent_id}/versions
+#### Parameters
-#### GET
-##### Parameters
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| agent_id | path | | Yes | string |
+
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 200 | Agent versions | **application/json**: [AgentConfigSnapshotListResponse](#agentconfigsnapshotlistresponse)
|
+
+### [GET] /agents/{agent_id}/versions/{version_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| agent_id | path | | Yes | string |
| version_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Agent version detail | [AgentConfigSnapshotDetailResponse](#agentconfigsnapshotdetailresponse) |
+| 200 | Agent version detail | **application/json**: [AgentConfigSnapshotDetailResponse](#agentconfigsnapshotdetailresponse)
|
-### /all-workspaces
-
-#### GET
-##### Parameters
+### [GET] /all-workspaces
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkspaceListQuery](#workspacelistquery) |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /api-based-extension
-
-#### GET
-##### Description
-
+### [GET] /api-based-extension
Get all API-based extensions for current tenant
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [APIBasedExtensionListResponse](#apibasedextensionlistresponse) |
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [APIBasedExtensionListResponse](#apibasedextensionlistresponse)
|
+### [POST] /api-based-extension
Create a new API-based extension
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [APIBasedExtensionPayload](#apibasedextensionpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [APIBasedExtensionPayload](#apibasedextensionpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Extension created successfully | [APIBasedExtensionResponse](#apibasedextensionresponse) |
-
-### /api-based-extension/{id}
-
-#### DELETE
-##### Description
+| 201 | Extension created successfully | **application/json**: [APIBasedExtensionResponse](#apibasedextensionresponse)
|
+### [DELETE] /api-based-extension/{id}
Delete API-based extension
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| id | path | Extension ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Extension deleted successfully |
-#### GET
-##### Description
-
+### [GET] /api-based-extension/{id}
Get API-based extension by ID
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| id | path | Extension ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [APIBasedExtensionResponse](#apibasedextensionresponse) |
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [APIBasedExtensionResponse](#apibasedextensionresponse)
|
+### [POST] /api-based-extension/{id}
Update API-based extension
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [APIBasedExtensionPayload](#apibasedextensionpayload) |
| id | path | Extension ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [APIBasedExtensionPayload](#apibasedextensionpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Extension updated successfully | [APIBasedExtensionResponse](#apibasedextensionresponse) |
+| 200 | Extension updated successfully | **application/json**: [APIBasedExtensionResponse](#apibasedextensionresponse)
|
-### /api-key-auth/data-source
-
-#### GET
-##### Responses
+### [GET] /api-key-auth/data-source
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [ApiKeyAuthDataSourceListResponse](#apikeyauthdatasourcelistresponse) |
+| 200 | Success | **application/json**: [ApiKeyAuthDataSourceListResponse](#apikeyauthdatasourcelistresponse)
|
-### /api-key-auth/data-source/binding
+### [POST] /api-key-auth/data-source/binding
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ApiKeyAuthBindingPayload](#apikeyauthbindingpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ApiKeyAuthBindingPayload](#apikeyauthbindingpayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /api-key-auth/data-source/{binding_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /api-key-auth/data-source/{binding_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| binding_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Binding deleted successfully |
-### /app-dsl-version
-
-#### GET
-##### Summary
-
-Get current app DSL version for workflow clipboard compatibility
-
-##### Description
+### [GET] /app-dsl-version
+**Get current app DSL version for workflow clipboard compatibility**
Get current app DSL version
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [AppDslVersionResponse](#appdslversionresponse) |
-
-### /app/prompt-templates
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [AppDslVersionResponse](#appdslversionresponse)
|
+### [GET] /app/prompt-templates
Get advanced prompt templates based on app mode and model configuration
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AdvancedPromptTemplateQuery](#advancedprompttemplatequery) |
+| app_mode | query | Application mode | Yes | string |
+| has_context | query | Whether has context | No | string,
**Default:** true |
+| model_mode | query | Model mode | Yes | string |
+| model_name | query | Model name | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Prompt templates retrieved successfully | [ object ] |
+| 200 | Prompt templates retrieved successfully | **application/json**: [ object ]
|
| 400 | Invalid request parameters | |
-### /apps
-
-#### GET
-##### Summary
-
-Get app list
-
-##### Description
+### [GET] /apps
+**Get app list**
Get list of applications with pagination and filtering
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AppListQuery](#applistquery) |
+| creator_ids | query | Filter by creator account IDs | No | |
+| is_created_by_me | query | Filter by creator | No | |
+| limit | query | Page size (1-100) | No | integer,
**Default:** 20 |
+| mode | query | App mode filter | No | string,
**Available values:** "advanced-chat", "agent", "agent-chat", "all", "channel", "chat", "completion", "workflow",
**Default:** all |
+| name | query | Filter by app name | No | |
+| page | query | Page number (1-99999) | No | integer,
**Default:** 1 |
+| tag_ids | query | Filter by tag IDs | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [AppPagination](#apppagination) |
+| 200 | Success | **application/json**: [AppPagination](#apppagination)
|
-#### POST
-##### Summary
-
-Create app
-
-##### Description
+### [POST] /apps
+**Create app**
Create a new application
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [CreateAppPayload](#createapppayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CreateAppPayload](#createapppayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | App created successfully | [AppDetail](#appdetail) |
+| 201 | App created successfully | **application/json**: [AppDetail](#appdetail)
|
| 400 | Invalid request parameters | |
| 403 | Insufficient permissions | |
-### /apps/imports
+### [POST] /apps/imports
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AppImportPayload](#appimportpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AppImportPayload](#appimportpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Import completed | [Import](#import) |
-| 202 | Import pending confirmation | [Import](#import) |
-| 400 | Import failed | [Import](#import) |
+| 200 | Import completed | **application/json**: [Import](#import)
|
+| 202 | Import pending confirmation | **application/json**: [Import](#import)
|
+| 400 | Import failed | **application/json**: [Import](#import)
|
-### /apps/imports/{app_id}/check-dependencies
-
-#### GET
-##### Parameters
+### [GET] /apps/imports/{app_id}/check-dependencies
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Dependencies checked | [CheckDependenciesResult](#checkdependenciesresult) |
+| 200 | Dependencies checked | **application/json**: [CheckDependenciesResult](#checkdependenciesresult)
|
-### /apps/imports/{import_id}/confirm
-
-#### POST
-##### Parameters
+### [POST] /apps/imports/{import_id}/confirm
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| import_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Import confirmed | [Import](#import) |
-| 400 | Import failed | [Import](#import) |
-
-### /apps/workflows/online-users
-
-#### POST
-##### Description
+| 200 | Import confirmed | **application/json**: [Import](#import)
|
+| 400 | Import failed | **application/json**: [Import](#import)
|
+### [POST] /apps/workflows/online-users
Get workflow online users
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowOnlineUsersPayload](#workflowonlineuserspayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowOnlineUsersPayload](#workflowonlineuserspayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow online users retrieved successfully | [WorkflowOnlineUsersResponse](#workflowonlineusersresponse) |
+| 200 | Workflow online users retrieved successfully | **application/json**: [WorkflowOnlineUsersResponse](#workflowonlineusersresponse)
|
-### /apps/{app_id}
-
-#### DELETE
-##### Summary
-
-Delete app
-
-##### Description
+### [DELETE] /apps/{app_id}
+**Delete app**
Delete application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | App deleted successfully |
| 403 | Insufficient permissions |
-#### GET
-##### Summary
-
-Get app detail
-
-##### Description
+### [GET] /apps/{app_id}
+**Get app detail**
Get application details
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [AppDetailWithSite](#appdetailwithsite) |
+| 200 | Success | **application/json**: [AppDetailWithSite](#appdetailwithsite)
|
-#### PUT
-##### Summary
-
-Update app
-
-##### Description
+### [PUT] /apps/{app_id}
+**Update app**
Update application details
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [UpdateAppPayload](#updateapppayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [UpdateAppPayload](#updateapppayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | App updated successfully | [AppDetailWithSite](#appdetailwithsite) |
+| 200 | App updated successfully | **application/json**: [AppDetailWithSite](#appdetailwithsite)
|
| 400 | Invalid request parameters | |
| 403 | Insufficient permissions | |
-### /apps/{app_id}/advanced-chat/workflow-runs
-
-#### GET
-##### Summary
-
-Get advanced chat app workflow run list
-
-##### Description
+### [GET] /apps/{app_id}/advanced-chat/workflow-runs
+**Get advanced chat app workflow run list**
Get advanced chat workflow run list
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| last_id | query | Last run ID for pagination | No | string |
-| limit | query | Number of items per page (1-100) | No | integer |
-| status | query | Workflow run status filter | No | string |
-| triggered_from | query | Filter by trigger source: debugging or app-run. Default: debugging | No | string |
+| limit | query | Number of items per page (1-100) | No | integer,
**Default:** 20 |
+| status | query | Workflow run status filter | No | string,
**Available values:** "failed", "partial-succeeded", "running", "stopped", "succeeded" |
+| triggered_from | query | Filter by trigger source: debugging or app-run. Default: debugging | No | string,
**Available values:** "app-run", "debugging" |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow runs retrieved successfully | [AdvancedChatWorkflowRunPaginationResponse](#advancedchatworkflowrunpaginationresponse) |
+| 200 | Workflow runs retrieved successfully | **application/json**: [AdvancedChatWorkflowRunPaginationResponse](#advancedchatworkflowrunpaginationresponse)
|
-### /apps/{app_id}/advanced-chat/workflow-runs/count
+### [GET] /apps/{app_id}/advanced-chat/workflow-runs/count
+**Get advanced chat workflow runs count statistics**
-#### GET
-##### Summary
-
-Get advanced chat workflow runs count statistics
-
-##### Description
-
-Get advanced chat workflow runs count statistics
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-| status | query | Workflow run status filter | No | string |
+| status | query | Workflow run status filter | No | string,
**Available values:** "failed", "partial-succeeded", "running", "stopped", "succeeded" |
| time_range | query | Filter by time range (optional): e.g., 7d (7 days), 4h (4 hours), 30m (30 minutes), 30s (30 seconds). Filters by created_at field. | No | string |
-| triggered_from | query | Filter by trigger source: debugging or app-run. Default: debugging | No | string |
+| triggered_from | query | Filter by trigger source: debugging or app-run. Default: debugging | No | string,
**Available values:** "app-run", "debugging" |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow runs count retrieved successfully | [WorkflowRunCountResponse](#workflowruncountresponse) |
+| 200 | Workflow runs count retrieved successfully | **application/json**: [WorkflowRunCountResponse](#workflowruncountresponse)
|
-### /apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/preview
-
-#### POST
-##### Summary
-
-Preview human input form content and placeholders
-
-##### Description
+### [POST] /apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/preview
+**Preview human input form content and placeholders**
Get human input form preview for advanced chat workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [HumanInputFormPreviewPayload](#humaninputformpreviewpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HumanInputFormPreviewPayload](#humaninputformpreviewpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/run
-
-#### POST
-##### Summary
-
-Submit human input form preview
-
-##### Description
+### [POST] /apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/run
+**Submit human input form preview**
Submit human input form preview for advanced chat workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [HumanInputFormSubmitPayload](#humaninputformsubmitpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HumanInputFormSubmitPayload](#humaninputformsubmitpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /apps/{app_id}/advanced-chat/workflows/draft/iteration/nodes/{node_id}/run
-
-#### POST
-##### Summary
-
-Run draft workflow iteration node
-
-##### Description
+### [POST] /apps/{app_id}/advanced-chat/workflows/draft/iteration/nodes/{node_id}/run
+**Run draft workflow iteration node**
Run draft workflow iteration node for advanced chat
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [IterationNodeRunPayload](#iterationnoderunpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [IterationNodeRunPayload](#iterationnoderunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -948,26 +833,25 @@ Run draft workflow iteration node for advanced chat
| 403 | Permission denied |
| 404 | Node not found |
-### /apps/{app_id}/advanced-chat/workflows/draft/loop/nodes/{node_id}/run
-
-#### POST
-##### Summary
-
-Run draft workflow loop node
-
-##### Description
+### [POST] /apps/{app_id}/advanced-chat/workflows/draft/loop/nodes/{node_id}/run
+**Run draft workflow loop node**
Run draft workflow loop node for advanced chat
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [LoopNodeRunPayload](#loopnoderunpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [LoopNodeRunPayload](#loopnoderunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -975,25 +859,24 @@ Run draft workflow loop node for advanced chat
| 403 | Permission denied |
| 404 | Node not found |
-### /apps/{app_id}/advanced-chat/workflows/draft/run
-
-#### POST
-##### Summary
-
-Run draft workflow
-
-##### Description
+### [POST] /apps/{app_id}/advanced-chat/workflows/draft/run
+**Run draft workflow**
Run draft workflow for advanced chat application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AdvancedChatWorkflowRunPayload](#advancedchatworkflowrunpayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AdvancedChatWorkflowRunPayload](#advancedchatworkflowrunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1001,137 +884,130 @@ Run draft workflow for advanced chat application
| 400 | Invalid request parameters |
| 403 | Permission denied |
-### /apps/{app_id}/agent-composer
-
-#### GET
-##### Parameters
+### [GET] /apps/{app_id}/agent-composer
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Agent app composer state | [AgentAppComposerResponse](#agentappcomposerresponse) |
+| 200 | Agent app composer state | **application/json**: [AgentAppComposerResponse](#agentappcomposerresponse)
|
-#### PUT
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| app_id | path | | Yes | string |
-| payload | body | | Yes | [ComposerSavePayload](#composersavepayload) |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 200 | Agent app composer saved | [AgentAppComposerResponse](#agentappcomposerresponse) |
-
-### /apps/{app_id}/agent-composer/candidates
-
-#### GET
-##### Parameters
+### [PUT] /apps/{app_id}/agent-composer
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ComposerSavePayload](#composersavepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Agent app composer candidates | [AgentComposerCandidatesResponse](#agentcomposercandidatesresponse) |
+| 200 | Agent app composer saved | **application/json**: [AgentAppComposerResponse](#agentappcomposerresponse)
|
-### /apps/{app_id}/agent-composer/validate
-
-#### POST
-##### Parameters
+### [GET] /apps/{app_id}/agent-composer/candidates
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-| payload | body | | Yes | [ComposerSavePayload](#composersavepayload) |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Agent app composer validation result | [AgentComposerValidateResponse](#agentcomposervalidateresponse) |
+| 200 | Agent app composer candidates | **application/json**: [AgentComposerCandidatesResponse](#agentcomposercandidatesresponse)
|
-### /apps/{app_id}/agent-features
+### [POST] /apps/{app_id}/agent-composer/validate
+#### Parameters
-#### POST
-##### Description
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| app_id | path | | Yes | string |
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ComposerSavePayload](#composersavepayload)
|
+
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 200 | Agent app composer validation result | **application/json**: [AgentComposerValidateResponse](#agentcomposervalidateresponse)
|
+
+### [POST] /apps/{app_id}/agent-features
Update an Agent App's presentation features (opener, follow-up, citations, ...)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AgentAppFeaturesPayload](#agentappfeaturespayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AgentAppFeaturesPayload](#agentappfeaturespayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Features updated successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Features updated successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 400 | Invalid configuration | |
| 404 | App not found | |
-### /apps/{app_id}/agent-referencing-workflows
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/agent-referencing-workflows
List workflow apps that reference this Agent App's bound Agent (read-only)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Referencing workflows listed successfully | [AgentReferencingWorkflowsResponse](#agentreferencingworkflowsresponse) |
+| 200 | Referencing workflows listed successfully | **application/json**: [AgentReferencingWorkflowsResponse](#agentreferencingworkflowsresponse)
|
| 404 | App not found | |
-### /apps/{app_id}/agent-sandbox/files
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/agent-sandbox/files
List a directory in an Agent App conversation sandbox
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| conversation_id | query | Agent App conversation ID | Yes | string |
-| path | query | Directory path relative to the sandbox workspace | No | string |
+| path | query | Directory path relative to the sandbox workspace | No | string,
**Default:** . |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Listing returned | [SandboxListResponse](#sandboxlistresponse) |
-
-### /apps/{app_id}/agent-sandbox/files/read
-
-#### GET
-##### Description
+| 200 | Listing returned | **application/json**: [SandboxListResponse](#sandboxlistresponse)
|
+### [GET] /apps/{app_id}/agent-sandbox/files/read
Read a text/binary preview file in an Agent App conversation sandbox
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -1139,137 +1015,118 @@ Read a text/binary preview file in an Agent App conversation sandbox
| conversation_id | query | Agent App conversation ID | Yes | string |
| path | query | File path relative to the sandbox workspace | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Preview returned | [SandboxReadResponse](#sandboxreadresponse) |
-
-### /apps/{app_id}/agent-sandbox/files/upload
-
-#### POST
-##### Description
+| 200 | Preview returned | **application/json**: [SandboxReadResponse](#sandboxreadresponse)
|
+### [POST] /apps/{app_id}/agent-sandbox/files/upload
Upload one Agent App sandbox file as a Dify ToolFile mapping
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-| payload | body | | Yes | [AgentSandboxUploadPayload](#agentsandboxuploadpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AgentSandboxUploadPayload](#agentsandboxuploadpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Uploaded | [SandboxUploadResponse](#sandboxuploadresponse) |
+| 200 | Uploaded | **application/json**: [SandboxUploadResponse](#sandboxuploadresponse)
|
-### /apps/{app_id}/agent/logs
-
-#### GET
-##### Summary
-
-Get agent logs
-
-##### Description
+### [GET] /apps/{app_id}/agent/logs
+**Get agent logs**
Get agent execution logs for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AgentLogQuery](#agentlogquery) |
| app_id | path | Application ID | Yes | string |
+| conversation_id | query | Conversation UUID | Yes | string |
+| message_id | query | Message UUID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Agent logs retrieved successfully | [ object ] |
+| 200 | Agent logs retrieved successfully | **application/json**: [ object ]
|
| 400 | Invalid request parameters | |
-### /apps/{app_id}/agent/skills/standardize
-
-#### POST
-##### Summary
-
-Upload a Skill, validate it, and standardize it into the app agent's drive
-
-##### Description
+### [POST] /apps/{app_id}/agent/skills/standardize
+**Upload a Skill, validate it, and standardize it into the app agent's drive**
Validate + standardize a Skill into the agent drive (ENG-594)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 201 | Skill standardized into drive |
| 400 | Invalid skill package or no bound agent |
-### /apps/{app_id}/agent/skills/upload
-
-#### POST
-##### Summary
-
-Validate an uploaded Skill package and persist the archive
-
-##### Description
+### [POST] /apps/{app_id}/agent/skills/upload
+**Validate an uploaded Skill package and persist the archive**
Upload + validate a Skill package (.zip/.skill) and extract its manifest
Returns a validated skill ref (to bind into the Agent soul config on save)
plus its manifest. Standardizing into the agent drive is ENG-594.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 201 | Skill validated |
| 400 | Invalid skill package |
-### /apps/{app_id}/annotation-reply/{action}
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/annotation-reply/{action}
Enable or disable annotation reply for an app
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AnnotationReplyPayload](#annotationreplypayload) |
| action | path | Action to perform (enable/disable) | Yes | string |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AnnotationReplyPayload](#annotationreplypayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Action completed successfully |
| 403 | Insufficient permissions |
-### /apps/{app_id}/annotation-reply/{action}/status/{job_id}
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/annotation-reply/{action}/status/{job_id}
Get status of annotation reply action job
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -1277,122 +1134,116 @@ Get status of annotation reply action job
| app_id | path | Application ID | Yes | string |
| job_id | path | Job ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Job status retrieved successfully |
| 403 | Insufficient permissions |
-### /apps/{app_id}/annotation-setting
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/annotation-setting
Get annotation settings for an app
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Annotation settings retrieved successfully |
| 403 | Insufficient permissions |
-### /apps/{app_id}/annotation-settings/{annotation_setting_id}
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/annotation-settings/{annotation_setting_id}
Update annotation settings for an app
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AnnotationSettingUpdatePayload](#annotationsettingupdatepayload) |
| annotation_setting_id | path | Annotation setting ID | Yes | string |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AnnotationSettingUpdatePayload](#annotationsettingupdatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Settings updated successfully |
| 403 | Insufficient permissions |
-### /apps/{app_id}/annotations
-
-#### DELETE
-##### Parameters
+### [DELETE] /apps/{app_id}/annotations
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/annotations
Get annotations for an app with pagination
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AnnotationListQuery](#annotationlistquery) |
| app_id | path | Application ID | Yes | string |
+| keyword | query | Search keyword | No | string |
+| limit | query | Page size | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Annotations retrieved successfully |
| 403 | Insufficient permissions |
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/annotations
Create a new annotation for an app
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [CreateAnnotationPayload](#createannotationpayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CreateAnnotationPayload](#createannotationpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Annotation created successfully | [Annotation](#annotation) |
+| 201 | Annotation created successfully | **application/json**: [Annotation](#annotation)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/annotations/batch-import
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/annotations/batch-import
Batch import annotations from CSV file with rate limiting and security checks
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1402,204 +1253,184 @@ Batch import annotations from CSV file with rate limiting and security checks
| 413 | File too large |
| 429 | Too many requests or concurrent imports |
-### /apps/{app_id}/annotations/batch-import-status/{job_id}
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/annotations/batch-import-status/{job_id}
Get status of batch import job
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| job_id | path | Job ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Job status retrieved successfully |
| 403 | Insufficient permissions |
-### /apps/{app_id}/annotations/count
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/annotations/count
Get count of message annotations for the app
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Annotation count retrieved successfully | [AnnotationCountResponse](#annotationcountresponse) |
-
-### /apps/{app_id}/annotations/export
-
-#### GET
-##### Description
+| 200 | Annotation count retrieved successfully | **application/json**: [AnnotationCountResponse](#annotationcountresponse)
|
+### [GET] /apps/{app_id}/annotations/export
Export all annotations for an app with CSV injection protection
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Annotations exported successfully | [AnnotationExportList](#annotationexportlist) |
+| 200 | Annotations exported successfully | **application/json**: [AnnotationExportList](#annotationexportlist)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/annotations/{annotation_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /apps/{app_id}/annotations/{annotation_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| annotation_id | path | | Yes | string |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/annotations/{annotation_id}
Update or delete an annotation
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [UpdateAnnotationPayload](#updateannotationpayload) |
| annotation_id | path | Annotation ID | Yes | string |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [UpdateAnnotationPayload](#updateannotationpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Annotation updated successfully | [Annotation](#annotation) |
+| 200 | Annotation updated successfully | **application/json**: [Annotation](#annotation)
|
| 204 | Annotation deleted successfully | |
| 403 | Insufficient permissions | |
-### /apps/{app_id}/annotations/{annotation_id}/hit-histories
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/annotations/{annotation_id}/hit-histories
Get hit histories for an annotation
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| annotation_id | path | Annotation ID | Yes | string |
| app_id | path | Application ID | Yes | string |
-| limit | query | Page size | No | integer |
-| page | query | Page number | No | integer |
+| limit | query | Page size | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Hit histories retrieved successfully | [AnnotationHitHistoryList](#annotationhithistorylist) |
+| 200 | Hit histories retrieved successfully | **application/json**: [AnnotationHitHistoryList](#annotationhithistorylist)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/api-enable
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/api-enable
Enable or disable app API
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AppApiStatusPayload](#appapistatuspayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AppApiStatusPayload](#appapistatuspayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | API status updated successfully | [AppDetail](#appdetail) |
+| 200 | API status updated successfully | **application/json**: [AppDetail](#appdetail)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/audio-to-text
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/audio-to-text
Transcript audio to text for chat messages
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | App ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Audio transcription successful | [AudioTranscriptResponse](#audiotranscriptresponse) |
+| 200 | Audio transcription successful | **application/json**: [AudioTranscriptResponse](#audiotranscriptresponse)
|
| 400 | Bad request - No audio uploaded or unsupported type | |
| 413 | Audio file too large | |
-### /apps/{app_id}/chat-conversations
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/chat-conversations
Get chat conversations with pagination, filtering and summary
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChatConversationQuery](#chatconversationquery) |
| app_id | path | Application ID | Yes | string |
+| annotation_status | query | Annotation status filter | No | string,
**Available values:** "all", "annotated", "not_annotated",
**Default:** all |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| keyword | query | Search keyword | No | |
+| limit | query | Page size (1-100) | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
+| sort_by | query | Sort field and direction | No | string,
**Available values:** "-created_at", "-updated_at", "created_at", "updated_at",
**Default:** -updated_at |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [ConversationWithSummaryPagination](#conversationwithsummarypagination) |
+| 200 | Success | **application/json**: [ConversationWithSummaryPagination](#conversationwithsummarypagination)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/chat-conversations/{conversation_id}
-
-#### DELETE
-##### Description
-
+### [DELETE] /apps/{app_id}/chat-conversations/{conversation_id}
Delete a chat conversation
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| conversation_id | path | Conversation ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1607,124 +1438,109 @@ Delete a chat conversation
| 403 | Insufficient permissions |
| 404 | Conversation not found |
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/chat-conversations/{conversation_id}
Get chat conversation details
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| conversation_id | path | Conversation ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [ConversationDetail](#conversationdetail) |
+| 200 | Success | **application/json**: [ConversationDetail](#conversationdetail)
|
| 403 | Insufficient permissions | |
| 404 | Conversation not found | |
-### /apps/{app_id}/chat-messages
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/chat-messages
Get chat messages for a conversation with pagination
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChatMessagesQuery](#chatmessagesquery) |
| app_id | path | Application ID | Yes | string |
+| conversation_id | query | Conversation ID | Yes | string |
+| first_id | query | First message ID for pagination | No | |
+| limit | query | Number of messages to return (1-100) | No | integer,
**Default:** 20 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [MessageInfiniteScrollPaginationResponse](#messageinfinitescrollpaginationresponse) |
+| 200 | Success | **application/json**: [MessageInfiniteScrollPaginationResponse](#messageinfinitescrollpaginationresponse)
|
| 404 | Conversation not found | |
-### /apps/{app_id}/chat-messages/{message_id}/suggested-questions
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/chat-messages/{message_id}/suggested-questions
Get suggested questions for a message
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| message_id | path | Message ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Suggested questions retrieved successfully | [SuggestedQuestionsResponse](#suggestedquestionsresponse) |
+| 200 | Suggested questions retrieved successfully | **application/json**: [SuggestedQuestionsResponse](#suggestedquestionsresponse)
|
| 404 | Message or conversation not found | |
-### /apps/{app_id}/chat-messages/{task_id}/stop
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/chat-messages/{task_id}/stop
Stop a running chat message generation
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| task_id | path | Task ID to stop | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Task stopped successfully | [SimpleResultResponse](#simpleresultresponse) |
-
-### /apps/{app_id}/completion-conversations
-
-#### GET
-##### Description
+| 200 | Task stopped successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [GET] /apps/{app_id}/completion-conversations
Get completion conversations with pagination and filtering
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [CompletionConversationQuery](#completionconversationquery) |
| app_id | path | Application ID | Yes | string |
+| annotation_status | query | Annotation status filter | No | string,
**Available values:** "all", "annotated", "not_annotated",
**Default:** all |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| keyword | query | Search keyword | No | |
+| limit | query | Page size (1-100) | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [ConversationPagination](#conversationpagination) |
+| 200 | Success | **application/json**: [ConversationPagination](#conversationpagination)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/completion-conversations/{conversation_id}
-
-#### DELETE
-##### Description
-
+### [DELETE] /apps/{app_id}/completion-conversations/{conversation_id}
Delete a completion conversation
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| conversation_id | path | Conversation ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1732,41 +1548,40 @@ Delete a completion conversation
| 403 | Insufficient permissions |
| 404 | Conversation not found |
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/completion-conversations/{conversation_id}
Get completion conversation details with messages
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| conversation_id | path | Conversation ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [ConversationMessageDetail](#conversationmessagedetail) |
+| 200 | Success | **application/json**: [ConversationMessageDetail](#conversationmessagedetail)
|
| 403 | Insufficient permissions | |
| 404 | Conversation not found | |
-### /apps/{app_id}/completion-messages
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/completion-messages
Generate completion message for debugging
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [CompletionMessagePayload](#completionmessagepayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CompletionMessagePayload](#completionmessagepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1774,161 +1589,148 @@ Generate completion message for debugging
| 400 | Invalid request parameters |
| 404 | App not found |
-### /apps/{app_id}/completion-messages/{task_id}/stop
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/completion-messages/{task_id}/stop
Stop a running completion message generation
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| task_id | path | Task ID to stop | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Task stopped successfully | [SimpleResultResponse](#simpleresultresponse) |
-
-### /apps/{app_id}/conversation-variables
-
-#### GET
-##### Description
+| 200 | Task stopped successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [GET] /apps/{app_id}/conversation-variables
Get conversation variables for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ConversationVariablesQuery](#conversationvariablesquery) |
| app_id | path | Application ID | Yes | string |
+| conversation_id | query | Conversation ID to filter variables | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Conversation variables retrieved successfully | [PaginatedConversationVariableResponse](#paginatedconversationvariableresponse) |
+| 200 | Conversation variables retrieved successfully | **application/json**: [PaginatedConversationVariableResponse](#paginatedconversationvariableresponse)
|
-### /apps/{app_id}/convert-to-workflow
-
-#### POST
-##### Summary
-
-Convert basic mode of chatbot app to workflow mode
-
-##### Description
+### [POST] /apps/{app_id}/convert-to-workflow
+**Convert basic mode of chatbot app to workflow mode**
Convert application to workflow mode
Convert expert mode of chatbot app to workflow mode
Convert Completion App to Workflow App
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ConvertToWorkflowPayload](#converttoworkflowpayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ConvertToWorkflowPayload](#converttoworkflowpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Application converted to workflow successfully | [NewAppResponse](#newappresponse) |
+| 200 | Application converted to workflow successfully | **application/json**: [NewAppResponse](#newappresponse)
|
| 400 | Application cannot be converted | |
| 403 | Permission denied | |
-### /apps/{app_id}/copy
-
-#### POST
-##### Summary
-
-Copy app
-
-##### Description
+### [POST] /apps/{app_id}/copy
+**Copy app**
Create a copy of an existing application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [CopyAppPayload](#copyapppayload) |
| app_id | path | Application ID to copy | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CopyAppPayload](#copyapppayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | App copied successfully | [AppDetailWithSite](#appdetailwithsite) |
+| 201 | App copied successfully | **application/json**: [AppDetailWithSite](#appdetailwithsite)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/export
-
-#### GET
-##### Summary
-
-Export app
-
-##### Description
+### [GET] /apps/{app_id}/export
+**Export app**
Export application configuration as DSL
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AppExportQuery](#appexportquery) |
| app_id | path | Application ID to export | Yes | string |
+| include_secret | query | Include secrets in export | No | boolean |
+| workflow_id | query | Specific workflow ID to export | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | App exported successfully | [AppExportResponse](#appexportresponse) |
+| 200 | App exported successfully | **application/json**: [AppExportResponse](#appexportresponse)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/feedbacks
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/feedbacks
Create or update message feedback (like/dislike)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MessageFeedbackPayload](#messagefeedbackpayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MessageFeedbackPayload](#messagefeedbackpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Feedback updated successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Feedback updated successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 403 | Insufficient permissions | |
| 404 | Message not found | |
-### /apps/{app_id}/feedbacks/export
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/feedbacks/export
Export user feedback data for Google Sheets
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [FeedbackExportQuery](#feedbackexportquery) |
| app_id | path | Application ID | Yes | string |
+| end_date | query | End date (YYYY-MM-DD) | No | |
+| format | query | Export format | No | string,
**Available values:** "csv", "json",
**Default:** csv |
+| from_source | query | Filter by feedback source | No | |
+| has_comment | query | Only include feedback with comments | No | |
+| rating | query | Filter by rating | No | |
+| start_date | query | Start date (YYYY-MM-DD) | No | |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1936,67 +1738,63 @@ Export user feedback data for Google Sheets
| 400 | Invalid parameters |
| 500 | Internal server error |
-### /apps/{app_id}/icon
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/icon
Update application icon
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AppIconPayload](#appiconpayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AppIconPayload](#appiconpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Icon updated successfully |
| 403 | Insufficient permissions |
-### /apps/{app_id}/messages/{message_id}
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/messages/{message_id}
Get message details by ID
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| message_id | path | Message ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Message retrieved successfully | [MessageDetailResponse](#messagedetailresponse) |
+| 200 | Message retrieved successfully | **application/json**: [MessageDetailResponse](#messagedetailresponse)
|
| 404 | Message not found | |
-### /apps/{app_id}/model-config
-
-#### POST
-##### Summary
-
-Modify app model config
-
-##### Description
+### [POST] /apps/{app_id}/model-config
+**Modify app model config**
Update application model configuration
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ModelConfigRequest](#modelconfigrequest) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ModelConfigRequest](#modelconfigrequest)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -2004,745 +1802,666 @@ Update application model configuration
| 400 | Invalid configuration |
| 404 | App not found |
-### /apps/{app_id}/name
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/name
Check if app name is available
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AppNamePayload](#appnamepayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AppNamePayload](#appnamepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Name availability checked | [AppDetail](#appdetail) |
+| 200 | Name availability checked | **application/json**: [AppDetail](#appdetail)
|
-### /apps/{app_id}/publish-to-creators-platform
+### [POST] /apps/{app_id}/publish-to-creators-platform
+**Publish app to Creators Platform**
-#### POST
-##### Summary
-
-Publish app to Creators Platform
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [RedirectUrlResponse](#redirecturlresponse) |
-
-### /apps/{app_id}/server
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [RedirectUrlResponse](#redirecturlresponse)
|
+### [GET] /apps/{app_id}/server
Get MCP server configuration for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | MCP server configuration retrieved successfully | [AppMCPServerResponse](#appmcpserverresponse) |
-
-#### POST
-##### Description
+| 200 | MCP server configuration retrieved successfully | **application/json**: [AppMCPServerResponse](#appmcpserverresponse)
|
+### [POST] /apps/{app_id}/server
Create MCP server configuration for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MCPServerCreatePayload](#mcpservercreatepayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MCPServerCreatePayload](#mcpservercreatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | MCP server configuration created successfully | [AppMCPServerResponse](#appmcpserverresponse) |
+| 201 | MCP server configuration created successfully | **application/json**: [AppMCPServerResponse](#appmcpserverresponse)
|
| 403 | Insufficient permissions | |
-#### PUT
-##### Description
-
+### [PUT] /apps/{app_id}/server
Update MCP server configuration for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MCPServerUpdatePayload](#mcpserverupdatepayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MCPServerUpdatePayload](#mcpserverupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | MCP server configuration updated successfully | [AppMCPServerResponse](#appmcpserverresponse) |
+| 200 | MCP server configuration updated successfully | **application/json**: [AppMCPServerResponse](#appmcpserverresponse)
|
| 403 | Insufficient permissions | |
| 404 | Server not found | |
-### /apps/{app_id}/site
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/site
Update application site configuration
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AppSiteUpdatePayload](#appsiteupdatepayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AppSiteUpdatePayload](#appsiteupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Site configuration updated successfully | [AppSiteResponse](#appsiteresponse) |
+| 200 | Site configuration updated successfully | **application/json**: [AppSiteResponse](#appsiteresponse)
|
| 403 | Insufficient permissions | |
| 404 | App not found | |
-### /apps/{app_id}/site-enable
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/site-enable
Enable or disable app site
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AppSiteStatusPayload](#appsitestatuspayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AppSiteStatusPayload](#appsitestatuspayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Site status updated successfully | [AppDetail](#appdetail) |
+| 200 | Site status updated successfully | **application/json**: [AppDetail](#appdetail)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/site/access-token-reset
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/site/access-token-reset
Reset access token for application site
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Access token reset successfully | [AppSiteResponse](#appsiteresponse) |
+| 200 | Access token reset successfully | **application/json**: [AppSiteResponse](#appsiteresponse)
|
| 403 | Insufficient permissions (admin/owner required) | |
| 404 | App or site not found | |
-### /apps/{app_id}/statistics/average-response-time
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/statistics/average-response-time
Get average response time statistics for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [StatisticTimeRangeQuery](#statistictimerangequery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Average response time statistics retrieved successfully | [ object ] |
-
-### /apps/{app_id}/statistics/average-session-interactions
-
-#### GET
-##### Description
+| 200 | Average response time statistics retrieved successfully | **application/json**: [ object ]
|
+### [GET] /apps/{app_id}/statistics/average-session-interactions
Get average session interaction statistics for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [StatisticTimeRangeQuery](#statistictimerangequery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Average session interaction statistics retrieved successfully | [ object ] |
-
-### /apps/{app_id}/statistics/daily-conversations
-
-#### GET
-##### Description
+| 200 | Average session interaction statistics retrieved successfully | **application/json**: [ object ]
|
+### [GET] /apps/{app_id}/statistics/daily-conversations
Get daily conversation statistics for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [StatisticTimeRangeQuery](#statistictimerangequery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Daily conversation statistics retrieved successfully | [ object ] |
-
-### /apps/{app_id}/statistics/daily-end-users
-
-#### GET
-##### Description
+| 200 | Daily conversation statistics retrieved successfully | **application/json**: [ object ]
|
+### [GET] /apps/{app_id}/statistics/daily-end-users
Get daily terminal/end-user statistics for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [StatisticTimeRangeQuery](#statistictimerangequery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Daily terminal statistics retrieved successfully | [ object ] |
-
-### /apps/{app_id}/statistics/daily-messages
-
-#### GET
-##### Description
+| 200 | Daily terminal statistics retrieved successfully | **application/json**: [ object ]
|
+### [GET] /apps/{app_id}/statistics/daily-messages
Get daily message statistics for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [StatisticTimeRangeQuery](#statistictimerangequery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Daily message statistics retrieved successfully | [ object ] |
-
-### /apps/{app_id}/statistics/token-costs
-
-#### GET
-##### Description
+| 200 | Daily message statistics retrieved successfully | **application/json**: [ object ]
|
+### [GET] /apps/{app_id}/statistics/token-costs
Get daily token cost statistics for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [StatisticTimeRangeQuery](#statistictimerangequery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Daily token cost statistics retrieved successfully | [ object ] |
-
-### /apps/{app_id}/statistics/tokens-per-second
-
-#### GET
-##### Description
+| 200 | Daily token cost statistics retrieved successfully | **application/json**: [ object ]
|
+### [GET] /apps/{app_id}/statistics/tokens-per-second
Get tokens per second statistics for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [StatisticTimeRangeQuery](#statistictimerangequery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Tokens per second statistics retrieved successfully | [ object ] |
-
-### /apps/{app_id}/statistics/user-satisfaction-rate
-
-#### GET
-##### Description
+| 200 | Tokens per second statistics retrieved successfully | **application/json**: [ object ]
|
+### [GET] /apps/{app_id}/statistics/user-satisfaction-rate
Get user satisfaction rate statistics for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [StatisticTimeRangeQuery](#statistictimerangequery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | User satisfaction rate statistics retrieved successfully | [ object ] |
-
-### /apps/{app_id}/text-to-audio
-
-#### POST
-##### Description
+| 200 | User satisfaction rate statistics retrieved successfully | **application/json**: [ object ]
|
+### [POST] /apps/{app_id}/text-to-audio
Convert text to speech for chat messages
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TextToSpeechPayload](#texttospeechpayload) |
| app_id | path | App ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TextToSpeechPayload](#texttospeechpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Text to speech conversion successful |
| 400 | Bad request - Invalid parameters |
-### /apps/{app_id}/text-to-audio/voices
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/text-to-audio/voices
Get available TTS voices for a specific language
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TextToSpeechVoiceQuery](#texttospeechvoicequery) |
| app_id | path | App ID | Yes | string |
+| language | query | Language code | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | TTS voices retrieved successfully | [ object ] |
+| 200 | TTS voices retrieved successfully | **application/json**: [ object ]
|
| 400 | Invalid language parameter | |
-### /apps/{app_id}/trace
-
-#### GET
-##### Summary
-
-Get app trace
-
-##### Description
+### [GET] /apps/{app_id}/trace
+**Get app trace**
Get app tracing configuration
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Trace configuration retrieved successfully |
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/trace
Update app tracing configuration
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AppTracePayload](#apptracepayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AppTracePayload](#apptracepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Trace configuration updated successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Trace configuration updated successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 403 | Insufficient permissions | |
-### /apps/{app_id}/trace-config
-
-#### DELETE
-##### Summary
-
-Delete an existing trace app configuration
-
-##### Description
+### [DELETE] /apps/{app_id}/trace-config
+**Delete an existing trace app configuration**
Delete an existing tracing configuration for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TraceProviderQuery](#traceproviderquery) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TraceProviderQuery](#traceproviderquery)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Tracing configuration deleted successfully |
| 400 | Invalid request parameters or configuration not found |
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/trace-config
Get tracing configuration for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TraceProviderQuery](#traceproviderquery) |
| app_id | path | Application ID | Yes | string |
+| tracing_provider | query | Tracing provider name | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Tracing configuration retrieved successfully | object |
+| 200 | Tracing configuration retrieved successfully | **application/json**: object
|
| 400 | Invalid request parameters | |
-#### PATCH
-##### Summary
-
-Update an existing trace app configuration
-
-##### Description
+### [PATCH] /apps/{app_id}/trace-config
+**Update an existing trace app configuration**
Update an existing tracing configuration for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TraceConfigPayload](#traceconfigpayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TraceConfigPayload](#traceconfigpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Tracing configuration updated successfully | object |
+| 200 | Tracing configuration updated successfully | **application/json**: object
|
| 400 | Invalid request parameters or configuration not found | |
-#### POST
-##### Summary
-
-Create a new trace app configuration
-
-##### Description
+### [POST] /apps/{app_id}/trace-config
+**Create a new trace app configuration**
Create a new tracing configuration for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TraceConfigPayload](#traceconfigpayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TraceConfigPayload](#traceconfigpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Tracing configuration created successfully | object |
+| 201 | Tracing configuration created successfully | **application/json**: object
|
| 400 | Invalid request parameters or configuration already exists | |
-### /apps/{app_id}/trigger-enable
+### [POST] /apps/{app_id}/trigger-enable
+**Update app trigger (enable/disable)**
-#### POST
-##### Summary
-
-Update app trigger (enable/disable)
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| app_id | path | | Yes | string |
-| payload | body | | Yes | [ParserEnable](#parserenable) |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 200 | Success | [WorkflowTriggerResponse](#workflowtriggerresponse) |
-
-### /apps/{app_id}/triggers
-
-#### GET
-##### Summary
-
-Get app triggers list
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserEnable](#parserenable)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [WorkflowTriggerListResponse](#workflowtriggerlistresponse) |
+| 200 | Success | **application/json**: [WorkflowTriggerResponse](#workflowtriggerresponse)
|
-### /apps/{app_id}/workflow-app-logs
+### [GET] /apps/{app_id}/triggers
+**Get app triggers list**
-#### GET
-##### Summary
+#### Parameters
-Get workflow app logs
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| app_id | path | | Yes | string |
-##### Description
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 200 | Success | **application/json**: [WorkflowTriggerListResponse](#workflowtriggerlistresponse)
|
+
+### [GET] /apps/{app_id}/workflow-app-logs
+**Get workflow app logs**
Get workflow application execution logs
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowAppLogQuery](#workflowapplogquery) |
| app_id | path | Application ID | Yes | string |
+| created_at__after | query | Filter logs created after this timestamp | No | |
+| created_at__before | query | Filter logs created before this timestamp | No | |
+| created_by_account | query | Filter by account | No | |
+| created_by_end_user_session_id | query | Filter by end user session ID | No | |
+| detail | query | Whether to return detailed logs | No | boolean |
+| keyword | query | Search keyword for filtering logs | No | |
+| limit | query | Number of items per page (1-100) | No | integer,
**Default:** 20 |
+| page | query | Page number (1-99999) | No | integer,
**Default:** 1 |
+| status | query | Execution status filter (succeeded, failed, stopped, partial-succeeded) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow app logs retrieved successfully | [WorkflowAppLogPaginationResponse](#workflowapplogpaginationresponse) |
+| 200 | Workflow app logs retrieved successfully | **application/json**: [WorkflowAppLogPaginationResponse](#workflowapplogpaginationresponse)
|
-### /apps/{app_id}/workflow-archived-logs
-
-#### GET
-##### Summary
-
-Get workflow archived logs
-
-##### Description
+### [GET] /apps/{app_id}/workflow-archived-logs
+**Get workflow archived logs**
Get workflow archived execution logs
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowAppLogQuery](#workflowapplogquery) |
| app_id | path | Application ID | Yes | string |
+| created_at__after | query | Filter logs created after this timestamp | No | |
+| created_at__before | query | Filter logs created before this timestamp | No | |
+| created_by_account | query | Filter by account | No | |
+| created_by_end_user_session_id | query | Filter by end user session ID | No | |
+| detail | query | Whether to return detailed logs | No | boolean |
+| keyword | query | Search keyword for filtering logs | No | |
+| limit | query | Number of items per page (1-100) | No | integer,
**Default:** 20 |
+| page | query | Page number (1-99999) | No | integer,
**Default:** 1 |
+| status | query | Execution status filter (succeeded, failed, stopped, partial-succeeded) | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow archived logs retrieved successfully | [WorkflowArchivedLogPaginationResponse](#workflowarchivedlogpaginationresponse) |
+| 200 | Workflow archived logs retrieved successfully | **application/json**: [WorkflowArchivedLogPaginationResponse](#workflowarchivedlogpaginationresponse)
|
-### /apps/{app_id}/workflow-runs
+### [GET] /apps/{app_id}/workflow-runs
+**Get workflow run list**
-#### GET
-##### Summary
-
-Get workflow run list
-
-##### Description
-
-Get workflow run list
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| last_id | query | Last run ID for pagination | No | string |
-| limit | query | Number of items per page (1-100) | No | integer |
-| status | query | Workflow run status filter | No | string |
-| triggered_from | query | Filter by trigger source: debugging or app-run. Default: debugging | No | string |
+| limit | query | Number of items per page (1-100) | No | integer,
**Default:** 20 |
+| status | query | Workflow run status filter | No | string,
**Available values:** "failed", "partial-succeeded", "running", "stopped", "succeeded" |
+| triggered_from | query | Filter by trigger source: debugging or app-run. Default: debugging | No | string,
**Available values:** "app-run", "debugging" |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow runs retrieved successfully | [WorkflowRunPaginationResponse](#workflowrunpaginationresponse) |
+| 200 | Workflow runs retrieved successfully | **application/json**: [WorkflowRunPaginationResponse](#workflowrunpaginationresponse)
|
-### /apps/{app_id}/workflow-runs/count
+### [GET] /apps/{app_id}/workflow-runs/count
+**Get workflow runs count statistics**
-#### GET
-##### Summary
-
-Get workflow runs count statistics
-
-##### Description
-
-Get workflow runs count statistics
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-| status | query | Workflow run status filter | No | string |
+| status | query | Workflow run status filter | No | string,
**Available values:** "failed", "partial-succeeded", "running", "stopped", "succeeded" |
| time_range | query | Filter by time range (optional): e.g., 7d (7 days), 4h (4 hours), 30m (30 minutes), 30s (30 seconds). Filters by created_at field. | No | string |
-| triggered_from | query | Filter by trigger source: debugging or app-run. Default: debugging | No | string |
+| triggered_from | query | Filter by trigger source: debugging or app-run. Default: debugging | No | string,
**Available values:** "app-run", "debugging" |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow runs count retrieved successfully | [WorkflowRunCountResponse](#workflowruncountresponse) |
+| 200 | Workflow runs count retrieved successfully | **application/json**: [WorkflowRunCountResponse](#workflowruncountresponse)
|
-### /apps/{app_id}/workflow-runs/tasks/{task_id}/stop
-
-#### POST
-##### Summary
-
-Stop workflow task
-
-##### Description
+### [POST] /apps/{app_id}/workflow-runs/tasks/{task_id}/stop
+**Stop workflow task**
Stop running workflow task
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| task_id | path | Task ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Task stopped successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Task stopped successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 403 | Permission denied | |
| 404 | Task not found | |
-### /apps/{app_id}/workflow-runs/{run_id}
+### [GET] /apps/{app_id}/workflow-runs/{run_id}
+**Get workflow run detail**
-#### GET
-##### Summary
-
-Get workflow run detail
-
-##### Description
-
-Get workflow run detail
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run detail retrieved successfully | [WorkflowRunDetailResponse](#workflowrundetailresponse) |
+| 200 | Workflow run detail retrieved successfully | **application/json**: [WorkflowRunDetailResponse](#workflowrundetailresponse)
|
| 404 | Workflow run not found | |
-### /apps/{app_id}/workflow-runs/{run_id}/export
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflow-runs/{run_id}/export
Generate a download URL for an archived workflow run.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Export URL generated | [WorkflowRunExportResponse](#workflowrunexportresponse) |
+| 200 | Export URL generated | **application/json**: [WorkflowRunExportResponse](#workflowrunexportresponse)
|
-### /apps/{app_id}/workflow-runs/{run_id}/node-executions
+### [GET] /apps/{app_id}/workflow-runs/{run_id}/node-executions
+**Get workflow run node execution list**
-#### GET
-##### Summary
-
-Get workflow run node execution list
-
-##### Description
-
-Get workflow run node execution list
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node executions retrieved successfully | [WorkflowRunNodeExecutionListResponse](#workflowrunnodeexecutionlistresponse) |
+| 200 | Node executions retrieved successfully | **application/json**: [WorkflowRunNodeExecutionListResponse](#workflowrunnodeexecutionlistresponse)
|
| 404 | Workflow run not found | |
-### /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files
List a directory in a workflow Agent node sandbox
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -2750,22 +2469,18 @@ List a directory in a workflow Agent node sandbox
| node_id | path | Workflow Agent node ID | Yes | string |
| workflow_run_id | path | Workflow run ID | Yes | string |
| node_execution_id | query | Optional workflow node execution ID. When omitted, the latest active session for the node is used. | No | string |
-| path | query | Directory path relative to the sandbox workspace | No | string |
+| path | query | Directory path relative to the sandbox workspace | No | string,
**Default:** . |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Listing returned | [SandboxListResponse](#sandboxlistresponse) |
-
-### /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/read
-
-#### GET
-##### Description
+| 200 | Listing returned | **application/json**: [SandboxListResponse](#sandboxlistresponse)
|
+### [GET] /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/read
Read a text/binary preview file in a workflow Agent node sandbox
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -2775,208 +2490,166 @@ Read a text/binary preview file in a workflow Agent node sandbox
| node_execution_id | query | Optional workflow node execution ID. When omitted, the latest active session for the node is used. | No | string |
| path | query | File path relative to the sandbox workspace | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Preview returned | [SandboxReadResponse](#sandboxreadresponse) |
-
-### /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/upload
-
-#### POST
-##### Description
+| 200 | Preview returned | **application/json**: [SandboxReadResponse](#sandboxreadresponse)
|
+### [POST] /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/upload
Upload one workflow Agent sandbox file as a Dify ToolFile mapping
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| node_id | path | | Yes | string |
| workflow_run_id | path | | Yes | string |
-| payload | body | | Yes | [WorkflowAgentSandboxUploadPayload](#workflowagentsandboxuploadpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowAgentSandboxUploadPayload](#workflowagentsandboxuploadpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Uploaded | [SandboxUploadResponse](#sandboxuploadresponse) |
+| 200 | Uploaded | **application/json**: [SandboxUploadResponse](#sandboxuploadresponse)
|
-### /apps/{app_id}/workflow/comments
+### [GET] /apps/{app_id}/workflow/comments
+**Get all comments for a workflow**
-#### GET
-##### Summary
-
-Get all comments for a workflow
-
-##### Description
-
-Get all comments for a workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Comments retrieved successfully | [WorkflowCommentBasicList](#workflowcommentbasiclist) |
+| 200 | Comments retrieved successfully | **application/json**: [WorkflowCommentBasicList](#workflowcommentbasiclist)
|
-#### POST
-##### Summary
+### [POST] /apps/{app_id}/workflow/comments
+**Create a new workflow comment**
-Create a new workflow comment
-
-##### Description
-
-Create a new workflow comment
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowCommentCreatePayload](#workflowcommentcreatepayload) |
-| app_id | path | Application ID | Yes | string |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 201 | Comment created successfully | [WorkflowCommentCreate](#workflowcommentcreate) |
-
-### /apps/{app_id}/workflow/comments/mention-users
-
-#### GET
-##### Summary
-
-Get all users in current tenant for mentions
-
-##### Description
-
-Get all users in current tenant for mentions
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowCommentCreatePayload](#workflowcommentcreatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Mentionable users retrieved successfully | [WorkflowCommentMentionUsersPayload](#workflowcommentmentionuserspayload) |
+| 201 | Comment created successfully | **application/json**: [WorkflowCommentCreate](#workflowcommentcreate)
|
-### /apps/{app_id}/workflow/comments/{comment_id}
+### [GET] /apps/{app_id}/workflow/comments/mention-users
+**Get all users in current tenant for mentions**
-#### DELETE
-##### Summary
+#### Parameters
-Delete a workflow comment
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| app_id | path | Application ID | Yes | string |
-##### Description
+#### Responses
-Delete a workflow comment
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 200 | Mentionable users retrieved successfully | **application/json**: [WorkflowCommentMentionUsersPayload](#workflowcommentmentionuserspayload)
|
-##### Parameters
+### [DELETE] /apps/{app_id}/workflow/comments/{comment_id}
+**Delete a workflow comment**
+
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| comment_id | path | Comment ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Comment deleted successfully |
-#### GET
-##### Summary
+### [GET] /apps/{app_id}/workflow/comments/{comment_id}
+**Get a specific workflow comment**
-Get a specific workflow comment
-
-##### Description
-
-Get a specific workflow comment
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| comment_id | path | Comment ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Comment retrieved successfully | [WorkflowCommentDetail](#workflowcommentdetail) |
+| 200 | Comment retrieved successfully | **application/json**: [WorkflowCommentDetail](#workflowcommentdetail)
|
-#### PUT
-##### Summary
+### [PUT] /apps/{app_id}/workflow/comments/{comment_id}
+**Update a workflow comment**
-Update a workflow comment
-
-##### Description
-
-Update a workflow comment
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowCommentUpdatePayload](#workflowcommentupdatepayload) |
| app_id | path | Application ID | Yes | string |
| comment_id | path | Comment ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowCommentUpdatePayload](#workflowcommentupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Comment updated successfully | [WorkflowCommentUpdate](#workflowcommentupdate) |
+| 200 | Comment updated successfully | **application/json**: [WorkflowCommentUpdate](#workflowcommentupdate)
|
-### /apps/{app_id}/workflow/comments/{comment_id}/replies
+### [POST] /apps/{app_id}/workflow/comments/{comment_id}/replies
+**Add a reply to a workflow comment**
-#### POST
-##### Summary
-
-Add a reply to a workflow comment
-
-##### Description
-
-Add a reply to a workflow comment
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowCommentReplyPayload](#workflowcommentreplypayload) |
| app_id | path | Application ID | Yes | string |
| comment_id | path | Comment ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowCommentReplyPayload](#workflowcommentreplypayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Reply created successfully | [WorkflowCommentReplyCreate](#workflowcommentreplycreate) |
+| 201 | Reply created successfully | **application/json**: [WorkflowCommentReplyCreate](#workflowcommentreplycreate)
|
-### /apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}
+### [DELETE] /apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}
+**Delete a comment reply**
-#### DELETE
-##### Summary
-
-Delete a comment reply
-
-##### Description
-
-Delete a comment reply
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -2984,456 +2657,406 @@ Delete a comment reply
| comment_id | path | Comment ID | Yes | string |
| reply_id | path | Reply ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Reply deleted successfully |
-#### PUT
-##### Summary
+### [PUT] /apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}
+**Update a comment reply**
-Update a comment reply
-
-##### Description
-
-Update a comment reply
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowCommentReplyPayload](#workflowcommentreplypayload) |
| app_id | path | Application ID | Yes | string |
| comment_id | path | Comment ID | Yes | string |
| reply_id | path | Reply ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowCommentReplyPayload](#workflowcommentreplypayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Reply updated successfully | [WorkflowCommentReplyUpdate](#workflowcommentreplyupdate) |
+| 200 | Reply updated successfully | **application/json**: [WorkflowCommentReplyUpdate](#workflowcommentreplyupdate)
|
-### /apps/{app_id}/workflow/comments/{comment_id}/resolve
+### [POST] /apps/{app_id}/workflow/comments/{comment_id}/resolve
+**Resolve a workflow comment**
-#### POST
-##### Summary
-
-Resolve a workflow comment
-
-##### Description
-
-Resolve a workflow comment
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| comment_id | path | Comment ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Comment resolved successfully | [WorkflowCommentResolve](#workflowcommentresolve) |
-
-### /apps/{app_id}/workflow/statistics/average-app-interactions
-
-#### GET
-##### Description
+| 200 | Comment resolved successfully | **application/json**: [WorkflowCommentResolve](#workflowcommentresolve)
|
+### [GET] /apps/{app_id}/workflow/statistics/average-app-interactions
Get workflow average app interaction statistics
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowStatisticQuery](#workflowstatisticquery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date and time (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date and time (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Average app interaction statistics retrieved successfully |
-### /apps/{app_id}/workflow/statistics/daily-conversations
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflow/statistics/daily-conversations
Get workflow daily runs statistics
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowStatisticQuery](#workflowstatisticquery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date and time (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date and time (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Daily runs statistics retrieved successfully |
-### /apps/{app_id}/workflow/statistics/daily-terminals
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflow/statistics/daily-terminals
Get workflow daily terminals statistics
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowStatisticQuery](#workflowstatisticquery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date and time (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date and time (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Daily terminals statistics retrieved successfully |
-### /apps/{app_id}/workflow/statistics/token-costs
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflow/statistics/token-costs
Get workflow daily token cost statistics
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowStatisticQuery](#workflowstatisticquery) |
| app_id | path | Application ID | Yes | string |
+| end | query | End date and time (YYYY-MM-DD HH:MM) | No | |
+| start | query | Start date and time (YYYY-MM-DD HH:MM) | No | |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Daily token cost statistics retrieved successfully |
-### /apps/{app_id}/workflows
-
-#### GET
-##### Summary
-
-Get published workflows
-
-##### Description
+### [GET] /apps/{app_id}/workflows
+**Get published workflows**
Get all published workflows for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowListQuery](#workflowlistquery) |
| app_id | path | Application ID | Yes | string |
+| limit | query | | No | integer,
**Default:** 10 |
+| named_only | query | | No | boolean |
+| page | query | | No | integer,
**Default:** 1 |
+| user_id | query | | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Published workflows retrieved successfully | [WorkflowPaginationResponse](#workflowpaginationresponse) |
+| 200 | Published workflows retrieved successfully | **application/json**: [WorkflowPaginationResponse](#workflowpaginationresponse)
|
-### /apps/{app_id}/workflows/default-workflow-block-configs
-
-#### GET
-##### Summary
-
-Get default block config
-
-##### Description
+### [GET] /apps/{app_id}/workflows/default-workflow-block-configs
+**Get default block config**
Get default block configurations for workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Default block configurations retrieved successfully |
-### /apps/{app_id}/workflows/default-workflow-block-configs/{block_type}
-
-#### GET
-##### Summary
-
-Get default block config
-
-##### Description
+### [GET] /apps/{app_id}/workflows/default-workflow-block-configs/{block_type}
+**Get default block config**
Get default block configuration by type
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DefaultBlockConfigQuery](#defaultblockconfigquery) |
| app_id | path | Application ID | Yes | string |
| block_type | path | Block type | Yes | string |
+| q | query | | No | |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Default block configuration retrieved successfully |
| 404 | Block type not found |
-### /apps/{app_id}/workflows/draft
-
-#### GET
-##### Summary
-
-Get draft workflow
-
-##### Description
+### [GET] /apps/{app_id}/workflows/draft
+**Get draft workflow**
Get draft workflow for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Draft workflow retrieved successfully | [WorkflowResponse](#workflowresponse) |
+| 200 | Draft workflow retrieved successfully | **application/json**: [WorkflowResponse](#workflowresponse)
|
| 404 | Draft workflow not found | |
-#### POST
-##### Summary
-
-Sync draft workflow
-
-##### Description
+### [POST] /apps/{app_id}/workflows/draft
+**Sync draft workflow**
Sync draft workflow configuration
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SyncDraftWorkflowPayload](#syncdraftworkflowpayload) |
| app_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SyncDraftWorkflowPayload](#syncdraftworkflowpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Draft workflow synced successfully | [SyncDraftWorkflowResponse](#syncdraftworkflowresponse) |
+| 200 | Draft workflow synced successfully | **application/json**: [SyncDraftWorkflowResponse](#syncdraftworkflowresponse)
|
| 400 | Invalid workflow configuration | |
| 403 | Permission denied | |
-### /apps/{app_id}/workflows/draft/conversation-variables
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/draft/conversation-variables
Get conversation variables for workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Conversation variables retrieved successfully | [WorkflowDraftVariableList](#workflowdraftvariablelist) |
+| 200 | Conversation variables retrieved successfully | **application/json**: [WorkflowDraftVariableList](#workflowdraftvariablelist)
|
| 404 | Draft workflow not found | |
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/workflows/draft/conversation-variables
Update conversation variables for workflow draft
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ConversationVariableUpdatePayload](#conversationvariableupdatepayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ConversationVariableUpdatePayload](#conversationvariableupdatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Conversation variables updated successfully |
-### /apps/{app_id}/workflows/draft/environment-variables
-
-#### GET
-##### Summary
-
-Get draft workflow
-
-##### Description
+### [GET] /apps/{app_id}/workflows/draft/environment-variables
+**Get draft workflow**
Get environment variables for workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Environment variables retrieved successfully |
| 404 | Draft workflow not found |
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/workflows/draft/environment-variables
Update environment variables for workflow draft
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EnvironmentVariableUpdatePayload](#environmentvariableupdatepayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EnvironmentVariableUpdatePayload](#environmentvariableupdatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Environment variables updated successfully |
-### /apps/{app_id}/workflows/draft/features
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/workflows/draft/features
Update draft workflow features
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowFeaturesPayload](#workflowfeaturespayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowFeaturesPayload](#workflowfeaturespayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow features updated successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Workflow features updated successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/delivery-test
-
-#### POST
-##### Summary
-
-Test human input delivery
-
-##### Description
+### [POST] /apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/delivery-test
+**Test human input delivery**
Test human input delivery for workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [HumanInputDeliveryTestPayload](#humaninputdeliverytestpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HumanInputDeliveryTestPayload](#humaninputdeliverytestpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/preview
-
-#### POST
-##### Summary
-
-Preview human input form content and placeholders
-
-##### Description
+### [POST] /apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/preview
+**Preview human input form content and placeholders**
Get human input form preview for workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [HumanInputFormPreviewPayload](#humaninputformpreviewpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HumanInputFormPreviewPayload](#humaninputformpreviewpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/run
-
-#### POST
-##### Summary
-
-Submit human input form preview
-
-##### Description
+### [POST] /apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/run
+**Submit human input form preview**
Submit human input form preview for workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [HumanInputFormSubmitPayload](#humaninputformsubmitpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HumanInputFormSubmitPayload](#humaninputformsubmitpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /apps/{app_id}/workflows/draft/iteration/nodes/{node_id}/run
+### [POST] /apps/{app_id}/workflows/draft/iteration/nodes/{node_id}/run
+**Run draft workflow iteration node**
-#### POST
-##### Summary
-
-Run draft workflow iteration node
-
-##### Description
-
-Run draft workflow iteration node
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [IterationNodeRunPayload](#iterationnoderunpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [IterationNodeRunPayload](#iterationnoderunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -3441,26 +3064,23 @@ Run draft workflow iteration node
| 403 | Permission denied |
| 404 | Node not found |
-### /apps/{app_id}/workflows/draft/loop/nodes/{node_id}/run
+### [POST] /apps/{app_id}/workflows/draft/loop/nodes/{node_id}/run
+**Run draft workflow loop node**
-#### POST
-##### Summary
-
-Run draft workflow loop node
-
-##### Description
-
-Run draft workflow loop node
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [LoopNodeRunPayload](#loopnoderunpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [LoopNodeRunPayload](#loopnoderunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -3468,172 +3088,167 @@ Run draft workflow loop node
| 403 | Permission denied |
| 404 | Node not found |
-### /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer
-
-#### GET
-##### Parameters
+### [GET] /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| node_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow agent composer state | [WorkflowAgentComposerResponse](#workflowagentcomposerresponse) |
+| 200 | Workflow agent composer state | **application/json**: [WorkflowAgentComposerResponse](#workflowagentcomposerresponse)
|
-#### PUT
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| app_id | path | | Yes | string |
-| node_id | path | | Yes | string |
-| payload | body | | Yes | [ComposerSavePayload](#composersavepayload) |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 200 | Workflow agent composer saved | [WorkflowAgentComposerResponse](#workflowagentcomposerresponse) |
-
-### /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/candidates
-
-#### GET
-##### Parameters
+### [PUT] /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| node_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ComposerSavePayload](#composersavepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow agent composer candidates | [AgentComposerCandidatesResponse](#agentcomposercandidatesresponse) |
+| 200 | Workflow agent composer saved | **application/json**: [WorkflowAgentComposerResponse](#workflowagentcomposerresponse)
|
-### /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/impact
-
-#### POST
-##### Parameters
+### [GET] /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/candidates
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| node_id | path | | Yes | string |
-| payload | body | | Yes | [ComposerSavePayload](#composersavepayload) |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow agent composer impact | [AgentComposerImpactResponse](#agentcomposerimpactresponse) |
+| 200 | Workflow agent composer candidates | **application/json**: [AgentComposerCandidatesResponse](#agentcomposercandidatesresponse)
|
-### /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/save-to-roster
-
-#### POST
-##### Parameters
+### [POST] /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/impact
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| node_id | path | | Yes | string |
-| payload | body | | Yes | [ComposerSavePayload](#composersavepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ComposerSavePayload](#composersavepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow agent composer saved to roster | [WorkflowAgentComposerResponse](#workflowagentcomposerresponse) |
+| 200 | Workflow agent composer impact | **application/json**: [AgentComposerImpactResponse](#agentcomposerimpactresponse)
|
-### /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/validate
-
-#### POST
-##### Parameters
+### [POST] /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/save-to-roster
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| node_id | path | | Yes | string |
-| payload | body | | Yes | [ComposerSavePayload](#composersavepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ComposerSavePayload](#composersavepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow agent composer validation result | [AgentComposerValidateResponse](#agentcomposervalidateresponse) |
+| 200 | Workflow agent composer saved to roster | **application/json**: [WorkflowAgentComposerResponse](#workflowagentcomposerresponse)
|
-### /apps/{app_id}/workflows/draft/nodes/{node_id}/last-run
+### [POST] /apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/validate
+#### Parameters
-#### GET
-##### Description
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| app_id | path | | Yes | string |
+| node_id | path | | Yes | string |
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ComposerSavePayload](#composersavepayload)
|
+
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 200 | Workflow agent composer validation result | **application/json**: [AgentComposerValidateResponse](#agentcomposervalidateresponse)
|
+
+### [GET] /apps/{app_id}/workflows/draft/nodes/{node_id}/last-run
Get last run result for draft workflow node
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node last run retrieved successfully | [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse) |
+| 200 | Node last run retrieved successfully | **application/json**: [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse)
|
| 403 | Permission denied | |
| 404 | Node last run not found | |
-### /apps/{app_id}/workflows/draft/nodes/{node_id}/run
+### [POST] /apps/{app_id}/workflows/draft/nodes/{node_id}/run
+**Run draft workflow node**
-#### POST
-##### Summary
-
-Run draft workflow node
-
-##### Description
-
-Run draft workflow node
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DraftWorkflowNodeRunPayload](#draftworkflownoderunpayload) |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DraftWorkflowNodeRunPayload](#draftworkflownoderunpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node run started successfully | [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse) |
+| 200 | Node run started successfully | **application/json**: [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse)
|
| 403 | Permission denied | |
| 404 | Node not found | |
-### /apps/{app_id}/workflows/draft/nodes/{node_id}/trigger/run
+### [POST] /apps/{app_id}/workflows/draft/nodes/{node_id}/trigger/run
+**Poll for trigger events and execute single node when event arrives**
-#### POST
-##### Summary
-
-Poll for trigger events and execute single node when event arrives
-
-##### Description
-
-Poll for trigger events and execute single node when event arrives
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -3641,119 +3256,98 @@ Poll for trigger events and execute single node when event arrives
| 403 | Permission denied |
| 500 | Internal server error |
-### /apps/{app_id}/workflows/draft/nodes/{node_id}/variables
-
-#### DELETE
-##### Description
-
+### [DELETE] /apps/{app_id}/workflows/draft/nodes/{node_id}/variables
Delete all variables for a specific node
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| node_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Node variables deleted successfully |
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/draft/nodes/{node_id}/variables
Get variables for a specific node
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| node_id | path | Node ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node variables retrieved successfully | [WorkflowDraftVariableList](#workflowdraftvariablelist) |
+| 200 | Node variables retrieved successfully | **application/json**: [WorkflowDraftVariableList](#workflowdraftvariablelist)
|
-### /apps/{app_id}/workflows/draft/run
+### [POST] /apps/{app_id}/workflows/draft/run
+**Run draft workflow**
-#### POST
-##### Summary
-
-Run draft workflow
-
-##### Description
-
-Run draft workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DraftWorkflowRunPayload](#draftworkflowrunpayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DraftWorkflowRunPayload](#draftworkflowrunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Draft workflow run started successfully |
| 403 | Permission denied |
-### /apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs
Snapshot of every node's declared outputs for a draft workflow run.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run node outputs | [WorkflowRunSnapshotView](#workflowrunsnapshotview) |
+| 200 | Workflow run node outputs | **application/json**: [WorkflowRunSnapshotView](#workflowrunsnapshotview)
|
| 404 | Workflow run not found | |
-### /apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/events
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/events
Server-Sent Events stream of inspector deltas for a draft workflow run.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Workflow run node output event stream |
| 404 | Workflow run not found |
-### /apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/{node_id}
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/{node_id}
One node's declared outputs for a draft workflow run.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -3761,21 +3355,17 @@ One node's declared outputs for a draft workflow run.
| node_id | path | Node ID inside the workflow graph | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run node output detail | [NodeOutputsView](#nodeoutputsview) |
+| 200 | Workflow run node output detail | **application/json**: [NodeOutputsView](#nodeoutputsview)
|
| 404 | Workflow run / node not found | |
-### /apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/{node_id}/{output_name}/preview
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/{node_id}/{output_name}/preview
Full value for one declared output, including signed download URL for files.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -3784,51 +3374,44 @@ Full value for one declared output, including signed download URL for files.
| output_name | path | Declared output name as exposed by Composer | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run node output preview | [OutputPreviewView](#outputpreviewview) |
+| 200 | Workflow run node output preview | **application/json**: [OutputPreviewView](#outputpreviewview)
|
| 404 | Workflow run / node / output not found | |
-### /apps/{app_id}/workflows/draft/system-variables
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/draft/system-variables
Get system variables for workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | System variables retrieved successfully | [WorkflowDraftVariableList](#workflowdraftvariablelist) |
+| 200 | System variables retrieved successfully | **application/json**: [WorkflowDraftVariableList](#workflowdraftvariablelist)
|
-### /apps/{app_id}/workflows/draft/trigger/run
+### [POST] /apps/{app_id}/workflows/draft/trigger/run
+**Poll for trigger events and execute full workflow when event arrives**
-#### POST
-##### Summary
-
-Poll for trigger events and execute full workflow when event arrives
-
-##### Description
-
-Poll for trigger events and execute full workflow when event arrives
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DraftWorkflowTriggerRunRequest](#draftworkflowtriggerrunrequest) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DraftWorkflowTriggerRunRequest](#draftworkflowtriggerrunrequest)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -3836,25 +3419,22 @@ Poll for trigger events and execute full workflow when event arrives
| 403 | Permission denied |
| 500 | Internal server error |
-### /apps/{app_id}/workflows/draft/trigger/run-all
+### [POST] /apps/{app_id}/workflows/draft/trigger/run-all
+**Full workflow debug when the start node is a trigger**
-#### POST
-##### Summary
-
-Full workflow debug when the start node is a trigger
-
-##### Description
-
-Full workflow debug when the start node is a trigger
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DraftWorkflowTriggerRunAllPayload](#draftworkflowtriggerrunallpayload) |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DraftWorkflowTriggerRunAllPayload](#draftworkflowtriggerrunallpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -3862,222 +3442,191 @@ Full workflow debug when the start node is a trigger
| 403 | Permission denied |
| 500 | Internal server error |
-### /apps/{app_id}/workflows/draft/variables
-
-#### DELETE
-##### Description
-
+### [DELETE] /apps/{app_id}/workflows/draft/variables
Delete all draft workflow variables
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Workflow variables deleted successfully |
-#### GET
-##### Summary
-
-Get draft workflow
-
-##### Description
+### [GET] /apps/{app_id}/workflows/draft/variables
+**Get draft workflow**
Get draft workflow variables
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowDraftVariableListQuery](#workflowdraftvariablelistquery) |
| app_id | path | Application ID | Yes | string |
| limit | query | Number of items per page (1-100) | No | string |
| page | query | Page number (1-100000) | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow variables retrieved successfully | [WorkflowDraftVariableListWithoutValue](#workflowdraftvariablelistwithoutvalue) |
-
-### /apps/{app_id}/workflows/draft/variables/{variable_id}
-
-#### DELETE
-##### Description
+| 200 | Workflow variables retrieved successfully | **application/json**: [WorkflowDraftVariableListWithoutValue](#workflowdraftvariablelistwithoutvalue)
|
+### [DELETE] /apps/{app_id}/workflows/draft/variables/{variable_id}
Delete a workflow variable
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| variable_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Variable deleted successfully |
| 404 | Variable not found |
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/draft/variables/{variable_id}
Get a specific workflow variable
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| variable_id | path | Variable ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Variable retrieved successfully | [WorkflowDraftVariable](#workflowdraftvariable) |
+| 200 | Variable retrieved successfully | **application/json**: [WorkflowDraftVariable](#workflowdraftvariable)
|
| 404 | Variable not found | |
-#### PATCH
-##### Description
-
+### [PATCH] /apps/{app_id}/workflows/draft/variables/{variable_id}
Update a workflow variable
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowDraftVariableUpdatePayload](#workflowdraftvariableupdatepayload) |
| app_id | path | | Yes | string |
| variable_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowDraftVariableUpdatePayload](#workflowdraftvariableupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Variable updated successfully | [WorkflowDraftVariable](#workflowdraftvariable) |
+| 200 | Variable updated successfully | **application/json**: [WorkflowDraftVariable](#workflowdraftvariable)
|
| 404 | Variable not found | |
-### /apps/{app_id}/workflows/draft/variables/{variable_id}/reset
-
-#### PUT
-##### Description
-
+### [PUT] /apps/{app_id}/workflows/draft/variables/{variable_id}/reset
Reset a workflow variable to its default value
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| variable_id | path | Variable ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Variable reset successfully | [WorkflowDraftVariable](#workflowdraftvariable) |
+| 200 | Variable reset successfully | **application/json**: [WorkflowDraftVariable](#workflowdraftvariable)
|
| 204 | Variable reset (no content) | |
| 404 | Variable not found | |
-### /apps/{app_id}/workflows/publish
-
-#### GET
-##### Summary
-
-Get published workflow
-
-##### Description
+### [GET] /apps/{app_id}/workflows/publish
+**Get published workflow**
Get published workflow for an application
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Published workflow retrieved successfully, or null if not found | [WorkflowResponse](#workflowresponse) |
+| 200 | Published workflow retrieved successfully, or null if not found | **application/json**: [WorkflowResponse](#workflowresponse)
|
-#### POST
-##### Summary
+### [POST] /apps/{app_id}/workflows/publish
+**Publish workflow**
-Publish workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [PublishWorkflowPayload](#publishworkflowpayload) |
| app_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [PublishWorkflowPayload](#publishworkflowpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /apps/{app_id}/workflows/published/runs/{run_id}/node-outputs
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/published/runs/{run_id}/node-outputs
Snapshot of every node's declared outputs for a published workflow run.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run node outputs | [WorkflowRunSnapshotView](#workflowrunsnapshotview) |
+| 200 | Workflow run node outputs | **application/json**: [WorkflowRunSnapshotView](#workflowrunsnapshotview)
|
| 404 | Workflow run not found | |
-### /apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/events
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/events
Server-Sent Events stream of inspector deltas for a published workflow run.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Workflow run node output event stream |
| 404 | Workflow run not found |
-### /apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/{node_id}
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/{node_id}
One node's declared outputs for a published workflow run.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -4085,21 +3634,17 @@ One node's declared outputs for a published workflow run.
| node_id | path | Node ID inside the workflow graph | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run node output detail | [NodeOutputsView](#nodeoutputsview) |
+| 200 | Workflow run node output detail | **application/json**: [NodeOutputsView](#nodeoutputsview)
|
| 404 | Workflow run / node not found | |
-### /apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/{node_id}/{output_name}/preview
-
-#### GET
-##### Description
-
+### [GET] /apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/{node_id}/{output_name}/preview
Full value for one declared output of a published run.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -4108,93 +3653,84 @@ Full value for one declared output of a published run.
| output_name | path | Declared output name as exposed by Composer | Yes | string |
| run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run node output preview | [OutputPreviewView](#outputpreviewview) |
+| 200 | Workflow run node output preview | **application/json**: [OutputPreviewView](#outputpreviewview)
|
| 404 | Workflow run / node / output not found | |
-### /apps/{app_id}/workflows/triggers/webhook
+### [GET] /apps/{app_id}/workflows/triggers/webhook
+**Get webhook trigger for a node**
-#### GET
-##### Summary
-
-Get webhook trigger for a node
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| credential_id | query | | No | |
+| datasource_type | query | | Yes | string |
+| inputs | query | | Yes | object |
| app_id | path | | Yes | string |
-| payload | body | | Yes | [Parser](#parser) |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [WebhookTriggerResponse](#webhooktriggerresponse) |
+| 200 | Success | **application/json**: [WebhookTriggerResponse](#webhooktriggerresponse)
|
-### /apps/{app_id}/workflows/{workflow_id}
+### [DELETE] /apps/{app_id}/workflows/{workflow_id}
+**Delete workflow**
-#### DELETE
-##### Summary
-
-Delete workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| workflow_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### PATCH
-##### Summary
-
-Update workflow attributes
-
-##### Description
+### [PATCH] /apps/{app_id}/workflows/{workflow_id}
+**Update workflow attributes**
Update workflow by ID
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowUpdatePayload](#workflowupdatepayload) |
| app_id | path | Application ID | Yes | string |
| workflow_id | path | Workflow ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowUpdatePayload](#workflowupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow updated successfully | [WorkflowResponse](#workflowresponse) |
+| 200 | Workflow updated successfully | **application/json**: [WorkflowResponse](#workflowresponse)
|
| 403 | Permission denied | |
| 404 | Workflow not found | |
-### /apps/{app_id}/workflows/{workflow_id}/restore
-
-#### POST
-##### Description
-
+### [POST] /apps/{app_id}/workflows/{workflow_id}/restore
Restore a published workflow version into the draft workflow
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | Application ID | Yes | string |
| workflow_id | path | Published workflow ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -4202,512 +3738,462 @@ Restore a published workflow version into the draft workflow
| 400 | Source workflow must be published |
| 404 | Workflow not found |
-### /apps/{resource_id}/api-keys
+### [GET] /apps/{resource_id}/api-keys
+**Get all API keys for an app**
-#### GET
-##### Summary
-
-Get all API keys for an app
-
-##### Description
-
-Get all API keys for an app
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| resource_id | path | App ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | API keys retrieved successfully | [ApiKeyList](#apikeylist) |
+| 200 | API keys retrieved successfully | **application/json**: [ApiKeyList](#apikeylist)
|
-#### POST
-##### Summary
+### [POST] /apps/{resource_id}/api-keys
+**Create a new API key for an app**
-Create a new API key for an app
-
-##### Description
-
-Create a new API key for an app
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| resource_id | path | App ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | API key created successfully | [ApiKeyItem](#apikeyitem) |
+| 201 | API key created successfully | **application/json**: [ApiKeyItem](#apikeyitem)
|
| 400 | Maximum keys exceeded | |
-### /apps/{resource_id}/api-keys/{api_key_id}
+### [DELETE] /apps/{resource_id}/api-keys/{api_key_id}
+**Delete an API key for an app**
-#### DELETE
-##### Summary
-
-Delete an API key for an app
-
-##### Description
-
-Delete an API key for an app
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| api_key_id | path | API key ID | Yes | string |
| resource_id | path | App ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | API key deleted successfully |
-### /apps/{server_id}/server/refresh
-
-#### GET
-##### Description
-
+### [GET] /apps/{server_id}/server/refresh
Refresh MCP server configuration and regenerate server code
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| server_id | path | Server ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | MCP server refreshed successfully | [AppMCPServerResponse](#appmcpserverresponse) |
+| 200 | MCP server refreshed successfully | **application/json**: [AppMCPServerResponse](#appmcpserverresponse)
|
| 403 | Insufficient permissions | |
| 404 | Server not found | |
-### /auth/plugin/datasource/default-list
-
-#### GET
-##### Responses
+### [GET] /auth/plugin/datasource/default-list
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /auth/plugin/datasource/list
-
-#### GET
-##### Responses
+### [GET] /auth/plugin/datasource/list
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /auth/plugin/datasource/{provider_id}
-
-#### GET
-##### Parameters
+### [GET] /auth/plugin/datasource/{provider_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Parameters
+### [POST] /auth/plugin/datasource/{provider_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-| payload | body | | Yes | [DatasourceCredentialPayload](#datasourcecredentialpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasourceCredentialPayload](#datasourcecredentialpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /auth/plugin/datasource/{provider_id}/custom-client
-
-#### DELETE
-##### Parameters
+### [DELETE] /auth/plugin/datasource/{provider_id}/custom-client
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-#### POST
-##### Parameters
+### [POST] /auth/plugin/datasource/{provider_id}/custom-client
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-| payload | body | | Yes | [DatasourceCustomClientPayload](#datasourcecustomclientpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasourceCustomClientPayload](#datasourcecustomclientpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /auth/plugin/datasource/{provider_id}/default
-
-#### POST
-##### Parameters
+### [POST] /auth/plugin/datasource/{provider_id}/default
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-| payload | body | | Yes | [DatasourceDefaultPayload](#datasourcedefaultpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasourceDefaultPayload](#datasourcedefaultpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /auth/plugin/datasource/{provider_id}/delete
-
-#### POST
-##### Parameters
+### [POST] /auth/plugin/datasource/{provider_id}/delete
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-| payload | body | | Yes | [DatasourceCredentialDeletePayload](#datasourcecredentialdeletepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasourceCredentialDeletePayload](#datasourcecredentialdeletepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /auth/plugin/datasource/{provider_id}/update
-
-#### POST
-##### Parameters
+### [POST] /auth/plugin/datasource/{provider_id}/update
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-| payload | body | | Yes | [DatasourceCredentialUpdatePayload](#datasourcecredentialupdatepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasourceCredentialUpdatePayload](#datasourcecredentialupdatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /auth/plugin/datasource/{provider_id}/update-name
-
-#### POST
-##### Parameters
+### [POST] /auth/plugin/datasource/{provider_id}/update-name
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-| payload | body | | Yes | [DatasourceUpdateNamePayload](#datasourceupdatenamepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasourceUpdateNamePayload](#datasourceupdatenamepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /billing/invoices
-
-#### GET
-##### Responses
+### [GET] /billing/invoices
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /billing/partners/{partner_key}/tenants
-
-#### PUT
-##### Description
-
+### [PUT] /billing/partners/{partner_key}/tenants
Sync partner tenants bindings
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [PartnerTenantsPayload](#partnertenantspayload) |
| partner_key | path | Partner key | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [PartnerTenantsPayload](#partnertenantspayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Tenants synced to partner successfully |
| 400 | Invalid partner information |
-### /billing/subscription
-
-#### GET
-##### Responses
+### [GET] /billing/subscription
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /code-based-extension
-
-#### GET
-##### Description
-
+### [GET] /code-based-extension
Get code-based extension data by module name
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| module | query | Extension module name | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [CodeBasedExtensionResponse](#codebasedextensionresponse) |
-
-### /compliance/download
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [CodeBasedExtensionResponse](#codebasedextensionresponse)
|
+### [GET] /compliance/download
Get compliance document download link
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ComplianceDownloadQuery](#compliancedownloadquery) |
+| doc_name | query | Compliance document name | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /data-source/integrates
-
-#### GET
-##### Responses
+### [GET] /data-source/integrates
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [DataSourceIntegrateListResponse](#datasourceintegratelistresponse) |
+| 200 | Success | **application/json**: [DataSourceIntegrateListResponse](#datasourceintegratelistresponse)
|
-#### PATCH
-##### Responses
+### [PATCH] /data-source/integrates
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /data-source/integrates/{binding_id}/{action}
-
-#### GET
-##### Parameters
+### [GET] /data-source/integrates/{binding_id}/{action}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| action | path | | Yes | string |
| binding_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [DataSourceIntegrateListResponse](#datasourceintegratelistresponse) |
+| 200 | Success | **application/json**: [DataSourceIntegrateListResponse](#datasourceintegratelistresponse)
|
-#### PATCH
-##### Parameters
+### [PATCH] /data-source/integrates/{binding_id}/{action}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| action | path | | Yes | string |
| binding_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
-
-### /datasets
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [GET] /datasets
Get list of datasets
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| ids | query | Filter by dataset IDs | No | [ string ] |
| include_all | query | Include all datasets | No | boolean |
| keyword | query | Search keyword | No | string |
-| limit | query | Number of items per page | No | integer |
-| page | query | Page number | No | integer |
+| limit | query | Number of items per page | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
| tag_ids | query | Filter by tag IDs | No | [ string ] |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Datasets retrieved successfully | [DatasetListResponse](#datasetlistresponse) |
-
-#### POST
-##### Description
+| 200 | Datasets retrieved successfully | **application/json**: [DatasetListResponse](#datasetlistresponse)
|
+### [POST] /datasets
Create a new dataset
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DatasetCreatePayload](#datasetcreatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasetCreatePayload](#datasetcreatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Dataset created successfully | [DatasetDetailResponse](#datasetdetailresponse) |
+| 201 | Dataset created successfully | **application/json**: [DatasetDetailResponse](#datasetdetailresponse)
|
| 400 | Invalid request parameters | |
-### /datasets/api-base-info
-
-#### GET
-##### Description
-
+### [GET] /datasets/api-base-info
Get dataset API base information
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | API base info retrieved successfully | [ApiBaseUrlResponse](#apibaseurlresponse) |
-
-### /datasets/api-keys
-
-#### GET
-##### Description
+| 200 | API base info retrieved successfully | **application/json**: [ApiBaseUrlResponse](#apibaseurlresponse)
|
+### [GET] /datasets/api-keys
Get dataset API keys
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | API keys retrieved successfully | [ApiKeyList](#apikeylist) |
+| 200 | API keys retrieved successfully | **application/json**: [ApiKeyList](#apikeylist)
|
-#### POST
-##### Responses
+### [POST] /datasets/api-keys
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | API key created successfully | [ApiKeyItem](#apikeyitem) |
+| 200 | API key created successfully | **application/json**: [ApiKeyItem](#apikeyitem)
|
| 400 | Maximum keys exceeded | |
-### /datasets/api-keys/{api_key_id}
-
-#### DELETE
-##### Description
-
+### [DELETE] /datasets/api-keys/{api_key_id}
Delete dataset API key
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| api_key_id | path | API key ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | API key deleted successfully |
-### /datasets/batch_import_status/{job_id}
-
-#### GET
-##### Parameters
+### [GET] /datasets/batch_import_status/{job_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| job_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Batch import status | [SegmentBatchImportStatusResponse](#segmentbatchimportstatusresponse) |
+| 200 | Batch import status | **application/json**: [SegmentBatchImportStatusResponse](#segmentbatchimportstatusresponse)
|
-#### POST
-##### Parameters
+### [POST] /datasets/batch_import_status/{job_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| job_id | path | | Yes | string |
-| payload | body | | Yes | [BatchImportPayload](#batchimportpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [BatchImportPayload](#batchimportpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Batch import started | [SegmentBatchImportStatusResponse](#segmentbatchimportstatusresponse) |
-
-### /datasets/external
-
-#### POST
-##### Description
+| 200 | Batch import started | **application/json**: [SegmentBatchImportStatusResponse](#segmentbatchimportstatusresponse)
|
+### [POST] /datasets/external
Create external knowledge dataset
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ExternalDatasetCreatePayload](#externaldatasetcreatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ExternalDatasetCreatePayload](#externaldatasetcreatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | External dataset created successfully | [DatasetDetail](#datasetdetail) |
+| 201 | External dataset created successfully | **application/json**: [DatasetDetail](#datasetdetail)
|
| 400 | Invalid parameters | |
| 403 | Permission denied | |
-### /datasets/external-knowledge-api
-
-#### GET
-##### Description
-
+### [GET] /datasets/external-knowledge-api
Get external knowledge API templates
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -4715,348 +4201,306 @@ Get external knowledge API templates
| limit | query | Number of items per page (default: 20) | No | string |
| page | query | Page number (default: 1) | No | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | External API templates retrieved successfully |
-#### POST
-##### Parameters
+### [POST] /datasets/external-knowledge-api
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ExternalKnowledgeApiPayload](#externalknowledgeapipayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ExternalKnowledgeApiPayload](#externalknowledgeapipayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /datasets/external-knowledge-api/{external_knowledge_api_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /datasets/external-knowledge-api/{external_knowledge_api_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| external_knowledge_api_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | External knowledge API deleted successfully |
-#### GET
-##### Description
-
+### [GET] /datasets/external-knowledge-api/{external_knowledge_api_id}
Get external knowledge API template details
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| external_knowledge_api_id | path | External knowledge API ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | External API template retrieved successfully |
| 404 | Template not found |
-#### PATCH
-##### Parameters
+### [PATCH] /datasets/external-knowledge-api/{external_knowledge_api_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ExternalKnowledgeApiPayload](#externalknowledgeapipayload) |
| external_knowledge_api_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ExternalKnowledgeApiPayload](#externalknowledgeapipayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /datasets/external-knowledge-api/{external_knowledge_api_id}/use-check
-
-#### GET
-##### Description
-
+### [GET] /datasets/external-knowledge-api/{external_knowledge_api_id}/use-check
Check if external knowledge API is being used
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| external_knowledge_api_id | path | External knowledge API ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Usage check completed successfully | [UsageCountResponse](#usagecountresponse) |
-
-### /datasets/indexing-estimate
-
-#### POST
-##### Description
+| 200 | Usage check completed successfully | **application/json**: [UsageCountResponse](#usagecountresponse)
|
+### [POST] /datasets/indexing-estimate
Estimate dataset indexing cost
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [IndexingEstimatePayload](#indexingestimatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [IndexingEstimatePayload](#indexingestimatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Indexing estimate calculated successfully | [IndexingEstimateResponse](#indexingestimateresponse) |
-
-### /datasets/init
-
-#### POST
-##### Description
+| 200 | Indexing estimate calculated successfully | **application/json**: [IndexingEstimateResponse](#indexingestimateresponse)
|
+### [POST] /datasets/init
Initialize dataset with documents
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [KnowledgeConfig](#knowledgeconfig) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [KnowledgeConfig](#knowledgeconfig)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Dataset initialized successfully | [DatasetAndDocumentResponse](#datasetanddocumentresponse) |
+| 201 | Dataset initialized successfully | **application/json**: [DatasetAndDocumentResponse](#datasetanddocumentresponse)
|
| 400 | Invalid request parameters | |
-### /datasets/metadata/built-in
-
-#### GET
-##### Responses
+### [GET] /datasets/metadata/built-in
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Built-in fields retrieved successfully | [DatasetMetadataBuiltInFieldsResponse](#datasetmetadatabuiltinfieldsresponse) |
+| 200 | Built-in fields retrieved successfully | **application/json**: [DatasetMetadataBuiltInFieldsResponse](#datasetmetadatabuiltinfieldsresponse)
|
-### /datasets/notion-indexing-estimate
+### [POST] /datasets/notion-indexing-estimate
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [NotionEstimatePayload](#notionestimatepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [NotionEstimatePayload](#notionestimatepayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [IndexingEstimate](#indexingestimate) |
-
-### /datasets/process-rule
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [IndexingEstimate](#indexingestimate)
|
+### [GET] /datasets/process-rule
Get dataset document processing rules
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| document_id | query | Document ID (optional) | No | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Process rules retrieved successfully |
-### /datasets/retrieval-setting
-
-#### GET
-##### Description
-
+### [GET] /datasets/retrieval-setting
Get dataset retrieval settings
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Retrieval settings retrieved successfully | [RetrievalSettingResponse](#retrievalsettingresponse) |
-
-### /datasets/retrieval-setting/{vector_type}
-
-#### GET
-##### Description
+| 200 | Retrieval settings retrieved successfully | **application/json**: [RetrievalSettingResponse](#retrievalsettingresponse)
|
+### [GET] /datasets/retrieval-setting/{vector_type}
Get mock dataset retrieval settings by vector type
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| vector_type | path | Vector store type | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Mock retrieval settings retrieved successfully | [RetrievalSettingResponse](#retrievalsettingresponse) |
+| 200 | Mock retrieval settings retrieved successfully | **application/json**: [RetrievalSettingResponse](#retrievalsettingresponse)
|
-### /datasets/{dataset_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /datasets/{dataset_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Dataset deleted successfully |
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}
Get dataset details
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Dataset retrieved successfully | [DatasetDetailWithPartialMembersResponse](#datasetdetailwithpartialmembersresponse) |
+| 200 | Dataset retrieved successfully | **application/json**: [DatasetDetailWithPartialMembersResponse](#datasetdetailwithpartialmembersresponse)
|
| 403 | Permission denied | |
| 404 | Dataset not found | |
-#### PATCH
-##### Description
-
+### [PATCH] /datasets/{dataset_id}
Update dataset details
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DatasetUpdatePayload](#datasetupdatepayload) |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasetUpdatePayload](#datasetupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Dataset updated successfully | [DatasetDetailWithPartialMembersResponse](#datasetdetailwithpartialmembersresponse) |
+| 200 | Dataset updated successfully | **application/json**: [DatasetDetailWithPartialMembersResponse](#datasetdetailwithpartialmembersresponse)
|
| 403 | Permission denied | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/api-keys/{status}
-
-#### POST
-##### Parameters
+### [POST] /datasets/{dataset_id}/api-keys/{status}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| status | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
-
-### /datasets/{dataset_id}/auto-disable-logs
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [GET] /datasets/{dataset_id}/auto-disable-logs
Get dataset auto disable logs
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Auto disable logs retrieved successfully | [AutoDisableLogsResponse](#autodisablelogsresponse) |
+| 200 | Auto disable logs retrieved successfully | **application/json**: [AutoDisableLogsResponse](#autodisablelogsresponse)
|
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/batch/{batch}/indexing-estimate
-
-#### GET
-##### Parameters
+### [GET] /datasets/{dataset_id}/batch/{batch}/indexing-estimate
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| batch | path | | Yes | string |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /datasets/{dataset_id}/batch/{batch}/indexing-status
-
-#### GET
-##### Parameters
+### [GET] /datasets/{dataset_id}/batch/{batch}/indexing-status
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| batch | path | | Yes | string |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Indexing status retrieved successfully | [DocumentStatusListResponse](#documentstatuslistresponse) |
+| 200 | Indexing status retrieved successfully | **application/json**: [DocumentStatusListResponse](#documentstatuslistresponse)
|
-### /datasets/{dataset_id}/documents
-
-#### DELETE
-##### Parameters
+### [DELETE] /datasets/{dataset_id}/documents
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Documents deleted successfully |
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents
Get documents in a dataset
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -5068,134 +4512,134 @@ Get documents in a dataset
| sort | query | Sort order (default: -created_at) | No | string |
| status | query | Filter documents by display status | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Documents retrieved successfully | [DocumentWithSegmentsListResponse](#documentwithsegmentslistresponse) |
+| 200 | Documents retrieved successfully | **application/json**: [DocumentWithSegmentsListResponse](#documentwithsegmentslistresponse)
|
-#### POST
-##### Parameters
+### [POST] /datasets/{dataset_id}/documents
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [KnowledgeConfig](#knowledgeconfig) |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [KnowledgeConfig](#knowledgeconfig)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Documents created successfully | [DatasetAndDocumentResponse](#datasetanddocumentresponse) |
+| 200 | Documents created successfully | **application/json**: [DatasetAndDocumentResponse](#datasetanddocumentresponse)
|
-### /datasets/{dataset_id}/documents/download-zip
-
-#### POST
-##### Summary
-
-Stream a ZIP archive containing the requested uploaded documents
-
-##### Description
+### [POST] /datasets/{dataset_id}/documents/download-zip
+**Stream a ZIP archive containing the requested uploaded documents**
Download selected dataset documents as a single ZIP archive (upload-file only)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-| payload | body | | Yes | [DocumentBatchDownloadZipPayload](#documentbatchdownloadzippayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DocumentBatchDownloadZipPayload](#documentbatchdownloadzippayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /datasets/{dataset_id}/documents/generate-summary
-
-#### POST
-##### Summary
-
-Generate summary index for specified documents
-
-##### Description
+### [POST] /datasets/{dataset_id}/documents/generate-summary
+**Generate summary index for specified documents**
Generate summary index for documents
This endpoint checks if the dataset configuration supports summary generation
(indexing_technique must be 'high_quality' and summary_index_setting.enable must be true),
then asynchronously generates summary indexes for the provided documents.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [GenerateSummaryPayload](#generatesummarypayload) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [GenerateSummaryPayload](#generatesummarypayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Summary generation started successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Summary generation started successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 400 | Invalid request or dataset configuration | |
| 403 | Permission denied | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/documents/metadata
-
-#### POST
-##### Parameters
+### [POST] /datasets/{dataset_id}/documents/metadata
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-| payload | body | | Yes | [MetadataOperationData](#metadataoperationdata) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MetadataOperationData](#metadataoperationdata)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Documents metadata updated successfully |
-### /datasets/{dataset_id}/documents/status/{action}/batch
-
-#### PATCH
-##### Parameters
+### [PATCH] /datasets/{dataset_id}/documents/status/{action}/batch
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| action | path | | Yes | string |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /datasets/{dataset_id}/documents/{document_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Document deleted successfully |
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents/{document_id}
Get document details
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -5203,48 +4647,40 @@ Get document details
| document_id | path | Document ID | Yes | string |
| metadata | query | Metadata inclusion (all/only/without) | No | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Document retrieved successfully |
| 404 | Document not found |
-### /datasets/{dataset_id}/documents/{document_id}/download
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents/{document_id}/download
Get a signed download URL for a dataset document's original uploaded file
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Download URL generated successfully | [UrlResponse](#urlresponse) |
-
-### /datasets/{dataset_id}/documents/{document_id}/indexing-estimate
-
-#### GET
-##### Description
+| 200 | Download URL generated successfully | **application/json**: [UrlResponse](#urlresponse)
|
+### [GET] /datasets/{dataset_id}/documents/{document_id}/indexing-estimate
Estimate document indexing cost
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -5252,130 +4688,111 @@ Estimate document indexing cost
| 400 | Document already finished |
| 404 | Document not found |
-### /datasets/{dataset_id}/documents/{document_id}/indexing-status
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents/{document_id}/indexing-status
Get document indexing status
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Indexing status retrieved successfully | [DocumentStatusResponse](#documentstatusresponse) |
+| 200 | Indexing status retrieved successfully | **application/json**: [DocumentStatusResponse](#documentstatusresponse)
|
| 404 | Document not found | |
-### /datasets/{dataset_id}/documents/{document_id}/metadata
-
-#### PUT
-##### Description
-
+### [PUT] /datasets/{dataset_id}/documents/{document_id}/metadata
Update document metadata
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DocumentMetadataUpdatePayload](#documentmetadataupdatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DocumentMetadataUpdatePayload](#documentmetadataupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document metadata updated successfully | [SimpleResultMessageResponse](#simpleresultmessageresponse) |
+| 200 | Document metadata updated successfully | **application/json**: [SimpleResultMessageResponse](#simpleresultmessageresponse)
|
| 403 | Permission denied | |
| 404 | Document not found | |
-### /datasets/{dataset_id}/documents/{document_id}/notion/sync
-
-#### GET
-##### Parameters
+### [GET] /datasets/{dataset_id}/documents/{document_id}/notion/sync
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}/pipeline-execution-log
-
-#### GET
-##### Parameters
+### [GET] /datasets/{dataset_id}/documents/{document_id}/pipeline-execution-log
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /datasets/{dataset_id}/documents/{document_id}/processing/pause
+### [PATCH] /datasets/{dataset_id}/documents/{document_id}/processing/pause
+**pause document**
-#### PATCH
-##### Summary
-
-pause document
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Document paused successfully |
-### /datasets/{dataset_id}/documents/{document_id}/processing/resume
+### [PATCH] /datasets/{dataset_id}/documents/{document_id}/processing/resume
+**recover document**
-#### PATCH
-##### Summary
-
-recover document
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Document resumed successfully |
-### /datasets/{dataset_id}/documents/{document_id}/processing/{action}
-
-#### PATCH
-##### Description
-
+### [PATCH] /datasets/{dataset_id}/documents/{document_id}/processing/{action}
Update document processing status (pause/resume)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -5383,52 +4800,56 @@ Update document processing status (pause/resume)
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Processing status updated successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Processing status updated successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 400 | Invalid action | |
| 404 | Document not found | |
-### /datasets/{dataset_id}/documents/{document_id}/rename
-
-#### POST
-##### Parameters
+### [POST] /datasets/{dataset_id}/documents/{document_id}/rename
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-| payload | body | | Yes | [DocumentRenamePayload](#documentrenamepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DocumentRenamePayload](#documentrenamepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document renamed successfully | [DocumentResponse](#documentresponse) |
+| 200 | Document renamed successfully | **application/json**: [DocumentResponse](#documentresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}/segment
-
-#### POST
-##### Parameters
+### [POST] /datasets/{dataset_id}/documents/{document_id}/segment
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SegmentCreatePayload](#segmentcreatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SegmentCreatePayload](#segmentcreatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Segment created successfully | [SegmentDetailResponse](#segmentdetailresponse) |
+| 200 | Segment created successfully | **application/json**: [SegmentDetailResponse](#segmentdetailresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}/segment/{action}
-
-#### PATCH
-##### Parameters
+### [PATCH] /datasets/{dataset_id}/documents/{document_id}/segment/{action}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -5437,16 +4858,14 @@ Update document processing status (pause/resume)
| document_id | path | Document ID | Yes | string |
| segment_id | query | Segment IDs | No | [ string ] |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}/segments
-
-#### DELETE
-##### Parameters
+### [DELETE] /datasets/{dataset_id}/documents/{document_id}/segments
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -5454,67 +4873,68 @@ Update document processing status (pause/resume)
| document_id | path | Document ID | Yes | string |
| segment_id | query | Segment IDs | No | [ string ] |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Segments deleted successfully |
-#### GET
-##### Parameters
+### [GET] /datasets/{dataset_id}/documents/{document_id}/segments
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-| enabled | query | | No | string |
+| enabled | query | | No | string,
**Default:** all |
| hit_count_gte | query | | No | integer |
| keyword | query | | No | string |
-| limit | query | | No | integer |
-| page | query | | No | integer |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
| status | query | | No | [ string ] |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Segments retrieved successfully | [ConsoleSegmentListResponse](#consolesegmentlistresponse) |
+| 200 | Segments retrieved successfully | **application/json**: [ConsoleSegmentListResponse](#consolesegmentlistresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}/segments/batch_import
-
-#### GET
-##### Parameters
+### [GET] /datasets/{dataset_id}/documents/{document_id}/segments/batch_import
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Batch import status | [SegmentBatchImportStatusResponse](#segmentbatchimportstatusresponse) |
+| 200 | Batch import status | **application/json**: [SegmentBatchImportStatusResponse](#segmentbatchimportstatusresponse)
|
-#### POST
-##### Parameters
+### [POST] /datasets/{dataset_id}/documents/{document_id}/segments/batch_import
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-| payload | body | | Yes | [BatchImportPayload](#batchimportpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [BatchImportPayload](#batchimportpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Batch import started | [SegmentBatchImportStatusResponse](#segmentbatchimportstatusresponse) |
+| 200 | Batch import started | **application/json**: [SegmentBatchImportStatusResponse](#segmentbatchimportstatusresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -5522,32 +4942,35 @@ Update document processing status (pause/resume)
| document_id | path | Document ID | Yes | string |
| segment_id | path | Segment ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Segment deleted successfully |
-#### PATCH
-##### Parameters
+### [PATCH] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SegmentUpdatePayload](#segmentupdatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Segment ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SegmentUpdatePayload](#segmentupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Segment updated successfully | [SegmentDetailResponse](#segmentdetailresponse) |
+| 200 | Segment updated successfully | **application/json**: [SegmentDetailResponse](#segmentdetailresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks
-
-#### GET
-##### Parameters
+### [GET] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -5555,51 +4978,59 @@ Update document processing status (pause/resume)
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
| keyword | query | | No | string |
-| limit | query | | No | integer |
-| page | query | | No | integer |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Child chunks retrieved successfully | [ChildChunkListResponse](#childchunklistresponse) |
+| 200 | Child chunks retrieved successfully | **application/json**: [ChildChunkListResponse](#childchunklistresponse)
|
-#### PATCH
-##### Parameters
+### [PATCH] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChildChunkBatchUpdatePayload](#childchunkbatchupdatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChildChunkBatchUpdatePayload](#childchunkbatchupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Child chunks updated successfully | [ChildChunkBatchUpdateResponse](#childchunkbatchupdateresponse) |
+| 200 | Child chunks updated successfully | **application/json**: [ChildChunkBatchUpdateResponse](#childchunkbatchupdateresponse)
|
-#### POST
-##### Parameters
+### [POST] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChildChunkCreatePayload](#childchunkcreatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChildChunkCreatePayload](#childchunkcreatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Child chunk created successfully | [ChildChunkDetailResponse](#childchunkdetailresponse) |
+| 200 | Child chunk created successfully | **application/json**: [ChildChunkDetailResponse](#childchunkdetailresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -5608,37 +5039,36 @@ Update document processing status (pause/resume)
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Child chunk deleted successfully |
-#### PATCH
-##### Parameters
+### [PATCH] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChildChunkUpdatePayload](#childchunkupdatepayload) |
| child_chunk_id | path | Child chunk ID | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChildChunkUpdatePayload](#childchunkupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Child chunk updated successfully | [ChildChunkDetailResponse](#childchunkdetailresponse) |
+| 200 | Child chunk updated successfully | **application/json**: [ChildChunkDetailResponse](#childchunkdetailresponse)
|
-### /datasets/{dataset_id}/documents/{document_id}/summary-status
-
-#### GET
-##### Summary
-
-Get summary index generation status for a document
-
-##### Description
+### [GET] /datasets/{dataset_id}/documents/{document_id}/summary-status
+**Get summary index generation status for a document**
Get summary index generation status for a document
Returns:
@@ -5650,75 +5080,68 @@ Returns:
- not_started: Number of segments without summary records
- summaries: List of summary records with status and content preview
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Summary status retrieved successfully |
| 404 | Document not found |
-### /datasets/{dataset_id}/documents/{document_id}/website-sync
+### [GET] /datasets/{dataset_id}/documents/{document_id}/website-sync
+**sync website document**
-#### GET
-##### Summary
-
-sync website document
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| document_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
-
-### /datasets/{dataset_id}/error-docs
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [GET] /datasets/{dataset_id}/error-docs
Get dataset error documents
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Error documents retrieved successfully | [ErrorDocsResponse](#errordocsresponse) |
+| 200 | Error documents retrieved successfully | **application/json**: [ErrorDocsResponse](#errordocsresponse)
|
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/external-hit-testing
-
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/external-hit-testing
Test external knowledge retrieval for dataset
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ExternalHitTestingPayload](#externalhittestingpayload) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ExternalHitTestingPayload](#externalhittestingpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -5726,555 +5149,459 @@ Test external knowledge retrieval for dataset
| 400 | Invalid parameters |
| 404 | Dataset not found |
-### /datasets/{dataset_id}/hit-testing
-
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/hit-testing
Test dataset knowledge retrieval
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [HitTestingPayload](#hittestingpayload) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HitTestingPayload](#hittestingpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Hit testing completed successfully | [HitTestingResponse](#hittestingresponse) |
+| 200 | Hit testing completed successfully | **application/json**: [HitTestingResponse](#hittestingresponse)
|
| 400 | Invalid parameters | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/indexing-status
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/indexing-status
Get dataset indexing status
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Indexing status retrieved successfully | [DocumentStatusListResponse](#documentstatuslistresponse) |
+| 200 | Indexing status retrieved successfully | **application/json**: [DocumentStatusListResponse](#documentstatuslistresponse)
|
-### /datasets/{dataset_id}/metadata
-
-#### GET
-##### Parameters
+### [GET] /datasets/{dataset_id}/metadata
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Metadata retrieved successfully | [DatasetMetadataListResponse](#datasetmetadatalistresponse) |
+| 200 | Metadata retrieved successfully | **application/json**: [DatasetMetadataListResponse](#datasetmetadatalistresponse)
|
-#### POST
-##### Parameters
+### [POST] /datasets/{dataset_id}/metadata
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-| payload | body | | Yes | [MetadataArgs](#metadataargs) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MetadataArgs](#metadataargs)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Metadata created successfully | [DatasetMetadataResponse](#datasetmetadataresponse) |
+| 201 | Metadata created successfully | **application/json**: [DatasetMetadataResponse](#datasetmetadataresponse)
|
-### /datasets/{dataset_id}/metadata/built-in/{action}
-
-#### POST
-##### Parameters
+### [POST] /datasets/{dataset_id}/metadata/built-in/{action}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| action | path | | Yes | string |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Action completed successfully |
-### /datasets/{dataset_id}/metadata/{metadata_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /datasets/{dataset_id}/metadata/{metadata_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| metadata_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Metadata deleted successfully |
-#### PATCH
-##### Parameters
+### [PATCH] /datasets/{dataset_id}/metadata/{metadata_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| metadata_id | path | | Yes | string |
-| payload | body | | Yes | [MetadataUpdatePayload](#metadataupdatepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MetadataUpdatePayload](#metadataupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Metadata updated successfully | [DatasetMetadataResponse](#datasetmetadataresponse) |
+| 200 | Metadata updated successfully | **application/json**: [DatasetMetadataResponse](#datasetmetadataresponse)
|
-### /datasets/{dataset_id}/notion/sync
-
-#### GET
-##### Parameters
+### [GET] /datasets/{dataset_id}/notion/sync
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
-
-### /datasets/{dataset_id}/permission-part-users
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [GET] /datasets/{dataset_id}/permission-part-users
Get dataset permission user list
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Permission users retrieved successfully | [PartialMemberListResponse](#partialmemberlistresponse) |
+| 200 | Permission users retrieved successfully | **application/json**: [PartialMemberListResponse](#partialmemberlistresponse)
|
| 403 | Permission denied | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/queries
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/queries
Get dataset query history
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Query history retrieved successfully | [DatasetQueryListResponse](#datasetquerylistresponse) |
-
-### /datasets/{dataset_id}/related-apps
-
-#### GET
-##### Description
+| 200 | Query history retrieved successfully | **application/json**: [DatasetQueryListResponse](#datasetquerylistresponse)
|
+### [GET] /datasets/{dataset_id}/related-apps
Get applications related to dataset
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Related apps retrieved successfully | [RelatedAppListResponse](#relatedapplistresponse) |
+| 200 | Related apps retrieved successfully | **application/json**: [RelatedAppListResponse](#relatedapplistresponse)
|
-### /datasets/{dataset_id}/retry
+### [POST] /datasets/{dataset_id}/retry
+**retry document**
-#### POST
-##### Summary
-
-retry document
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-| payload | body | | Yes | [DocumentRetryPayload](#documentretrypayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DocumentRetryPayload](#documentretrypayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Documents retry started successfully |
-### /datasets/{dataset_id}/use-check
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/use-check
Check if dataset is in use
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Dataset use status retrieved successfully | [UsageCheckResponse](#usagecheckresponse) |
+| 200 | Dataset use status retrieved successfully | **application/json**: [UsageCheckResponse](#usagecheckresponse)
|
-### /datasets/{resource_id}/api-keys
+### [GET] /datasets/{resource_id}/api-keys
+**Get all API keys for a dataset**
-#### GET
-##### Summary
-
-Get all API keys for a dataset
-
-##### Description
-
-Get all API keys for a dataset
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| resource_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | API keys retrieved successfully | [ApiKeyList](#apikeylist) |
+| 200 | API keys retrieved successfully | **application/json**: [ApiKeyList](#apikeylist)
|
-#### POST
-##### Summary
+### [POST] /datasets/{resource_id}/api-keys
+**Create a new API key for a dataset**
-Create a new API key for a dataset
-
-##### Description
-
-Create a new API key for a dataset
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| resource_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | API key created successfully | [ApiKeyItem](#apikeyitem) |
+| 201 | API key created successfully | **application/json**: [ApiKeyItem](#apikeyitem)
|
| 400 | Maximum keys exceeded | |
-### /datasets/{resource_id}/api-keys/{api_key_id}
+### [DELETE] /datasets/{resource_id}/api-keys/{api_key_id}
+**Delete an API key for a dataset**
-#### DELETE
-##### Summary
-
-Delete an API key for a dataset
-
-##### Description
-
-Delete an API key for a dataset
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| api_key_id | path | API key ID | Yes | string |
| resource_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | API key deleted successfully |
-### /email-code-login
+### [POST] /email-code-login
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EmailPayload](#emailpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EmailPayload](#emailpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultDataResponse](#simpleresultdataresponse) |
+| 200 | Success | **application/json**: [SimpleResultDataResponse](#simpleresultdataresponse)
|
-### /email-code-login/validity
+### [POST] /email-code-login/validity
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EmailCodeLoginPayload](#emailcodeloginpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EmailCodeLoginPayload](#emailcodeloginpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /email-register
-
-#### POST
-##### Responses
+### [POST] /email-register
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /email-register/send-email
-
-#### POST
-##### Responses
+### [POST] /email-register/send-email
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultDataResponse](#simpleresultdataresponse) |
+| 200 | Success | **application/json**: [SimpleResultDataResponse](#simpleresultdataresponse)
|
-### /email-register/validity
-
-#### POST
-##### Responses
+### [POST] /email-register/validity
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [VerificationTokenResponse](#verificationtokenresponse) |
+| 200 | Success | **application/json**: [VerificationTokenResponse](#verificationtokenresponse)
|
-### /explore/apps
-
-#### GET
-##### Parameters
+### [GET] /explore/apps
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| language | query | Language code for recommended app localization | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [RecommendedAppListResponse](#recommendedapplistresponse) |
+| 200 | Success | **application/json**: [RecommendedAppListResponse](#recommendedapplistresponse)
|
-### /explore/apps/{app_id}
-
-#### GET
-##### Parameters
+### [GET] /explore/apps/{app_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /features
+### [GET] /features
+**Get feature configuration for current tenant**
-#### GET
-##### Summary
-
-Get feature configuration for current tenant
-
-##### Description
-
-Get feature configuration for current tenant
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [FeatureModel](#featuremodel) |
+| 200 | Success | **application/json**: [FeatureModel](#featuremodel)
|
-### /features/vector-space
+### [GET] /features/vector-space
+**Get vector-space usage and limit for current tenant**
-#### GET
-##### Summary
-
-Get vector-space usage and limit for current tenant
-
-##### Description
-
-Get vector-space usage and limit for current tenant
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [LimitationModel](#limitationmodel) |
+| 200 | Success | **application/json**: [LimitationModel](#limitationmodel)
|
-### /files/support-type
-
-#### GET
-##### Responses
+### [GET] /files/support-type
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [AllowedExtensionsResponse](#allowedextensionsresponse) |
+| 200 | Success | **application/json**: [AllowedExtensionsResponse](#allowedextensionsresponse)
|
-### /files/upload
-
-#### GET
-##### Responses
+### [GET] /files/upload
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [UploadConfig](#uploadconfig) |
+| 200 | Success | **application/json**: [UploadConfig](#uploadconfig)
|
-#### POST
-##### Responses
+### [POST] /files/upload
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | File uploaded successfully | [FileResponse](#fileresponse) |
+| 201 | File uploaded successfully | **application/json**: [FileResponse](#fileresponse)
|
-### /files/{file_id}/preview
-
-#### GET
-##### Parameters
+### [GET] /files/{file_id}/preview
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| file_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [TextContentResponse](#textcontentresponse) |
-
-### /forgot-password
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [TextContentResponse](#textcontentresponse)
|
+### [POST] /forgot-password
Send password reset email
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ForgotPasswordSendPayload](#forgotpasswordsendpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ForgotPasswordSendPayload](#forgotpasswordsendpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Email sent successfully | [ForgotPasswordEmailResponse](#forgotpasswordemailresponse) |
+| 200 | Email sent successfully | **application/json**: [ForgotPasswordEmailResponse](#forgotpasswordemailresponse)
|
| 400 | Invalid email or rate limit exceeded | |
-### /forgot-password/resets
-
-#### POST
-##### Description
-
+### [POST] /forgot-password/resets
Reset password with verification token
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ForgotPasswordResetPayload](#forgotpasswordresetpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ForgotPasswordResetPayload](#forgotpasswordresetpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Password reset successfully | [ForgotPasswordResetResponse](#forgotpasswordresetresponse) |
+| 200 | Password reset successfully | **application/json**: [ForgotPasswordResetResponse](#forgotpasswordresetresponse)
|
| 400 | Invalid token or password mismatch | |
-### /forgot-password/validity
-
-#### POST
-##### Description
-
+### [POST] /forgot-password/validity
Verify password reset code
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ForgotPasswordCheckPayload](#forgotpasswordcheckpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ForgotPasswordCheckPayload](#forgotpasswordcheckpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Code verified successfully | [ForgotPasswordCheckResponse](#forgotpasswordcheckresponse) |
+| 200 | Code verified successfully | **application/json**: [ForgotPasswordCheckResponse](#forgotpasswordcheckresponse)
|
| 400 | Invalid code or token | |
-### /form/human_input/{form_token}
-
-#### GET
-##### Summary
-
-Get human input form definition by form token
-
-##### Description
+### [GET] /form/human_input/{form_token}
+**Get human input form definition by form token**
GET /console/api/form/human_input/
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| form_token | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Summary
-
-Submit human input form by form token
-
-##### Description
+### [POST] /form/human_input/{form_token}
+**Submit human input form by form token**
POST /console/api/form/human_input/
@@ -6286,452 +5613,437 @@ Request body:
"action": "Approve"
}
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| form_token | path | | Yes | string |
-| payload | body | | Yes | [HumanInputFormSubmitPayload](#humaninputformsubmitpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HumanInputFormSubmitPayload](#humaninputformsubmitpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /info
-
-#### POST
-##### Responses
+### [POST] /info
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [TenantInfoResponse](#tenantinforesponse) |
+| 200 | Success | **application/json**: [TenantInfoResponse](#tenantinforesponse)
|
-### /installed-apps
-
-#### GET
-##### Responses
+### [GET] /installed-apps
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [InstalledAppListResponse](#installedapplistresponse) |
+| 200 | Success | **application/json**: [InstalledAppListResponse](#installedapplistresponse)
|
-#### POST
-##### Responses
+### [POST] /installed-apps
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleMessageResponse](#simplemessageresponse) |
+| 200 | Success | **application/json**: [SimpleMessageResponse](#simplemessageresponse)
|
-### /installed-apps/{installed_app_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /installed-apps/{installed_app_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | App uninstalled successfully |
-#### PATCH
-##### Parameters
+### [PATCH] /installed-apps/{installed_app_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultMessageResponse](#simpleresultmessageresponse) |
+| 200 | Success | **application/json**: [SimpleResultMessageResponse](#simpleresultmessageresponse)
|
-### /installed-apps/{installed_app_id}/audio-to-text
-
-#### POST
-##### Parameters
+### [POST] /installed-apps/{installed_app_id}/audio-to-text
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /installed-apps/{installed_app_id}/chat-messages
-
-#### POST
-##### Parameters
+### [POST] /installed-apps/{installed_app_id}/chat-messages
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
-| payload | body | | Yes | [ChatMessagePayload](#chatmessagepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChatMessagePayload](#chatmessagepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /installed-apps/{installed_app_id}/chat-messages/{task_id}/stop
-
-#### POST
-##### Parameters
+### [POST] /installed-apps/{installed_app_id}/chat-messages/{task_id}/stop
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /installed-apps/{installed_app_id}/completion-messages
-
-#### POST
-##### Parameters
+### [POST] /installed-apps/{installed_app_id}/completion-messages
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
-| payload | body | | Yes | [CompletionMessageExplorePayload](#completionmessageexplorepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CompletionMessageExplorePayload](#completionmessageexplorepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /installed-apps/{installed_app_id}/completion-messages/{task_id}/stop
-
-#### POST
-##### Parameters
+### [POST] /installed-apps/{installed_app_id}/completion-messages/{task_id}/stop
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /installed-apps/{installed_app_id}/conversations
-
-#### GET
-##### Parameters
+### [GET] /installed-apps/{installed_app_id}/conversations
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| last_id | query | | No | |
+| limit | query | | No | integer,
**Default:** 20 |
+| pinned | query | | No | |
| installed_app_id | path | | Yes | string |
-| payload | body | | Yes | [ConversationListQuery](#conversationlistquery) |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /installed-apps/{installed_app_id}/conversations/{c_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /installed-apps/{installed_app_id}/conversations/{c_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| c_id | path | | Yes | string |
| installed_app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Conversation deleted successfully |
-### /installed-apps/{installed_app_id}/conversations/{c_id}/name
-
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| c_id | path | | Yes | string |
-| installed_app_id | path | | Yes | string |
-| payload | body | | Yes | [ConversationRenamePayload](#conversationrenamepayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /installed-apps/{installed_app_id}/conversations/{c_id}/pin
-
-#### PATCH
-##### Parameters
+### [POST] /installed-apps/{installed_app_id}/conversations/{c_id}/name
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| c_id | path | | Yes | string |
| installed_app_id | path | | Yes | string |
-##### Responses
+#### Request Body
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 200 | Success | [ResultResponse](#resultresponse) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ConversationRenamePayload](#conversationrenamepayload)
|
-### /installed-apps/{installed_app_id}/conversations/{c_id}/unpin
+#### Responses
-#### PATCH
-##### Parameters
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [PATCH] /installed-apps/{installed_app_id}/conversations/{c_id}/pin
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| c_id | path | | Yes | string |
| installed_app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [ResultResponse](#resultresponse) |
+| 200 | Success | **application/json**: [ResultResponse](#resultresponse)
|
-### /installed-apps/{installed_app_id}/messages
-
-#### GET
-##### Parameters
+### [PATCH] /installed-apps/{installed_app_id}/conversations/{c_id}/unpin
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| c_id | path | | Yes | string |
| installed_app_id | path | | Yes | string |
-| payload | body | | Yes | [MessageListQuery](#messagelistquery) |
-##### Responses
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 200 | Success | **application/json**: [ResultResponse](#resultresponse)
|
+
+### [GET] /installed-apps/{installed_app_id}/messages
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| conversation_id | query | Conversation UUID | Yes | string |
+| first_id | query | First message ID for pagination | No | |
+| limit | query | Number of messages to return (1-100) | No | integer,
**Default:** 20 |
+| installed_app_id | path | | Yes | string |
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /installed-apps/{installed_app_id}/messages/{message_id}/feedbacks
-
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| installed_app_id | path | | Yes | string |
-| message_id | path | | Yes | string |
-| payload | body | | Yes | [MessageFeedbackPayload](#messagefeedbackpayload) |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 200 | Feedback submitted successfully | [ResultResponse](#resultresponse) |
-
-### /installed-apps/{installed_app_id}/messages/{message_id}/more-like-this
-
-#### GET
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| installed_app_id | path | | Yes | string |
-| message_id | path | | Yes | string |
-| payload | body | | Yes | [MoreLikeThisQuery](#morelikethisquery) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /installed-apps/{installed_app_id}/messages/{message_id}/suggested-questions
-
-#### GET
-##### Parameters
+### [POST] /installed-apps/{installed_app_id}/messages/{message_id}/feedbacks
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
| message_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MessageFeedbackPayload](#messagefeedbackpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SuggestedQuestionsResponse](#suggestedquestionsresponse) |
+| 200 | Feedback submitted successfully | **application/json**: [ResultResponse](#resultresponse)
|
-### /installed-apps/{installed_app_id}/meta
-
-#### GET
-##### Summary
-
-Get app meta
-
-##### Parameters
+### [GET] /installed-apps/{installed_app_id}/messages/{message_id}/more-like-this
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| response_mode | query | | Yes | string,
**Available values:** "blocking", "streaming" |
| installed_app_id | path | | Yes | string |
+| message_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /installed-apps/{installed_app_id}/parameters
-
-#### GET
-##### Summary
-
-Retrieve app parameters
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| installed_app_id | path | | Yes | string |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /installed-apps/{installed_app_id}/saved-messages
-
-#### GET
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| installed_app_id | path | | Yes | string |
-| payload | body | | Yes | [SavedMessageListQuery](#savedmessagelistquery) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| installed_app_id | path | | Yes | string |
-| payload | body | | Yes | [SavedMessageCreatePayload](#savedmessagecreatepayload) |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 200 | Success | [ResultResponse](#resultresponse) |
-
-### /installed-apps/{installed_app_id}/saved-messages/{message_id}
-
-#### DELETE
-##### Parameters
+### [GET] /installed-apps/{installed_app_id}/messages/{message_id}/suggested-questions
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
| message_id | path | | Yes | string |
-##### Responses
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 200 | Success | **application/json**: [SuggestedQuestionsResponse](#suggestedquestionsresponse)
|
+
+### [GET] /installed-apps/{installed_app_id}/meta
+**Get app meta**
+
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| installed_app_id | path | | Yes | string |
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /installed-apps/{installed_app_id}/parameters
+**Retrieve app parameters**
+
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| installed_app_id | path | | Yes | string |
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /installed-apps/{installed_app_id}/saved-messages
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| last_id | query | | No | |
+| limit | query | | No | integer,
**Default:** 20 |
+| installed_app_id | path | | Yes | string |
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [POST] /installed-apps/{installed_app_id}/saved-messages
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| installed_app_id | path | | Yes | string |
+
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SavedMessageCreatePayload](#savedmessagecreatepayload)
|
+
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 200 | Success | **application/json**: [ResultResponse](#resultresponse)
|
+
+### [DELETE] /installed-apps/{installed_app_id}/saved-messages/{message_id}
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| installed_app_id | path | | Yes | string |
+| message_id | path | | Yes | string |
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Saved message deleted successfully |
-### /installed-apps/{installed_app_id}/text-to-audio
-
-#### POST
-##### Parameters
+### [POST] /installed-apps/{installed_app_id}/text-to-audio
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
-| payload | body | | Yes | [TextToAudioPayload](#texttoaudiopayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TextToAudioPayload](#texttoaudiopayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /installed-apps/{installed_app_id}/workflows/run
+### [POST] /installed-apps/{installed_app_id}/workflows/run
+**Run workflow**
-#### POST
-##### Summary
-
-Run workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
-| payload | body | | Yes | [WorkflowRunPayload](#workflowrunpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowRunPayload](#workflowrunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /installed-apps/{installed_app_id}/workflows/tasks/{task_id}/stop
+### [POST] /installed-apps/{installed_app_id}/workflows/tasks/{task_id}/stop
+**Stop workflow task**
-#### POST
-##### Summary
-
-Stop workflow task
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| installed_app_id | path | | Yes | string |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
-
-### /instruction-generate
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [POST] /instruction-generate
Generate instruction for workflow nodes or general use
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [InstructionGeneratePayload](#instructiongeneratepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [InstructionGeneratePayload](#instructiongeneratepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -6739,132 +6051,104 @@ Generate instruction for workflow nodes or general use
| 400 | Invalid request parameters or flow/workflow not found |
| 402 | Provider quota exceeded |
-### /instruction-generate/template
-
-#### POST
-##### Description
-
+### [POST] /instruction-generate/template
Get instruction generation template
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [InstructionTemplatePayload](#instructiontemplatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [InstructionTemplatePayload](#instructiontemplatepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Template retrieved successfully |
| 400 | Invalid request parameters |
-### /login
+### [POST] /login
+**Authenticate user and login**
-#### POST
-##### Summary
+#### Request Body
-Authenticate user and login
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [LoginPayload](#loginpayload)
|
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [LoginPayload](#loginpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultOptionalDataResponse](#simpleresultoptionaldataresponse) |
+| 200 | Success | **application/json**: [SimpleResultOptionalDataResponse](#simpleresultoptionaldataresponse)
|
-### /logout
-
-#### POST
-##### Responses
+### [POST] /logout
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /mcp/oauth/callback
-
-#### GET
-##### Responses
+### [GET] /mcp/oauth/callback
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /notification
-
-#### GET
-##### Description
-
+### [GET] /notification
Return the active in-product notification for the current user in their interface language (falls back to English if unavailable). The notification is NOT marked as seen here; call POST /notification/dismiss when the user explicitly closes the modal.
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success — inspect should_show to decide whether to render the modal |
| 401 | Unauthorized |
-### /notification/dismiss
-
-#### POST
-##### Description
-
+### [POST] /notification/dismiss
Mark a notification as dismissed for the current user.
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 401 | Unauthorized | |
-### /notion/pages/{page_id}/{page_type}/preview
-
-#### GET
-##### Parameters
+### [GET] /notion/pages/{page_id}/{page_type}/preview
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| credential_id | query | Credential ID | Yes | string |
| page_id | path | | Yes | string |
| page_type | path | | Yes | string |
-| credential_id | query | Credential ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [TextContentResponse](#textcontentresponse) |
+| 200 | Success | **application/json**: [TextContentResponse](#textcontentresponse)
|
-### /notion/pre-import/pages
-
-#### GET
-##### Parameters
+### [GET] /notion/pre-import/pages
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| credential_id | query | Credential ID | Yes | string |
| dataset_id | query | Dataset ID | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [NotionIntegrateInfoListResponse](#notionintegrateinfolistresponse) |
-
-### /oauth/authorize/{provider}
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [NotionIntegrateInfoListResponse](#notionintegrateinfolistresponse)
|
+### [GET] /oauth/authorize/{provider}
Handle OAuth callback and complete login process
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -6872,42 +6156,34 @@ Handle OAuth callback and complete login process
| code | query | Authorization code from OAuth provider | No | string |
| state | query | Optional state parameter (used for invite token) | No | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 302 | Redirect to console with access token |
| 400 | OAuth process failed |
-### /oauth/data-source/binding/{provider}
-
-#### GET
-##### Description
-
+### [GET] /oauth/data-source/binding/{provider}
Bind OAuth data source with authorization code
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | Data source provider name (notion) | Yes | string |
| code | query | Authorization code from OAuth provider | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Data source binding success | [OAuthDataSourceBindingResponse](#oauthdatasourcebindingresponse) |
+| 200 | Data source binding success | **application/json**: [OAuthDataSourceBindingResponse](#oauthdatasourcebindingresponse)
|
| 400 | Invalid provider or code | |
-### /oauth/data-source/callback/{provider}
-
-#### GET
-##### Description
-
+### [GET] /oauth/data-source/callback/{provider}
Handle OAuth callback from data source provider
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -6915,1173 +6191,1045 @@ Handle OAuth callback from data source provider
| code | query | Authorization code from OAuth provider | No | string |
| error | query | Error message from OAuth provider | No | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 302 | Redirect to console with result |
| 400 | Invalid provider |
-### /oauth/data-source/{provider}
-
-#### GET
-##### Description
-
+### [GET] /oauth/data-source/{provider}
Get OAuth authorization URL for data source provider
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | Data source provider name (notion) | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Authorization URL or internal setup success | [OAuthDataSourceResponse](#oauthdatasourceresponse) |
+| 200 | Authorization URL or internal setup success | **application/json**: [OAuthDataSourceResponse](#oauthdatasourceresponse)
|
| 400 | Invalid provider | |
| 403 | Admin privileges required | |
-### /oauth/data-source/{provider}/{binding_id}/sync
-
-#### GET
-##### Description
-
+### [GET] /oauth/data-source/{provider}/{binding_id}/sync
Sync data from OAuth data source
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| binding_id | path | Data source binding ID | Yes | string |
| provider | path | Data source provider name (notion) | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Data source sync success | [OAuthDataSourceSyncResponse](#oauthdatasourcesyncresponse) |
+| 200 | Data source sync success | **application/json**: [OAuthDataSourceSyncResponse](#oauthdatasourcesyncresponse)
|
| 400 | Invalid provider or sync failed | |
-### /oauth/login/{provider}
-
-#### GET
-##### Description
-
+### [GET] /oauth/login/{provider}
Initiate OAuth login process
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | OAuth provider name (github/google) | Yes | string |
| invite_token | query | Optional invitation token | No | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 302 | Redirect to OAuth authorization URL |
| 400 | Invalid provider |
-### /oauth/plugin/{provider_id}/datasource/callback
-
-#### GET
-##### Parameters
+### [GET] /oauth/plugin/{provider_id}/datasource/callback
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /oauth/plugin/{provider_id}/datasource/get-authorization-url
-
-#### GET
-##### Parameters
+### [GET] /oauth/plugin/{provider_id}/datasource/get-authorization-url
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /oauth/plugin/{provider}/tool/authorization-url
-
-#### GET
-##### Parameters
+### [GET] /oauth/plugin/{provider}/tool/authorization-url
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /oauth/plugin/{provider}/tool/callback
-
-#### GET
-##### Parameters
+### [GET] /oauth/plugin/{provider}/tool/callback
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /oauth/plugin/{provider}/trigger/callback
+### [GET] /oauth/plugin/{provider}/trigger/callback
+**Handle OAuth callback for trigger provider**
-#### GET
-##### Summary
-
-Handle OAuth callback for trigger provider
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /oauth/provider
-
-#### POST
-##### Responses
+### [POST] /oauth/provider
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /oauth/provider/account
-
-#### POST
-##### Responses
+### [POST] /oauth/provider/account
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /oauth/provider/authorize
-
-#### POST
-##### Responses
+### [POST] /oauth/provider/authorize
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /oauth/provider/token
-
-#### POST
-##### Responses
+### [POST] /oauth/provider/token
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipeline/customized/templates/{template_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /rag/pipeline/customized/templates/{template_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| template_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Pipeline template deleted |
-#### PATCH
-##### Parameters
+### [PATCH] /rag/pipeline/customized/templates/{template_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| template_id | path | | Yes | string |
-| payload | body | | Yes | [CustomizedPipelineTemplatePayload](#customizedpipelinetemplatepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CustomizedPipelineTemplatePayload](#customizedpipelinetemplatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Pipeline template updated |
-#### POST
-##### Parameters
+### [POST] /rag/pipeline/customized/templates/{template_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| template_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleDataResponse](#simpledataresponse) |
+| 200 | Success | **application/json**: [SimpleDataResponse](#simpledataresponse)
|
-### /rag/pipeline/dataset
+### [POST] /rag/pipeline/dataset
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [RagPipelineDatasetImportPayload](#ragpipelinedatasetimportpayload)
|
+
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 201 | RAG pipeline dataset import started | **application/json**: [RagPipelineImportResponse](#ragpipelineimportresponse)
|
+
+### [POST] /rag/pipeline/empty-dataset
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 201 | RAG pipeline dataset created | **application/json**: [DatasetDetailResponse](#datasetdetailresponse)
|
+
+### [GET] /rag/pipeline/templates
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [RagPipelineDatasetImportPayload](#ragpipelinedatasetimportpayload) |
+| language | query | Template language | No | string,
**Default:** en-US |
+| type | query | Template source: built-in or customized | No | string,
**Default:** built-in |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | RAG pipeline dataset import started | [RagPipelineImportResponse](#ragpipelineimportresponse) |
+| 200 | Pipeline templates | **application/json**: [PipelineTemplateListResponse](#pipelinetemplatelistresponse)
|
-### /rag/pipeline/empty-dataset
-
-#### POST
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 201 | RAG pipeline dataset created | [DatasetDetailResponse](#datasetdetailresponse) |
-
-### /rag/pipeline/templates
-
-#### GET
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| language | query | Template language | No | string |
-| type | query | Template source: built-in or customized | No | string |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 200 | Pipeline templates | [PipelineTemplateListResponse](#pipelinetemplatelistresponse) |
-
-### /rag/pipeline/templates/{template_id}
-
-#### GET
-##### Parameters
+### [GET] /rag/pipeline/templates/{template_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| type | query | Template source: built-in or customized | No | string,
**Default:** built-in |
| template_id | path | | Yes | string |
-| type | query | Template source: built-in or customized | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Pipeline template | [PipelineTemplateDetailResponse](#pipelinetemplatedetailresponse) |
+| 200 | Pipeline template | **application/json**: [PipelineTemplateDetailResponse](#pipelinetemplatedetailresponse)
|
-### /rag/pipelines/datasource-plugins
-
-#### GET
-##### Responses
+### [GET] /rag/pipelines/datasource-plugins
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/imports
+### [POST] /rag/pipelines/imports
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [RagPipelineImportPayload](#ragpipelineimportpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [RagPipelineImportPayload](#ragpipelineimportpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Import completed | [RagPipelineImportResponse](#ragpipelineimportresponse) |
-| 202 | Import pending confirmation | [RagPipelineImportResponse](#ragpipelineimportresponse) |
-| 400 | Import failed | [RagPipelineImportResponse](#ragpipelineimportresponse) |
+| 200 | Import completed | **application/json**: [RagPipelineImportResponse](#ragpipelineimportresponse)
|
+| 202 | Import pending confirmation | **application/json**: [RagPipelineImportResponse](#ragpipelineimportresponse)
|
+| 400 | Import failed | **application/json**: [RagPipelineImportResponse](#ragpipelineimportresponse)
|
-### /rag/pipelines/imports/{import_id}/confirm
-
-#### POST
-##### Parameters
+### [POST] /rag/pipelines/imports/{import_id}/confirm
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| import_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Import confirmed | [RagPipelineImportResponse](#ragpipelineimportresponse) |
-| 400 | Import failed | [RagPipelineImportResponse](#ragpipelineimportresponse) |
+| 200 | Import confirmed | **application/json**: [RagPipelineImportResponse](#ragpipelineimportresponse)
|
+| 400 | Import failed | **application/json**: [RagPipelineImportResponse](#ragpipelineimportresponse)
|
-### /rag/pipelines/imports/{pipeline_id}/check-dependencies
-
-#### GET
-##### Parameters
+### [GET] /rag/pipelines/imports/{pipeline_id}/check-dependencies
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Dependencies checked | [RagPipelineImportCheckDependenciesResponse](#ragpipelineimportcheckdependenciesresponse) |
+| 200 | Dependencies checked | **application/json**: [RagPipelineImportCheckDependenciesResponse](#ragpipelineimportcheckdependenciesresponse)
|
-### /rag/pipelines/recommended-plugins
-
-#### GET
-##### Responses
+### [GET] /rag/pipelines/recommended-plugins
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/transform/datasets/{dataset_id}
-
-#### POST
-##### Parameters
+### [POST] /rag/pipelines/transform/datasets/{dataset_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/customized/publish
-
-#### POST
-##### Parameters
+### [POST] /rag/pipelines/{pipeline_id}/customized/publish
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [CustomizedPipelineTemplatePayload](#customizedpipelinetemplatepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CustomizedPipelineTemplatePayload](#customizedpipelinetemplatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Pipeline template published |
-### /rag/pipelines/{pipeline_id}/exports
-
-#### GET
-##### Parameters
+### [GET] /rag/pipelines/{pipeline_id}/exports
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| include_secret | query | Whether to include secret values in the exported DSL | No | string,
**Default:** false |
| pipeline_id | path | | Yes | string |
-| include_secret | query | Whether to include secret values in the exported DSL | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Pipeline exported | [SimpleDataResponse](#simpledataresponse) |
+| 200 | Pipeline exported | **application/json**: [SimpleDataResponse](#simpledataresponse)
|
-### /rag/pipelines/{pipeline_id}/workflow-runs
+### [GET] /rag/pipelines/{pipeline_id}/workflow-runs
+**Get workflow run list**
-#### GET
-##### Summary
-
-Get workflow run list
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow runs retrieved successfully | [WorkflowRunPaginationResponse](#workflowrunpaginationresponse) |
+| 200 | Workflow runs retrieved successfully | **application/json**: [WorkflowRunPaginationResponse](#workflowrunpaginationresponse)
|
-### /rag/pipelines/{pipeline_id}/workflow-runs/tasks/{task_id}/stop
+### [POST] /rag/pipelines/{pipeline_id}/workflow-runs/tasks/{task_id}/stop
+**Stop workflow task**
-#### POST
-##### Summary
-
-Stop workflow task
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Task stopped successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Task stopped successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /rag/pipelines/{pipeline_id}/workflow-runs/{run_id}
+### [GET] /rag/pipelines/{pipeline_id}/workflow-runs/{run_id}
+**Get workflow run detail**
-#### GET
-##### Summary
-
-Get workflow run detail
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
| run_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run detail retrieved successfully | [WorkflowRunDetailResponse](#workflowrundetailresponse) |
+| 200 | Workflow run detail retrieved successfully | **application/json**: [WorkflowRunDetailResponse](#workflowrundetailresponse)
|
-### /rag/pipelines/{pipeline_id}/workflow-runs/{run_id}/node-executions
+### [GET] /rag/pipelines/{pipeline_id}/workflow-runs/{run_id}/node-executions
+**Get workflow run node execution list**
-#### GET
-##### Summary
-
-Get workflow run node execution list
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
| run_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node executions retrieved successfully | [WorkflowRunNodeExecutionListResponse](#workflowrunnodeexecutionlistresponse) |
+| 200 | Node executions retrieved successfully | **application/json**: [WorkflowRunNodeExecutionListResponse](#workflowrunnodeexecutionlistresponse)
|
-### /rag/pipelines/{pipeline_id}/workflows
+### [GET] /rag/pipelines/{pipeline_id}/workflows
+**Get published workflows**
-#### GET
-##### Summary
-
-Get published workflows
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Published workflows retrieved successfully | [WorkflowPaginationResponse](#workflowpaginationresponse) |
+| 200 | Published workflows retrieved successfully | **application/json**: [WorkflowPaginationResponse](#workflowpaginationresponse)
|
| 403 | Permission denied | |
-### /rag/pipelines/{pipeline_id}/workflows/default-workflow-block-configs
+### [GET] /rag/pipelines/{pipeline_id}/workflows/default-workflow-block-configs
+**Get default block config**
-#### GET
-##### Summary
-
-Get default block config
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/default-workflow-block-configs/{block_type}
+### [GET] /rag/pipelines/{pipeline_id}/workflows/default-workflow-block-configs/{block_type}
+**Get default block config**
-#### GET
-##### Summary
-
-Get default block config
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| block_type | path | | Yes | string |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/draft
+### [GET] /rag/pipelines/{pipeline_id}/workflows/draft
+**Get draft rag pipeline's workflow**
-#### GET
-##### Summary
-
-Get draft rag pipeline's workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Draft workflow retrieved successfully | [WorkflowResponse](#workflowresponse) |
+| 200 | Draft workflow retrieved successfully | **application/json**: [WorkflowResponse](#workflowresponse)
|
| 404 | Draft workflow not found | |
-#### POST
-##### Summary
+### [POST] /rag/pipelines/{pipeline_id}/workflows/draft
+**Sync draft workflow**
-Sync draft workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [RagPipelineWorkflowSyncResponse](#ragpipelineworkflowsyncresponse) |
+| 200 | Success | **application/json**: [RagPipelineWorkflowSyncResponse](#ragpipelineworkflowsyncresponse)
|
-### /rag/pipelines/{pipeline_id}/workflows/draft/datasource/nodes/{node_id}/run
+### [POST] /rag/pipelines/{pipeline_id}/workflows/draft/datasource/nodes/{node_id}/run
+**Run rag pipeline datasource**
-#### POST
-##### Summary
-
-Run rag pipeline datasource
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | | Yes | string |
| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [DatasourceNodeRunPayload](#datasourcenoderunpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasourceNodeRunPayload](#datasourcenoderunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/draft/datasource/variables-inspect
+### [POST] /rag/pipelines/{pipeline_id}/workflows/draft/datasource/variables-inspect
+**Set datasource variables**
-#### POST
-##### Summary
-
-Set datasource variables
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [DatasourceVariablesPayload](#datasourcevariablespayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasourceVariablesPayload](#datasourcevariablespayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Datasource variables set successfully | [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse) |
+| 200 | Datasource variables set successfully | **application/json**: [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse)
|
-### /rag/pipelines/{pipeline_id}/workflows/draft/environment-variables
+### [GET] /rag/pipelines/{pipeline_id}/workflows/draft/environment-variables
+**Get draft workflow**
-#### GET
-##### Summary
-
-Get draft workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/draft/iteration/nodes/{node_id}/run
+### [POST] /rag/pipelines/{pipeline_id}/workflows/draft/iteration/nodes/{node_id}/run
+**Run draft workflow iteration node**
-#### POST
-##### Summary
-
-Run draft workflow iteration node
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| node_id | path | | Yes | string |
-| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [NodeRunPayload](#noderunpayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /rag/pipelines/{pipeline_id}/workflows/draft/loop/nodes/{node_id}/run
-
-#### POST
-##### Summary
-
-Run draft workflow loop node
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| node_id | path | | Yes | string |
-| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [NodeRunPayload](#noderunpayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/last-run
-
-#### GET
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | | Yes | string |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [NodeRunPayload](#noderunpayload)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [POST] /rag/pipelines/{pipeline_id}/workflows/draft/loop/nodes/{node_id}/run
+**Run draft workflow loop node**
+
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| node_id | path | | Yes | string |
+| pipeline_id | path | | Yes | string |
+
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [NodeRunPayload](#noderunpayload)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/last-run
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| node_id | path | | Yes | string |
+| pipeline_id | path | | Yes | string |
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node last run retrieved successfully | [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse) |
+| 200 | Node last run retrieved successfully | **application/json**: [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse)
|
-### /rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/run
+### [POST] /rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/run
+**Run draft workflow node**
-#### POST
-##### Summary
-
-Run draft workflow node
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | | Yes | string |
| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [NodeRunRequiredPayload](#noderunrequiredpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [NodeRunRequiredPayload](#noderunrequiredpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node run started successfully | [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse) |
+| 200 | Node run started successfully | **application/json**: [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse)
|
-### /rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/variables
-
-#### DELETE
-##### Parameters
+### [DELETE] /rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/variables
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | | Yes | string |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### GET
-##### Parameters
+### [GET] /rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/variables
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | | Yes | string |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/draft/pre-processing/parameters
+### [GET] /rag/pipelines/{pipeline_id}/workflows/draft/pre-processing/parameters
+**Get first step parameters of rag pipeline**
-#### GET
-##### Summary
-
-Get first step parameters of rag pipeline
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/draft/processing/parameters
+### [GET] /rag/pipelines/{pipeline_id}/workflows/draft/processing/parameters
+**Get second step parameters of rag pipeline**
-#### GET
-##### Summary
-
-Get second step parameters of rag pipeline
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/draft/run
+### [POST] /rag/pipelines/{pipeline_id}/workflows/draft/run
+**Run draft workflow**
-#### POST
-##### Summary
-
-Run draft workflow
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [DraftWorkflowRunPayload](#draftworkflowrunpayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /rag/pipelines/{pipeline_id}/workflows/draft/system-variables
-
-#### GET
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DraftWorkflowRunPayload](#draftworkflowrunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/draft/variables
-
-#### DELETE
-##### Parameters
+### [GET] /rag/pipelines/{pipeline_id}/workflows/draft/system-variables
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### GET
-##### Summary
-
-Get draft workflow
-
-##### Parameters
+### [DELETE] /rag/pipelines/{pipeline_id}/workflows/draft/variables
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}
+### [GET] /rag/pipelines/{pipeline_id}/workflows/draft/variables
+**Get draft workflow**
-#### DELETE
-##### Parameters
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| pipeline_id | path | | Yes | string |
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [DELETE] /rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
| variable_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### GET
-##### Parameters
+### [GET] /rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
| variable_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### PATCH
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| pipeline_id | path | | Yes | string |
-| variable_id | path | | Yes | string |
-| payload | body | | Yes | [WorkflowDraftVariablePatchPayload](#workflowdraftvariablepatchpayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}/reset
-
-#### PUT
-##### Parameters
+### [PATCH] /rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
| variable_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowDraftVariablePatchPayload](#workflowdraftvariablepatchpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/publish
+### [PUT] /rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}/reset
+#### Parameters
-#### GET
-##### Summary
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| pipeline_id | path | | Yes | string |
+| variable_id | path | | Yes | string |
-Get published pipeline
+#### Responses
-##### Parameters
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /rag/pipelines/{pipeline_id}/workflows/publish
+**Get published pipeline**
+
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Published workflow retrieved successfully, or null if not exist | [WorkflowResponse](#workflowresponse) |
+| 200 | Published workflow retrieved successfully, or null if not exist | **application/json**: [WorkflowResponse](#workflowresponse)
|
-#### POST
-##### Summary
+### [POST] /rag/pipelines/{pipeline_id}/workflows/publish
+**Publish workflow**
-Publish workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [RagPipelineWorkflowPublishResponse](#ragpipelineworkflowpublishresponse) |
+| 200 | Success | **application/json**: [RagPipelineWorkflowPublishResponse](#ragpipelineworkflowpublishresponse)
|
-### /rag/pipelines/{pipeline_id}/workflows/published/datasource/nodes/{node_id}/preview
+### [POST] /rag/pipelines/{pipeline_id}/workflows/published/datasource/nodes/{node_id}/preview
+**Run datasource content preview**
-#### POST
-##### Summary
-
-Run datasource content preview
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | | Yes | string |
| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [Parser](#parser) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [Parser](#parser)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/published/datasource/nodes/{node_id}/run
+### [POST] /rag/pipelines/{pipeline_id}/workflows/published/datasource/nodes/{node_id}/run
+**Run rag pipeline datasource**
-#### POST
-##### Summary
-
-Run rag pipeline datasource
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | | Yes | string |
| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [DatasourceNodeRunPayload](#datasourcenoderunpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasourceNodeRunPayload](#datasourcenoderunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/published/pre-processing/parameters
+### [GET] /rag/pipelines/{pipeline_id}/workflows/published/pre-processing/parameters
+**Get first step parameters of rag pipeline**
-#### GET
-##### Summary
-
-Get first step parameters of rag pipeline
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/published/processing/parameters
+### [GET] /rag/pipelines/{pipeline_id}/workflows/published/processing/parameters
+**Get second step parameters of rag pipeline**
-#### GET
-##### Summary
-
-Get second step parameters of rag pipeline
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/published/run
+### [POST] /rag/pipelines/{pipeline_id}/workflows/published/run
+**Run published workflow**
-#### POST
-##### Summary
-
-Run published workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
-| payload | body | | Yes | [PublishedWorkflowRunPayload](#publishedworkflowrunpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [PublishedWorkflowRunPayload](#publishedworkflowrunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /rag/pipelines/{pipeline_id}/workflows/{workflow_id}
+### [DELETE] /rag/pipelines/{pipeline_id}/workflows/{workflow_id}
+**Delete a published workflow version that is not currently active on the pipeline**
-#### DELETE
-##### Summary
-
-Delete a published workflow version that is not currently active on the pipeline
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
| workflow_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Workflow deleted successfully |
-#### PATCH
-##### Summary
+### [PATCH] /rag/pipelines/{pipeline_id}/workflows/{workflow_id}
+**Update workflow attributes**
-Update workflow attributes
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
| workflow_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow updated successfully | [WorkflowResponse](#workflowresponse) |
+| 200 | Workflow updated successfully | **application/json**: [WorkflowResponse](#workflowresponse)
|
| 400 | No valid fields to update | |
| 403 | Permission denied | |
| 404 | Workflow not found | |
-### /rag/pipelines/{pipeline_id}/workflows/{workflow_id}/restore
-
-#### POST
-##### Parameters
+### [POST] /rag/pipelines/{pipeline_id}/workflows/{workflow_id}/restore
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| pipeline_id | path | | Yes | string |
| workflow_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [RagPipelineWorkflowSyncResponse](#ragpipelineworkflowsyncresponse) |
+| 200 | Success | **application/json**: [RagPipelineWorkflowSyncResponse](#ragpipelineworkflowsyncresponse)
|
-### /refresh-token
-
-#### POST
-##### Responses
+### [POST] /refresh-token
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /remote-files/upload
+### [POST] /remote-files/upload
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [RemoteFileUploadPayload](#remotefileuploadpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [RemoteFileUploadPayload](#remotefileuploadpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | File uploaded successfully | [FileWithSignedUrl](#filewithsignedurl) |
+| 201 | File uploaded successfully | **application/json**: [FileWithSignedUrl](#filewithsignedurl)
|
-### /remote-files/{url}
-
-#### GET
-##### Parameters
+### [GET] /remote-files/{url}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| url | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [RemoteFileInfo](#remotefileinfo) |
+| 200 | Success | **application/json**: [RemoteFileInfo](#remotefileinfo)
|
-### /reset-password
+### [POST] /reset-password
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EmailPayload](#emailpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EmailPayload](#emailpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultDataResponse](#simpleresultdataresponse) |
-
-### /rule-code-generate
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [SimpleResultDataResponse](#simpleresultdataresponse)
|
+### [POST] /rule-code-generate
Generate code rules using LLM
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [RuleCodeGeneratePayload](#rulecodegeneratepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [RuleCodeGeneratePayload](#rulecodegeneratepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -8089,20 +7237,16 @@ Generate code rules using LLM
| 400 | Invalid request parameters |
| 402 | Provider quota exceeded |
-### /rule-generate
-
-#### POST
-##### Description
-
+### [POST] /rule-generate
Generate rule configuration using LLM
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [RuleGeneratePayload](#rulegeneratepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [RuleGeneratePayload](#rulegeneratepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -8110,20 +7254,16 @@ Generate rule configuration using LLM
| 400 | Invalid request parameters |
| 402 | Provider quota exceeded |
-### /rule-structured-output-generate
-
-#### POST
-##### Description
-
+### [POST] /rule-structured-output-generate
Generate structured output rules using LLM
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [RuleStructuredOutputPayload](#rulestructuredoutputpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [RuleStructuredOutputPayload](#rulestructuredoutputpayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -8131,603 +7271,522 @@ Generate structured output rules using LLM
| 400 | Invalid request parameters |
| 402 | Provider quota exceeded |
-### /snippets/{snippet_id}/workflow-runs
+### [GET] /snippets/{snippet_id}/workflow-runs
+**List workflow runs for snippet**
-#### GET
-##### Summary
-
-List workflow runs for snippet
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow runs retrieved successfully | [WorkflowRunPaginationResponse](#workflowrunpaginationresponse) |
+| 200 | Workflow runs retrieved successfully | **application/json**: [WorkflowRunPaginationResponse](#workflowrunpaginationresponse)
|
-### /snippets/{snippet_id}/workflow-runs/tasks/{task_id}/stop
-
-#### POST
-##### Summary
-
-Stop a running snippet workflow task
-
-##### Description
+### [POST] /snippets/{snippet_id}/workflow-runs/tasks/{task_id}/stop
+**Stop a running snippet workflow task**
Uses both the legacy stop flag mechanism and the graph engine
command channel for backward compatibility.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Task stopped successfully |
| 404 | Snippet not found |
-### /snippets/{snippet_id}/workflow-runs/{run_id}
+### [GET] /snippets/{snippet_id}/workflow-runs/{run_id}
+**Get workflow run detail for snippet**
-#### GET
-##### Summary
-
-Get workflow run detail for snippet
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| run_id | path | | Yes | string |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run detail retrieved successfully | [WorkflowRunDetailResponse](#workflowrundetailresponse) |
+| 200 | Workflow run detail retrieved successfully | **application/json**: [WorkflowRunDetailResponse](#workflowrundetailresponse)
|
| 404 | Workflow run not found | |
-### /snippets/{snippet_id}/workflow-runs/{run_id}/node-executions
+### [GET] /snippets/{snippet_id}/workflow-runs/{run_id}/node-executions
+**List node executions for a workflow run**
-#### GET
-##### Summary
-
-List node executions for a workflow run
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| run_id | path | | Yes | string |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node executions retrieved successfully | [WorkflowRunNodeExecutionListResponse](#workflowrunnodeexecutionlistresponse) |
+| 200 | Node executions retrieved successfully | **application/json**: [WorkflowRunNodeExecutionListResponse](#workflowrunnodeexecutionlistresponse)
|
-### /snippets/{snippet_id}/workflows
-
-#### GET
-##### Summary
-
-Get all published workflow versions for snippet
-
-##### Description
+### [GET] /snippets/{snippet_id}/workflows
+**Get all published workflow versions for snippet**
Get all published workflows for a snippet
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SnippetWorkflowListQuery](#snippetworkflowlistquery) |
| snippet_id | path | Snippet ID | Yes | string |
+| limit | query | | No | integer,
**Default:** 10 |
+| page | query | | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Published workflows retrieved successfully | [WorkflowPaginationResponse](#workflowpaginationresponse) |
+| 200 | Published workflows retrieved successfully | **application/json**: [WorkflowPaginationResponse](#workflowpaginationresponse)
|
-### /snippets/{snippet_id}/workflows/default-workflow-block-configs
+### [GET] /snippets/{snippet_id}/workflows/default-workflow-block-configs
+**Get default block configurations for snippet workflow**
-#### GET
-##### Summary
-
-Get default block configurations for snippet workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Default block configs retrieved successfully |
-### /snippets/{snippet_id}/workflows/draft
+### [GET] /snippets/{snippet_id}/workflows/draft
+**Get draft workflow for snippet**
-#### GET
-##### Summary
-
-Get draft workflow for snippet
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Draft workflow retrieved successfully | [SnippetWorkflowResponse](#snippetworkflowresponse) |
+| 200 | Draft workflow retrieved successfully | **application/json**: [SnippetWorkflowResponse](#snippetworkflowresponse)
|
| 404 | Snippet or draft workflow not found | |
-#### POST
-##### Summary
+### [POST] /snippets/{snippet_id}/workflows/draft
+**Sync draft workflow for snippet**
-Sync draft workflow for snippet
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-| payload | body | | Yes | [SnippetDraftSyncPayload](#snippetdraftsyncpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SnippetDraftSyncPayload](#snippetdraftsyncpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Draft workflow synced successfully |
| 400 | Hash mismatch |
-### /snippets/{snippet_id}/workflows/draft/config
+### [GET] /snippets/{snippet_id}/workflows/draft/config
+**Get snippet draft workflow configuration limits**
-#### GET
-##### Summary
-
-Get snippet draft workflow configuration limits
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Draft config retrieved successfully |
-### /snippets/{snippet_id}/workflows/draft/conversation-variables
-
-#### GET
-##### Description
-
+### [GET] /snippets/{snippet_id}/workflows/draft/conversation-variables
Conversation variables are not used in snippet workflows; returns an empty list for API parity
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Conversation variables retrieved successfully | [WorkflowDraftVariableList](#workflowdraftvariablelist) |
-
-### /snippets/{snippet_id}/workflows/draft/environment-variables
-
-#### GET
-##### Description
+| 200 | Conversation variables retrieved successfully | **application/json**: [WorkflowDraftVariableList](#workflowdraftvariablelist)
|
+### [GET] /snippets/{snippet_id}/workflows/draft/environment-variables
Get environment variables from snippet draft workflow graph
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Environment variables retrieved successfully |
| 404 | Draft workflow not found |
-### /snippets/{snippet_id}/workflows/draft/iteration/nodes/{node_id}/run
-
-#### POST
-##### Summary
-
-Run a draft workflow iteration node for snippet
-
-##### Description
+### [POST] /snippets/{snippet_id}/workflows/draft/iteration/nodes/{node_id}/run
+**Run a draft workflow iteration node for snippet**
Run draft workflow iteration node for snippet
Iteration nodes execute their internal sub-graph multiple times over an input list.
Returns an SSE event stream with iteration progress and results.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SnippetIterationNodeRunPayload](#snippetiterationnoderunpayload) |
| node_id | path | Node ID | Yes | string |
| snippet_id | path | Snippet ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SnippetIterationNodeRunPayload](#snippetiterationnoderunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Iteration node run started successfully (SSE stream) |
| 404 | Snippet or draft workflow not found |
-### /snippets/{snippet_id}/workflows/draft/loop/nodes/{node_id}/run
-
-#### POST
-##### Summary
-
-Run a draft workflow loop node for snippet
-
-##### Description
+### [POST] /snippets/{snippet_id}/workflows/draft/loop/nodes/{node_id}/run
+**Run a draft workflow loop node for snippet**
Run draft workflow loop node for snippet
Loop nodes execute their internal sub-graph repeatedly until a condition is met.
Returns an SSE event stream with loop progress and results.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SnippetLoopNodeRunPayload](#snippetloopnoderunpayload) |
| node_id | path | Node ID | Yes | string |
| snippet_id | path | Snippet ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SnippetLoopNodeRunPayload](#snippetloopnoderunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Loop node run started successfully (SSE stream) |
| 404 | Snippet or draft workflow not found |
-### /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/last-run
-
-#### GET
-##### Summary
-
-Get the last run result for a specific node in snippet draft workflow
-
-##### Description
+### [GET] /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/last-run
+**Get the last run result for a specific node in snippet draft workflow**
Get last run result for a node in snippet draft workflow
Returns the most recent execution record for the given node,
including status, inputs, outputs, and timing information.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | Node ID | Yes | string |
| snippet_id | path | Snippet ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node last run retrieved successfully | [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse) |
+| 200 | Node last run retrieved successfully | **application/json**: [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse)
|
| 404 | Snippet, draft workflow, or node last run not found | |
-### /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/run
-
-#### POST
-##### Summary
-
-Run a single node in snippet draft workflow
-
-##### Description
+### [POST] /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/run
+**Run a single node in snippet draft workflow**
Run a single node in snippet draft workflow (single-step debugging)
Executes a specific node with provided inputs for single-step debugging.
Returns the node execution result including status, outputs, and timing.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SnippetDraftNodeRunPayload](#snippetdraftnoderunpayload) |
| node_id | path | Node ID | Yes | string |
| snippet_id | path | Snippet ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SnippetDraftNodeRunPayload](#snippetdraftnoderunpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node run completed successfully | [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse) |
+| 200 | Node run completed successfully | **application/json**: [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse)
|
| 404 | Snippet or draft workflow not found | |
-### /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/variables
-
-#### DELETE
-##### Description
-
+### [DELETE] /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/variables
Delete all variables for a specific node (snippet draft workflow)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | | Yes | string |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Node variables deleted successfully |
-#### GET
-##### Description
-
+### [GET] /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/variables
Get variables for a specific node (snippet draft workflow)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| node_id | path | | Yes | string |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Node variables retrieved successfully | [WorkflowDraftVariableList](#workflowdraftvariablelist) |
+| 200 | Node variables retrieved successfully | **application/json**: [WorkflowDraftVariableList](#workflowdraftvariablelist)
|
-### /snippets/{snippet_id}/workflows/draft/run
-
-#### POST
-##### Summary
-
-Run draft workflow for snippet
-
-##### Description
+### [POST] /snippets/{snippet_id}/workflows/draft/run
+**Run draft workflow for snippet**
Executes the snippet's draft workflow with the provided inputs
and returns an SSE event stream with execution progress and results.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-| payload | body | | Yes | [SnippetDraftRunPayload](#snippetdraftrunpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SnippetDraftRunPayload](#snippetdraftrunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Draft workflow run started successfully (SSE stream) |
| 404 | Snippet or draft workflow not found |
-### /snippets/{snippet_id}/workflows/draft/system-variables
-
-#### GET
-##### Description
-
+### [GET] /snippets/{snippet_id}/workflows/draft/system-variables
System variables are not used in snippet workflows; returns an empty list for API parity
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | System variables retrieved successfully | [WorkflowDraftVariableList](#workflowdraftvariablelist) |
-
-### /snippets/{snippet_id}/workflows/draft/variables
-
-#### DELETE
-##### Description
+| 200 | System variables retrieved successfully | **application/json**: [WorkflowDraftVariableList](#workflowdraftvariablelist)
|
+### [DELETE] /snippets/{snippet_id}/workflows/draft/variables
Delete all draft workflow variables for the current user (snippet scope)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Workflow variables deleted successfully |
-#### GET
-##### Description
-
+### [GET] /snippets/{snippet_id}/workflows/draft/variables
List draft workflow variables without values (paginated, snippet scope)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| limit | query | Items per page | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
| snippet_id | path | | Yes | string |
-| payload | body | | Yes | [WorkflowDraftVariableListQuery](#workflowdraftvariablelistquery) |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow variables retrieved successfully | [WorkflowDraftVariableListWithoutValue](#workflowdraftvariablelistwithoutvalue) |
-
-### /snippets/{snippet_id}/workflows/draft/variables/{variable_id}
-
-#### DELETE
-##### Description
+| 200 | Workflow variables retrieved successfully | **application/json**: [WorkflowDraftVariableListWithoutValue](#workflowdraftvariablelistwithoutvalue)
|
+### [DELETE] /snippets/{snippet_id}/workflows/draft/variables/{variable_id}
Delete a draft workflow variable (snippet scope)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
| variable_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Variable deleted successfully |
| 404 | Variable not found |
-#### GET
-##### Description
-
+### [GET] /snippets/{snippet_id}/workflows/draft/variables/{variable_id}
Get a specific draft workflow variable (snippet scope)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
| variable_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Variable retrieved successfully | [WorkflowDraftVariable](#workflowdraftvariable) |
+| 200 | Variable retrieved successfully | **application/json**: [WorkflowDraftVariable](#workflowdraftvariable)
|
| 404 | Variable not found | |
-#### PATCH
-##### Description
-
+### [PATCH] /snippets/{snippet_id}/workflows/draft/variables/{variable_id}
Update a draft workflow variable (snippet scope)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
| variable_id | path | | Yes | string |
-| payload | body | | Yes | [WorkflowDraftVariableUpdatePayload](#workflowdraftvariableupdatepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowDraftVariableUpdatePayload](#workflowdraftvariableupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Variable updated successfully | [WorkflowDraftVariable](#workflowdraftvariable) |
+| 200 | Variable updated successfully | **application/json**: [WorkflowDraftVariable](#workflowdraftvariable)
|
| 404 | Variable not found | |
-### /snippets/{snippet_id}/workflows/draft/variables/{variable_id}/reset
-
-#### PUT
-##### Description
-
+### [PUT] /snippets/{snippet_id}/workflows/draft/variables/{variable_id}/reset
Reset a draft workflow variable to its default value (snippet scope)
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
| variable_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Variable reset successfully | [WorkflowDraftVariable](#workflowdraftvariable) |
+| 200 | Variable reset successfully | **application/json**: [WorkflowDraftVariable](#workflowdraftvariable)
|
| 204 | Variable reset (no content) | |
| 404 | Variable not found | |
-### /snippets/{snippet_id}/workflows/publish
+### [GET] /snippets/{snippet_id}/workflows/publish
+**Get published workflow for snippet**
-#### GET
-##### Summary
-
-Get published workflow for snippet
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Published workflow retrieved successfully | [SnippetWorkflowResponse](#snippetworkflowresponse) |
+| 200 | Published workflow retrieved successfully | **application/json**: [SnippetWorkflowResponse](#snippetworkflowresponse)
|
| 404 | Snippet not found | |
-#### POST
-##### Summary
+### [POST] /snippets/{snippet_id}/workflows/publish
+**Publish snippet workflow**
-Publish snippet workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-| payload | body | | Yes | [PublishWorkflowPayload](#publishworkflowpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [PublishWorkflowPayload](#publishworkflowpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Workflow published successfully |
| 400 | No draft workflow found |
-### /snippets/{snippet_id}/workflows/{workflow_id}/restore
+### [POST] /snippets/{snippet_id}/workflows/{workflow_id}/restore
+**Restore a published snippet workflow version into the draft workflow**
-#### POST
-##### Summary
-
-Restore a published snippet workflow version into the draft workflow
-
-##### Description
-
-Restore a published snippet workflow version into the draft workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | Snippet ID | Yes | string |
| workflow_id | path | Published workflow ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -8735,31 +7794,19 @@ Restore a published snippet workflow version into the draft workflow
| 400 | Source workflow must be published |
| 404 | Workflow not found |
-### /spec/schema-definitions
-
-#### GET
-##### Summary
-
-Get system JSON Schema definitions specification
-
-##### Description
+### [GET] /spec/schema-definitions
+**Get system JSON Schema definitions specification**
Used for frontend component type mapping
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /system-features
-
-#### GET
-##### Summary
-
-Get system-wide feature configuration
-
-##### Description
+### [GET] /system-features
+**Get system-wide feature configuration**
Get system-wide feature configuration
NOTE: This endpoint is unauthenticated by design, as it provides system features
@@ -8769,390 +7816,348 @@ Authentication would create circular dependency (can't login without dashboard l
Only non-sensitive configuration data should be returned by this endpoint.
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SystemFeatureModel](#systemfeaturemodel) |
+| 200 | Success | **application/json**: [SystemFeatureModel](#systemfeaturemodel)
|
-### /tag-bindings
+### [POST] /tag-bindings
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TagBindingPayload](#tagbindingpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TagBindingPayload](#tagbindingpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
-
-### /tag-bindings/remove
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [POST] /tag-bindings/remove
Remove one or more tag bindings from a target.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TagBindingRemovePayload](#tagbindingremovepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TagBindingRemovePayload](#tagbindingremovepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /tags
-
-#### GET
-##### Parameters
+### [GET] /tags
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| keyword | query | Search keyword for tag name. | No | string |
| type | query | Tag type filter. Can be "knowledge", "app", or "snippet". | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [ [TagResponse](#tagresponse) ] |
+| 200 | Success | **application/json**: [ [TagResponse](#tagresponse) ]
|
-#### POST
-##### Parameters
+### [POST] /tags
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TagBasePayload](#tagbasepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TagBasePayload](#tagbasepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [TagResponse](#tagresponse) |
+| 200 | Success | **application/json**: [TagResponse](#tagresponse)
|
-### /tags/{tag_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /tags/{tag_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| tag_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Tag deleted successfully |
-#### PATCH
-##### Parameters
+### [PATCH] /tags/{tag_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| tag_id | path | | Yes | string |
-| payload | body | | Yes | [TagUpdateRequestPayload](#tagupdaterequestpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TagUpdateRequestPayload](#tagupdaterequestpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [TagResponse](#tagresponse) |
-
-### /test/retrieval
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [TagResponse](#tagresponse)
|
+### [POST] /test/retrieval
Bedrock retrieval test (internal use only)
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [BedrockRetrievalPayload](#bedrockretrievalpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [BedrockRetrievalPayload](#bedrockretrievalpayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Bedrock retrieval test completed |
-### /trial-apps/{app_id}
+### [GET] /trial-apps/{app_id}
+**Get app detail**
-#### GET
-##### Summary
-
-Get app detail
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /trial-apps/{app_id}/audio-to-text
-
-#### POST
-##### Parameters
+### [POST] /trial-apps/{app_id}/audio-to-text
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /trial-apps/{app_id}/chat-messages
-
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| app_id | path | | Yes | string |
-| payload | body | | Yes | [ChatRequest](#chatrequest) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /trial-apps/{app_id}/completion-messages
-
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| app_id | path | | Yes | string |
-| payload | body | | Yes | [CompletionRequest](#completionrequest) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /trial-apps/{app_id}/datasets
-
-#### GET
-##### Parameters
+### [POST] /trial-apps/{app_id}/chat-messages
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChatRequest](#chatrequest)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /trial-apps/{app_id}/messages/{message_id}/suggested-questions
+### [POST] /trial-apps/{app_id}/completion-messages
+#### Parameters
-#### GET
-##### Parameters
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| app_id | path | | Yes | string |
+
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CompletionRequest](#completionrequest)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /trial-apps/{app_id}/datasets
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| app_id | path | | Yes | string |
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /trial-apps/{app_id}/messages/{message_id}/suggested-questions
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| message_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /trial-apps/{app_id}/parameters
+### [GET] /trial-apps/{app_id}/parameters
+**Retrieve app parameters**
-#### GET
-##### Summary
-
-Retrieve app parameters
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /trial-apps/{app_id}/site
-
-#### GET
-##### Summary
-
-Retrieve app site info
-
-##### Description
+### [GET] /trial-apps/{app_id}/site
+**Retrieve app site info**
Returns the site configuration for the application including theme, icons, and text.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /trial-apps/{app_id}/text-to-audio
-
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| app_id | path | | Yes | string |
-| payload | body | | Yes | [TextToSpeechRequest](#texttospeechrequest) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /trial-apps/{app_id}/workflows
-
-#### GET
-##### Summary
-
-Get workflow detail
-
-##### Parameters
+### [POST] /trial-apps/{app_id}/text-to-audio
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TextToSpeechRequest](#texttospeechrequest)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /trial-apps/{app_id}/workflows/run
+### [GET] /trial-apps/{app_id}/workflows
+**Get workflow detail**
-#### POST
-##### Summary
-
-Run workflow
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-| payload | body | | Yes | [WorkflowRunRequest](#workflowrunrequest) |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /trial-apps/{app_id}/workflows/tasks/{task_id}/stop
+### [POST] /trial-apps/{app_id}/workflows/run
+**Run workflow**
-#### POST
-##### Summary
+#### Parameters
-Stop workflow task
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| app_id | path | | Yes | string |
-##### Parameters
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowRunRequest](#workflowrunrequest)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [POST] /trial-apps/{app_id}/workflows/tasks/{task_id}/stop
+**Stop workflow task**
+
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /trial-models
-
-#### GET
-##### Summary
-
-Get hosted trial model provider configuration for model-provider pages
-
-##### Description
+### [GET] /trial-models
+**Get hosted trial model provider configuration for model-provider pages**
Get hosted trial model provider configuration
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [TrialModelsResponse](#trialmodelsresponse) |
-
-### /website/crawl
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [TrialModelsResponse](#trialmodelsresponse)
|
+### [POST] /website/crawl
Crawl website content
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WebsiteCrawlPayload](#websitecrawlpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WebsiteCrawlPayload](#websitecrawlpayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Website crawl initiated successfully |
| 400 | Invalid crawl parameters |
-### /website/crawl/status/{job_id}
-
-#### GET
-##### Description
-
+### [GET] /website/crawl/status/{job_id}
Get website crawl status
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WebsiteCrawlStatusQuery](#websitecrawlstatusquery) |
| job_id | path | Crawl job ID | Yes | string |
| provider | query | Crawl provider (firecrawl/watercrawl/jinareader) | No | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -9160,20 +8165,16 @@ Get website crawl status
| 400 | Invalid provider |
| 404 | Crawl job not found |
-### /workflow-generate
-
-#### POST
-##### Description
-
+### [POST] /workflow-generate
Generate a Dify workflow graph from natural language
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowGeneratePayload](#workflowgeneratepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowGeneratePayload](#workflowgeneratepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -9181,163 +8182,130 @@ Generate a Dify workflow graph from natural language
| 400 | Invalid request parameters |
| 402 | Provider quota exceeded |
-### /workflow/{workflow_run_id}/events
-
-#### GET
-##### Summary
-
-Get workflow execution events stream after resume
-
-##### Description
+### [GET] /workflow/{workflow_run_id}/events
+**Get workflow execution events stream after resume**
GET /console/api/workflow//events
Returns Server-Sent Events stream.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| workflow_run_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workflow/{workflow_run_id}/pause-details
-
-#### GET
-##### Summary
-
-Get workflow pause details
-
-##### Description
+### [GET] /workflow/{workflow_run_id}/pause-details
+**Get workflow pause details**
Get workflow pause details
GET /console/api/workflow//pause-details
Returns information about why and where the workflow is paused.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| workflow_run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow pause details retrieved successfully | [WorkflowPauseDetailsResponse](#workflowpausedetailsresponse) |
+| 200 | Workflow pause details retrieved successfully | **application/json**: [WorkflowPauseDetailsResponse](#workflowpausedetailsresponse)
|
| 404 | Workflow run not found | |
-### /workspaces
-
-#### GET
-##### Responses
+### [GET] /workspaces
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current
-
-#### POST
-##### Responses
+### [POST] /workspaces/current
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [TenantInfoResponse](#tenantinforesponse) |
-
-### /workspaces/current/agent-provider/{provider_name}
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [TenantInfoResponse](#tenantinforesponse)
|
+### [GET] /workspaces/current/agent-provider/{provider_name}
Get specific agent provider details
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_name | path | Agent provider name | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | object |
-
-### /workspaces/current/agent-providers
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: object
|
+### [GET] /workspaces/current/agent-providers
Get list of available agent providers
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [ object ] |
+| 200 | Success | **application/json**: [ object ]
|
-### /workspaces/current/customized-snippets
+### [GET] /workspaces/current/customized-snippets
+**List customized snippets with pagination and search**
-#### GET
-##### Summary
-
-List customized snippets with pagination and search
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SnippetListQuery](#snippetlistquery) |
+| creators | query | Filter by creator account IDs | No | |
+| is_published | query | Filter by published status | No | |
+| keyword | query | | No | |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
+| tag_ids | query | Filter by tag IDs | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Snippets retrieved successfully | [SnippetPagination](#snippetpagination) |
+| 200 | Snippets retrieved successfully | **application/json**: [SnippetPagination](#snippetpagination)
|
-#### POST
-##### Summary
+### [POST] /workspaces/current/customized-snippets
+**Create a new customized snippet**
-Create a new customized snippet
+#### Request Body
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CreateSnippetPayload](#createsnippetpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [CreateSnippetPayload](#createsnippetpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Snippet created successfully | [Snippet](#snippet) |
+| 201 | Snippet created successfully | **application/json**: [Snippet](#snippet)
|
| 400 | Invalid request | |
-### /workspaces/current/customized-snippets/imports
+### [POST] /workspaces/current/customized-snippets/imports
+**Import snippet from DSL**
-#### POST
-##### Summary
+#### Request Body
-Import snippet from DSL
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SnippetImportPayload](#snippetimportpayload)
|
-##### Description
-
-Import snippet from DSL
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SnippetImportPayload](#snippetimportpayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -9345,2196 +8313,2049 @@ Import snippet from DSL
| 202 | Import pending confirmation |
| 400 | Import failed |
-### /workspaces/current/customized-snippets/imports/{import_id}/confirm
+### [POST] /workspaces/current/customized-snippets/imports/{import_id}/confirm
+**Confirm a pending snippet import**
-#### POST
-##### Summary
-
-Confirm a pending snippet import
-
-##### Description
-
-Confirm a pending snippet import
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| import_id | path | Import ID to confirm | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Import confirmed successfully |
| 400 | Import failed |
-### /workspaces/current/customized-snippets/{snippet_id}
+### [DELETE] /workspaces/current/customized-snippets/{snippet_id}
+**Delete customized snippet**
-#### DELETE
-##### Summary
-
-Delete customized snippet
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Snippet deleted successfully |
| 404 | Snippet not found |
-#### GET
-##### Summary
+### [GET] /workspaces/current/customized-snippets/{snippet_id}
+**Get customized snippet details**
-Get customized snippet details
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Snippet retrieved successfully | [Snippet](#snippet) |
+| 200 | Snippet retrieved successfully | **application/json**: [Snippet](#snippet)
|
| 404 | Snippet not found | |
-#### PATCH
-##### Summary
+### [PATCH] /workspaces/current/customized-snippets/{snippet_id}
+**Update customized snippet**
-Update customized snippet
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | | Yes | string |
-| payload | body | | Yes | [UpdateSnippetPayload](#updatesnippetpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [UpdateSnippetPayload](#updatesnippetpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Snippet updated successfully | [Snippet](#snippet) |
+| 200 | Snippet updated successfully | **application/json**: [Snippet](#snippet)
|
| 400 | Invalid request | |
| 404 | Snippet not found | |
-### /workspaces/current/customized-snippets/{snippet_id}/check-dependencies
+### [GET] /workspaces/current/customized-snippets/{snippet_id}/check-dependencies
+**Check dependencies for a snippet**
-#### GET
-##### Summary
-
-Check dependencies for a snippet
-
-##### Description
-
-Check dependencies for a snippet
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | Snippet ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Dependencies checked successfully |
| 404 | Snippet not found |
-### /workspaces/current/customized-snippets/{snippet_id}/export
-
-#### GET
-##### Summary
-
-Export snippet as DSL
-
-##### Description
+### [GET] /workspaces/current/customized-snippets/{snippet_id}/export
+**Export snippet as DSL**
Export snippet configuration as DSL
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | Snippet ID to export | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Snippet exported successfully |
| 404 | Snippet not found |
-### /workspaces/current/customized-snippets/{snippet_id}/use-count/increment
-
-#### POST
-##### Summary
-
-Increment snippet use count when it is inserted into a workflow
-
-##### Description
+### [POST] /workspaces/current/customized-snippets/{snippet_id}/use-count/increment
+**Increment snippet use count when it is inserted into a workflow**
Increment snippet use count by 1
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| snippet_id | path | Snippet ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Use count incremented successfully |
| 404 | Snippet not found |
-### /workspaces/current/dataset-operators
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/dataset-operators
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [AccountWithRoleList](#accountwithrolelist) |
+| 200 | Success | **application/json**: [AccountWithRoleList](#accountwithrolelist)
|
-### /workspaces/current/default-model
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/default-model
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserGetDefault](#parsergetdefault) |
+| model_type | query | | Yes | [ModelType](#modeltype) |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Parameters
+### [POST] /workspaces/current/default-model
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserPostDefault](#parserpostdefault) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserPostDefault](#parserpostdefault)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
-
-### /workspaces/current/endpoints
-
-#### POST
-##### Description
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [POST] /workspaces/current/endpoints
Create a new plugin endpoint
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EndpointCreatePayload](#endpointcreatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EndpointCreatePayload](#endpointcreatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Endpoint created successfully | [EndpointCreateResponse](#endpointcreateresponse) |
+| 200 | Endpoint created successfully | **application/json**: [EndpointCreateResponse](#endpointcreateresponse)
|
| 403 | Admin privileges required | |
-### /workspaces/current/endpoints/create
+### ~~[POST] /workspaces/current/endpoints/create~~
-#### POST
***DEPRECATED***
-##### Description
Deprecated legacy alias for creating a plugin endpoint. Use POST /workspaces/current/endpoints instead.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EndpointCreatePayload](#endpointcreatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EndpointCreatePayload](#endpointcreatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Endpoint created successfully | [EndpointCreateResponse](#endpointcreateresponse) |
+| 200 | Endpoint created successfully | **application/json**: [EndpointCreateResponse](#endpointcreateresponse)
|
| 403 | Admin privileges required | |
-### /workspaces/current/endpoints/delete
+### ~~[POST] /workspaces/current/endpoints/delete~~
-#### POST
***DEPRECATED***
-##### Description
Deprecated legacy alias for deleting a plugin endpoint. Use DELETE /workspaces/current/endpoints/{id} instead.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EndpointIdPayload](#endpointidpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EndpointIdPayload](#endpointidpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Endpoint deleted successfully | [EndpointDeleteResponse](#endpointdeleteresponse) |
+| 200 | Endpoint deleted successfully | **application/json**: [EndpointDeleteResponse](#endpointdeleteresponse)
|
| 403 | Admin privileges required | |
-### /workspaces/current/endpoints/disable
-
-#### POST
-##### Description
-
+### [POST] /workspaces/current/endpoints/disable
Disable a plugin endpoint
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EndpointIdPayload](#endpointidpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EndpointIdPayload](#endpointidpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Endpoint disabled successfully | [EndpointDisableResponse](#endpointdisableresponse) |
+| 200 | Endpoint disabled successfully | **application/json**: [EndpointDisableResponse](#endpointdisableresponse)
|
| 403 | Admin privileges required | |
-### /workspaces/current/endpoints/enable
-
-#### POST
-##### Description
-
+### [POST] /workspaces/current/endpoints/enable
Enable a plugin endpoint
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EndpointIdPayload](#endpointidpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EndpointIdPayload](#endpointidpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Endpoint enabled successfully | [EndpointEnableResponse](#endpointenableresponse) |
+| 200 | Endpoint enabled successfully | **application/json**: [EndpointEnableResponse](#endpointenableresponse)
|
| 403 | Admin privileges required | |
-### /workspaces/current/endpoints/list
-
-#### GET
-##### Description
-
+### [GET] /workspaces/current/endpoints/list
List plugin endpoints with pagination
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EndpointListQuery](#endpointlistquery) |
+| page | query | | Yes | integer |
+| page_size | query | | Yes | integer |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [EndpointListResponse](#endpointlistresponse) |
-
-### /workspaces/current/endpoints/list/plugin
-
-#### GET
-##### Description
+| 200 | Success | **application/json**: [EndpointListResponse](#endpointlistresponse)
|
+### [GET] /workspaces/current/endpoints/list/plugin
List endpoints for a specific plugin
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EndpointListForPluginQuery](#endpointlistforpluginquery) |
+| page | query | | Yes | integer |
+| page_size | query | | Yes | integer |
+| plugin_id | query | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [PluginEndpointListResponse](#pluginendpointlistresponse) |
+| 200 | Success | **application/json**: [PluginEndpointListResponse](#pluginendpointlistresponse)
|
-### /workspaces/current/endpoints/update
+### ~~[POST] /workspaces/current/endpoints/update~~
-#### POST
***DEPRECATED***
-##### Description
Deprecated legacy alias for updating a plugin endpoint. Use PATCH /workspaces/current/endpoints/{id} instead.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [LegacyEndpointUpdatePayload](#legacyendpointupdatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [LegacyEndpointUpdatePayload](#legacyendpointupdatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Endpoint updated successfully | [EndpointUpdateResponse](#endpointupdateresponse) |
+| 200 | Endpoint updated successfully | **application/json**: [EndpointUpdateResponse](#endpointupdateresponse)
|
| 403 | Admin privileges required | |
-### /workspaces/current/endpoints/{id}
-
-#### DELETE
-##### Description
-
+### [DELETE] /workspaces/current/endpoints/{id}
Delete a plugin endpoint
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| id | path | Endpoint ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Endpoint deleted successfully | [EndpointDeleteResponse](#endpointdeleteresponse) |
+| 200 | Endpoint deleted successfully | **application/json**: [EndpointDeleteResponse](#endpointdeleteresponse)
|
| 403 | Admin privileges required | |
-#### PATCH
-##### Description
-
+### [PATCH] /workspaces/current/endpoints/{id}
Update a plugin endpoint
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EndpointUpdatePayload](#endpointupdatepayload) |
| id | path | Endpoint ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EndpointUpdatePayload](#endpointupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Endpoint updated successfully | [EndpointUpdateResponse](#endpointupdateresponse) |
+| 200 | Endpoint updated successfully | **application/json**: [EndpointUpdateResponse](#endpointupdateresponse)
|
| 403 | Admin privileges required | |
-### /workspaces/current/members
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/members
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [AccountWithRoleList](#accountwithrolelist) |
+| 200 | Success | **application/json**: [AccountWithRoleList](#accountwithrolelist)
|
-### /workspaces/current/members/invite-email
+### [POST] /workspaces/current/members/invite-email
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MemberInvitePayload](#memberinvitepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MemberInvitePayload](#memberinvitepayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/members/owner-transfer-check
+### [POST] /workspaces/current/members/owner-transfer-check
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [OwnerTransferCheckPayload](#ownertransfercheckpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [OwnerTransferCheckPayload](#ownertransfercheckpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [VerificationTokenResponse](#verificationtokenresponse) |
+| 200 | Success | **application/json**: [VerificationTokenResponse](#verificationtokenresponse)
|
-### /workspaces/current/members/send-owner-transfer-confirm-email
+### [POST] /workspaces/current/members/send-owner-transfer-confirm-email
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [OwnerTransferEmailPayload](#ownertransferemailpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [OwnerTransferEmailPayload](#ownertransferemailpayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultDataResponse](#simpleresultdataresponse) |
+| 200 | Success | **application/json**: [SimpleResultDataResponse](#simpleresultdataresponse)
|
-### /workspaces/current/members/{member_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /workspaces/current/members/{member_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| member_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/members/{member_id}/owner-transfer
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/members/{member_id}/owner-transfer
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| member_id | path | | Yes | string |
-| payload | body | | Yes | [OwnerTransferPayload](#ownertransferpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [OwnerTransferPayload](#ownertransferpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/members/{member_id}/update-role
-
-#### PUT
-##### Parameters
+### [PUT] /workspaces/current/members/{member_id}/update-role
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| member_id | path | | Yes | string |
-| payload | body | | Yes | [MemberRoleUpdatePayload](#memberroleupdatepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MemberRoleUpdatePayload](#memberroleupdatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/model-providers
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserModelList](#parsermodellist) |
+| model_type | query | | No | |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/checkout-url
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/model-providers/{provider}/checkout-url
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/credentials
-
-#### DELETE
-##### Parameters
+### [DELETE] /workspaces/current/model-providers/{provider}/credentials
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserCredentialDelete](#parsercredentialdelete) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserCredentialDelete](#parsercredentialdelete)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Credential deleted successfully |
-#### GET
-##### Parameters
+### [GET] /workspaces/current/model-providers/{provider}/credentials
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| credential_id | query | | No | |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserCredentialId](#parsercredentialid) |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/credentials
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserCredentialCreate](#parsercredentialcreate) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserCredentialCreate](#parsercredentialcreate)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### PUT
-##### Parameters
+### [PUT] /workspaces/current/model-providers/{provider}/credentials
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserCredentialUpdate](#parsercredentialupdate) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserCredentialUpdate](#parsercredentialupdate)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/credentials/switch
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/credentials/switch
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserCredentialSwitch](#parsercredentialswitch) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserCredentialSwitch](#parsercredentialswitch)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /workspaces/current/model-providers/{provider}/credentials/validate
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/credentials/validate
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserCredentialValidate](#parsercredentialvalidate) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserCredentialValidate](#parsercredentialvalidate)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/models
-
-#### DELETE
-##### Parameters
+### [DELETE] /workspaces/current/model-providers/{provider}/models
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserDeleteModels](#parserdeletemodels) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserDeleteModels](#parserdeletemodels)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Model deleted successfully |
-#### GET
-##### Parameters
+### [GET] /workspaces/current/model-providers/{provider}/models
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/models
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserPostModels](#parserpostmodels) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserPostModels](#parserpostmodels)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/models/credentials
-
-#### DELETE
-##### Parameters
+### [DELETE] /workspaces/current/model-providers/{provider}/models/credentials
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserDeleteCredential](#parserdeletecredential) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserDeleteCredential](#parserdeletecredential)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 204 | Credential deleted successfully |
-#### GET
-##### Parameters
+### [GET] /workspaces/current/model-providers/{provider}/models/credentials
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| config_from | query | | No | |
+| credential_id | query | | No | |
+| model | query | | Yes | string |
+| model_type | query | | Yes | [ModelType](#modeltype) |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserGetCredentials](#parsergetcredentials) |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/models/credentials
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserCreateCredential](#parsercreatecredential) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserCreateCredential](#parsercreatecredential)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### PUT
-##### Parameters
+### [PUT] /workspaces/current/model-providers/{provider}/models/credentials
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserUpdateCredential](#parserupdatecredential) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserUpdateCredential](#parserupdatecredential)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/models/credentials/switch
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/models/credentials/switch
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserSwitch](#parserswitch) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserSwitch](#parserswitch)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /workspaces/current/model-providers/{provider}/models/credentials/validate
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/models/credentials/validate
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserValidate](#parservalidate) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserValidate](#parservalidate)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/models/disable
-
-#### PATCH
-##### Parameters
+### [PATCH] /workspaces/current/model-providers/{provider}/models/disable
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserDeleteModels](#parserdeletemodels) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserDeleteModels](#parserdeletemodels)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /workspaces/current/model-providers/{provider}/models/enable
-
-#### PATCH
-##### Parameters
+### [PATCH] /workspaces/current/model-providers/{provider}/models/enable
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserDeleteModels](#parserdeletemodels) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserDeleteModels](#parserdeletemodels)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /workspaces/current/model-providers/{provider}/models/load-balancing-configs/credentials-validate
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/models/load-balancing-configs/credentials-validate
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [LoadBalancingCredentialPayload](#loadbalancingcredentialpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [LoadBalancingCredentialPayload](#loadbalancingcredentialpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/models/load-balancing-configs/{config_id}/credentials-validate
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/models/load-balancing-configs/{config_id}/credentials-validate
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| config_id | path | | Yes | string |
| provider | path | | Yes | string |
-| payload | body | | Yes | [LoadBalancingCredentialPayload](#loadbalancingcredentialpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [LoadBalancingCredentialPayload](#loadbalancingcredentialpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/models/parameter-rules
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/model-providers/{provider}/models/parameter-rules
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| model | query | | Yes | string |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserParameter](#parserparameter) |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/model-providers/{provider}/preferred-provider-type
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/model-providers/{provider}/preferred-provider-type
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [ParserPreferredProviderType](#parserpreferredprovidertype) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserPreferredProviderType](#parserpreferredprovidertype)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /workspaces/current/models/model-types/{model_type}
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/models/model-types/{model_type}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| model_type | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/permission
-
-#### GET
-##### Summary
-
-Get workspace permission settings
-
-##### Description
+### [GET] /workspaces/current/permission
+**Get workspace permission settings**
Returns permission flags that control workspace features like member invitations and owner transfer.
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [WorkspacePermissionResponse](#workspacepermissionresponse) |
+| 200 | Success | **application/json**: [WorkspacePermissionResponse](#workspacepermissionresponse)
|
-### /workspaces/current/plugin/asset
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/plugin/asset
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserAsset](#parserasset) |
+| file_name | query | | Yes | string |
+| plugin_unique_identifier | query | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/debugging-key
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/plugin/debugging-key
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [PluginDebuggingKeyResponse](#plugindebuggingkeyresponse) |
+| 200 | Success | **application/json**: [PluginDebuggingKeyResponse](#plugindebuggingkeyresponse)
|
-### /workspaces/current/plugin/fetch-manifest
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/plugin/fetch-manifest
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserPluginIdentifierQuery](#parserpluginidentifierquery) |
+| plugin_unique_identifier | query | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/icon
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/plugin/icon
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserIcon](#parsericon) |
+| filename | query | | Yes | string |
+| tenant_id | query | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/install/github
+### [POST] /workspaces/current/plugin/install/github
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserGithubInstall](#parsergithubinstall)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserGithubInstall](#parsergithubinstall) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/install/marketplace
+### [POST] /workspaces/current/plugin/install/marketplace
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserPluginIdentifiers](#parserpluginidentifiers)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserPluginIdentifiers](#parserpluginidentifiers) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/install/pkg
+### [POST] /workspaces/current/plugin/install/pkg
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserPluginIdentifiers](#parserpluginidentifiers)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserPluginIdentifiers](#parserpluginidentifiers) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/list
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/plugin/list
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserList](#parserlist) |
+| page | query | Page number | No | integer,
**Default:** 1 |
+| page_size | query | Page size (1-256) | No | integer,
**Default:** 256 |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/list/installations/ids
+### [POST] /workspaces/current/plugin/list/installations/ids
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserLatest](#parserlatest)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserLatest](#parserlatest) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/list/latest-versions
+### [POST] /workspaces/current/plugin/list/latest-versions
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserLatest](#parserlatest)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserLatest](#parserlatest) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/marketplace/pkg
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/plugin/marketplace/pkg
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserPluginIdentifierQuery](#parserpluginidentifierquery) |
+| plugin_unique_identifier | query | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/parameters/dynamic-options
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/plugin/parameters/dynamic-options
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserDynamicOptions](#parserdynamicoptions) |
+| action | query | | Yes | string |
+| credential_id | query | | No | |
+| parameter | query | | Yes | string |
+| plugin_id | query | | Yes | string |
+| provider | query | | Yes | string |
+| provider_type | query | | Yes | string,
**Available values:** "tool", "trigger" |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/parameters/dynamic-options-with-credentials
+### [POST] /workspaces/current/plugin/parameters/dynamic-options-with-credentials
+**Fetch dynamic options using credentials directly (for edit mode)**
-#### POST
-##### Summary
+#### Request Body
-Fetch dynamic options using credentials directly (for edit mode)
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserDynamicOptionsWithCredentials](#parserdynamicoptionswithcredentials)
|
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserDynamicOptionsWithCredentials](#parserdynamicoptionswithcredentials) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/permission/change
+### [POST] /workspaces/current/plugin/permission/change
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserPermissionChange](#parserpermissionchange)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserPermissionChange](#parserpermissionchange) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SuccessResponse](#successresponse) |
+| 200 | Success | **application/json**: [SuccessResponse](#successresponse)
|
-### /workspaces/current/plugin/permission/fetch
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/plugin/permission/fetch
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/preferences/autoupgrade/exclude
+### [POST] /workspaces/current/plugin/preferences/autoupgrade/exclude
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserExcludePlugin](#parserexcludeplugin)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [POST] /workspaces/current/plugin/preferences/change
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserPreferencesChange](#parserpreferenceschange)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /workspaces/current/plugin/preferences/fetch
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /workspaces/current/plugin/readme
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserExcludePlugin](#parserexcludeplugin) |
+| language | query | | No | string,
**Default:** en-US |
+| plugin_unique_identifier | query | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/preferences/change
-
-#### POST
-##### Parameters
+### [GET] /workspaces/current/plugin/tasks
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserPreferencesChange](#parserpreferenceschange) |
+| page | query | Page number | No | integer,
**Default:** 1 |
+| page_size | query | Page size (1-256) | No | integer,
**Default:** 256 |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/preferences/fetch
-
-#### GET
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/plugin/readme
-
-#### GET
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserReadme](#parserreadme) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/plugin/tasks
-
-#### GET
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserTasks](#parsertasks) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/plugin/tasks/delete_all
-
-#### POST
-##### Responses
+### [POST] /workspaces/current/plugin/tasks/delete_all
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SuccessResponse](#successresponse) |
+| 200 | Success | **application/json**: [SuccessResponse](#successresponse)
|
-### /workspaces/current/plugin/tasks/{task_id}
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/plugin/tasks/{task_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/tasks/{task_id}/delete
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/plugin/tasks/{task_id}/delete
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SuccessResponse](#successresponse) |
+| 200 | Success | **application/json**: [SuccessResponse](#successresponse)
|
-### /workspaces/current/plugin/tasks/{task_id}/delete/{identifier}
-
-#### POST
-##### Parameters
+### [POST] /workspaces/current/plugin/tasks/{task_id}/delete/{identifier}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| identifier | path | | Yes | string |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SuccessResponse](#successresponse) |
+| 200 | Success | **application/json**: [SuccessResponse](#successresponse)
|
-### /workspaces/current/plugin/uninstall
+### [POST] /workspaces/current/plugin/uninstall
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserUninstall](#parseruninstall)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserUninstall](#parseruninstall) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SuccessResponse](#successresponse) |
+| 200 | Success | **application/json**: [SuccessResponse](#successresponse)
|
-### /workspaces/current/plugin/upgrade/github
+### [POST] /workspaces/current/plugin/upgrade/github
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserGithubUpgrade](#parsergithubupgrade)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserGithubUpgrade](#parsergithubupgrade) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/upgrade/marketplace
+### [POST] /workspaces/current/plugin/upgrade/marketplace
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserMarketplaceUpgrade](#parsermarketplaceupgrade)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserMarketplaceUpgrade](#parsermarketplaceupgrade) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/upload/bundle
-
-#### POST
-##### Responses
+### [POST] /workspaces/current/plugin/upload/bundle
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/upload/github
+### [POST] /workspaces/current/plugin/upload/github
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ParserGithubUpload](#parsergithubupload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ParserGithubUpload](#parsergithubupload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/plugin/upload/pkg
-
-#### POST
-##### Responses
+### [POST] /workspaces/current/plugin/upload/pkg
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-labels
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tool-labels
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/api/add
+### [POST] /workspaces/current/tool-provider/api/add
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ApiToolProviderAddPayload](#apitoolprovideraddpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ApiToolProviderAddPayload](#apitoolprovideraddpayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/api/delete
+### [POST] /workspaces/current/tool-provider/api/delete
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ApiToolProviderDeletePayload](#apitoolproviderdeletepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ApiToolProviderDeletePayload](#apitoolproviderdeletepayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/api/get
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tool-provider/api/get
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/api/remote
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tool-provider/api/remote
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/api/schema
+### [POST] /workspaces/current/tool-provider/api/schema
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ApiToolSchemaPayload](#apitoolschemapayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ApiToolSchemaPayload](#apitoolschemapayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/api/test/pre
+### [POST] /workspaces/current/tool-provider/api/test/pre
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ApiToolTestPayload](#apitooltestpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ApiToolTestPayload](#apitooltestpayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/api/tools
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tool-provider/api/tools
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/api/update
+### [POST] /workspaces/current/tool-provider/api/update
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ApiToolProviderUpdatePayload](#apitoolproviderupdatepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ApiToolProviderUpdatePayload](#apitoolproviderupdatepayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/builtin/{provider}/add
-
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| provider | path | | Yes | string |
-| payload | body | | Yes | [BuiltinToolAddPayload](#builtintooladdpayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/tool-provider/builtin/{provider}/credential/info
-
-#### GET
-##### Parameters
+### [POST] /workspaces/current/tool-provider/builtin/{provider}/add
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [BuiltinToolAddPayload](#builtintooladdpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/builtin/{provider}/credential/schema/{credential_type}
+### [GET] /workspaces/current/tool-provider/builtin/{provider}/credential/info
+#### Parameters
-#### GET
-##### Parameters
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| provider | path | | Yes | string |
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /workspaces/current/tool-provider/builtin/{provider}/credential/schema/{credential_type}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| credential_type | path | | Yes | string |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/builtin/{provider}/credentials
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/tool-provider/builtin/{provider}/credentials
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/builtin/{provider}/default-credential
-
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| provider | path | | Yes | string |
-| payload | body | | Yes | [BuiltinProviderDefaultCredentialPayload](#builtinproviderdefaultcredentialpayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/tool-provider/builtin/{provider}/delete
-
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| provider | path | | Yes | string |
-| payload | body | | Yes | [BuiltinToolCredentialDeletePayload](#builtintoolcredentialdeletepayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/tool-provider/builtin/{provider}/icon
-
-#### GET
-##### Parameters
+### [POST] /workspaces/current/tool-provider/builtin/{provider}/default-credential
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [BuiltinProviderDefaultCredentialPayload](#builtinproviderdefaultcredentialpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/builtin/{provider}/info
-
-#### GET
-##### Parameters
+### [POST] /workspaces/current/tool-provider/builtin/{provider}/delete
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [BuiltinToolCredentialDeletePayload](#builtintoolcredentialdeletepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/builtin/{provider}/oauth/client-schema
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/tool-provider/builtin/{provider}/icon
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client
-
-#### DELETE
-##### Parameters
+### [GET] /workspaces/current/tool-provider/builtin/{provider}/info
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### GET
-##### Parameters
+### [GET] /workspaces/current/tool-provider/builtin/{provider}/oauth/client-schema
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| provider | path | | Yes | string |
-| payload | body | | Yes | [ToolOAuthCustomClientPayload](#tooloauthcustomclientpayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/tool-provider/builtin/{provider}/tools
-
-#### GET
-##### Parameters
+### [DELETE] /workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/builtin/{provider}/update
-
-#### POST
-##### Parameters
+### [GET] /workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [BuiltinToolUpdatePayload](#builtintoolupdatepayload) |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/mcp
-
-#### DELETE
-##### Parameters
+### [POST] /workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MCPProviderDeletePayload](#mcpproviderdeletepayload) |
+| provider | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ToolOAuthCustomClientPayload](#tooloauthcustomclientpayload)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /workspaces/current/tool-provider/builtin/{provider}/tools
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| provider | path | | Yes | string |
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [POST] /workspaces/current/tool-provider/builtin/{provider}/update
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| provider | path | | Yes | string |
+
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [BuiltinToolUpdatePayload](#builtintoolupdatepayload)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [DELETE] /workspaces/current/tool-provider/mcp
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MCPProviderDeletePayload](#mcpproviderdeletepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-#### POST
-##### Parameters
+### [POST] /workspaces/current/tool-provider/mcp
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MCPProviderCreatePayload](#mcpprovidercreatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MCPProviderCreatePayload](#mcpprovidercreatepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### PUT
-##### Parameters
+### [PUT] /workspaces/current/tool-provider/mcp
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MCPProviderUpdatePayload](#mcpproviderupdatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MCPProviderUpdatePayload](#mcpproviderupdatepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/mcp/auth
+### [POST] /workspaces/current/tool-provider/mcp/auth
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MCPAuthPayload](#mcpauthpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MCPAuthPayload](#mcpauthpayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/mcp/tools/{provider_id}
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/tool-provider/mcp/tools/{provider_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/mcp/update/{provider_id}
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/tool-provider/mcp/update/{provider_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/workflow/create
+### [POST] /workspaces/current/tool-provider/workflow/create
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowToolCreatePayload](#workflowtoolcreatepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowToolCreatePayload](#workflowtoolcreatepayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/workflow/delete
+### [POST] /workspaces/current/tool-provider/workflow/delete
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowToolDeletePayload](#workflowtooldeletepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowToolDeletePayload](#workflowtooldeletepayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/workflow/get
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tool-provider/workflow/get
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/workflow/tools
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tool-provider/workflow/tools
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-provider/workflow/update
+### [POST] /workspaces/current/tool-provider/workflow/update
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowToolUpdatePayload](#workflowtoolupdatepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowToolUpdatePayload](#workflowtoolupdatepayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tool-providers
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tool-providers
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tools/api
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tools/api
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tools/builtin
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tools/builtin
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tools/mcp
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tools/mcp
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/tools/workflow
-
-#### GET
-##### Responses
+### [GET] /workspaces/current/tools/workflow
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{provider}/icon
-
-#### GET
-##### Parameters
+### [GET] /workspaces/current/trigger-provider/{provider}/icon
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{provider}/info
+### [GET] /workspaces/current/trigger-provider/{provider}/info
+**Get info for a trigger provider**
-#### GET
-##### Summary
-
-Get info for a trigger provider
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{provider}/oauth/client
+### [DELETE] /workspaces/current/trigger-provider/{provider}/oauth/client
+**Remove custom OAuth client configuration**
-#### DELETE
-##### Summary
-
-Remove custom OAuth client configuration
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### GET
-##### Summary
+### [GET] /workspaces/current/trigger-provider/{provider}/oauth/client
+**Get OAuth client configuration for a provider**
-Get OAuth client configuration for a provider
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Summary
+### [POST] /workspaces/current/trigger-provider/{provider}/oauth/client
+**Configure custom OAuth client for a provider**
-Configure custom OAuth client for a provider
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| payload | body | | Yes | [TriggerOAuthClientPayload](#triggeroauthclientpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TriggerOAuthClientPayload](#triggeroauthclientpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{provider}/subscriptions/builder/build/{subscription_builder_id}
+### [POST] /workspaces/current/trigger-provider/{provider}/subscriptions/builder/build/{subscription_builder_id}
+**Build a subscription instance for a trigger provider**
-#### POST
-##### Summary
-
-Build a subscription instance for a trigger provider
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| provider | path | | Yes | string |
-| subscription_builder_id | path | | Yes | string |
-| payload | body | | Yes | [TriggerSubscriptionBuilderUpdatePayload](#triggersubscriptionbuilderupdatepayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/trigger-provider/{provider}/subscriptions/builder/create
-
-#### POST
-##### Summary
-
-Add a new subscription instance for a trigger provider
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| provider | path | | Yes | string |
-| payload | body | | Yes | [TriggerSubscriptionBuilderCreatePayload](#triggersubscriptionbuildercreatepayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/trigger-provider/{provider}/subscriptions/builder/logs/{subscription_builder_id}
-
-#### GET
-##### Summary
-
-Get the request logs for a subscription instance for a trigger provider
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
| subscription_builder_id | path | | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TriggerSubscriptionBuilderUpdatePayload](#triggersubscriptionbuilderupdatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{provider}/subscriptions/builder/update/{subscription_builder_id}
+### [POST] /workspaces/current/trigger-provider/{provider}/subscriptions/builder/create
+**Add a new subscription instance for a trigger provider**
-#### POST
-##### Summary
-
-Update a subscription instance for a trigger provider
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-| subscription_builder_id | path | | Yes | string |
-| payload | body | | Yes | [TriggerSubscriptionBuilderUpdatePayload](#triggersubscriptionbuilderupdatepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TriggerSubscriptionBuilderCreatePayload](#triggersubscriptionbuildercreatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{provider}/subscriptions/builder/verify-and-update/{subscription_builder_id}
+### [GET] /workspaces/current/trigger-provider/{provider}/subscriptions/builder/logs/{subscription_builder_id}
+**Get the request logs for a subscription instance for a trigger provider**
-#### POST
-##### Summary
-
-Verify and update a subscription instance for a trigger provider
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| provider | path | | Yes | string |
-| subscription_builder_id | path | | Yes | string |
-| payload | body | | Yes | [TriggerSubscriptionBuilderVerifyPayload](#triggersubscriptionbuilderverifypayload) |
-
-##### Responses
-
-| Code | Description |
-| ---- | ----------- |
-| 200 | Success |
-
-### /workspaces/current/trigger-provider/{provider}/subscriptions/builder/{subscription_builder_id}
-
-#### GET
-##### Summary
-
-Get a subscription instance for a trigger provider
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
| subscription_builder_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{provider}/subscriptions/list
+### [POST] /workspaces/current/trigger-provider/{provider}/subscriptions/builder/update/{subscription_builder_id}
+**Update a subscription instance for a trigger provider**
-#### GET
-##### Summary
+#### Parameters
-List all trigger subscriptions for the current tenant's provider
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| provider | path | | Yes | string |
+| subscription_builder_id | path | | Yes | string |
-##### Parameters
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TriggerSubscriptionBuilderUpdatePayload](#triggersubscriptionbuilderupdatepayload)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [POST] /workspaces/current/trigger-provider/{provider}/subscriptions/builder/verify-and-update/{subscription_builder_id}
+**Verify and update a subscription instance for a trigger provider**
+
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| provider | path | | Yes | string |
+| subscription_builder_id | path | | Yes | string |
+
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TriggerSubscriptionBuilderVerifyPayload](#triggersubscriptionbuilderverifypayload)
|
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /workspaces/current/trigger-provider/{provider}/subscriptions/builder/{subscription_builder_id}
+**Get a subscription instance for a trigger provider**
+
+#### Parameters
+
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| provider | path | | Yes | string |
+| subscription_builder_id | path | | Yes | string |
+
+#### Responses
+
+| Code | Description |
+| ---- | ----------- |
+| 200 | Success |
+
+### [GET] /workspaces/current/trigger-provider/{provider}/subscriptions/list
+**List all trigger subscriptions for the current tenant's provider**
+
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{provider}/subscriptions/oauth/authorize
+### [GET] /workspaces/current/trigger-provider/{provider}/subscriptions/oauth/authorize
+**Initiate OAuth authorization flow for a trigger provider**
-#### GET
-##### Summary
-
-Initiate OAuth authorization flow for a trigger provider
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{provider}/subscriptions/verify/{subscription_id}
+### [POST] /workspaces/current/trigger-provider/{provider}/subscriptions/verify/{subscription_id}
+**Verify credentials for an existing subscription (edit mode only)**
-#### POST
-##### Summary
-
-Verify credentials for an existing subscription (edit mode only)
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| provider | path | | Yes | string |
| subscription_id | path | | Yes | string |
-| payload | body | | Yes | [TriggerSubscriptionBuilderVerifyPayload](#triggersubscriptionbuilderverifypayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TriggerSubscriptionBuilderVerifyPayload](#triggersubscriptionbuilderverifypayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/trigger-provider/{subscription_id}/subscriptions/delete
+### [POST] /workspaces/current/trigger-provider/{subscription_id}/subscriptions/delete
+**Delete a subscription instance**
-#### POST
-##### Summary
-
-Delete a subscription instance
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| subscription_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
-### /workspaces/current/trigger-provider/{subscription_id}/subscriptions/update
+### [POST] /workspaces/current/trigger-provider/{subscription_id}/subscriptions/update
+**Update a subscription instance**
-#### POST
-##### Summary
-
-Update a subscription instance
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| subscription_id | path | | Yes | string |
-| payload | body | | Yes | [TriggerSubscriptionBuilderUpdatePayload](#triggersubscriptionbuilderupdatepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TriggerSubscriptionBuilderUpdatePayload](#triggersubscriptionbuilderupdatepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/current/triggers
+### [GET] /workspaces/current/triggers
+**List all trigger providers for the current tenant**
-#### GET
-##### Summary
-
-List all trigger providers for the current tenant
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/custom-config
+### [POST] /workspaces/custom-config
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkspaceCustomConfigPayload](#workspacecustomconfigpayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkspaceCustomConfigPayload](#workspacecustomconfigpayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/custom-config/webapp-logo/upload
-
-#### POST
-##### Responses
+### [POST] /workspaces/custom-config/webapp-logo/upload
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/info
+### [POST] /workspaces/info
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkspaceInfoPayload](#workspaceinfopayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkspaceInfoPayload](#workspaceinfopayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/switch
+### [POST] /workspaces/switch
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SwitchWorkspacePayload](#switchworkspacepayload)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SwitchWorkspacePayload](#switchworkspacepayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /workspaces/{tenant_id}/model-providers/{provider}/{icon_type}/{lang}
-
-#### GET
-##### Parameters
+### [GET] /workspaces/{tenant_id}/model-providers/{provider}/{icon_type}/{lang}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -11543,7 +10364,7 @@ List all trigger providers for the current tenant
| provider | path | | Yes | string |
| tenant_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -11553,21 +10374,17 @@ List all trigger providers for the current tenant
## default
Default namespace
-### /explore/banners
+### [GET] /explore/banners
+**Get banner list**
-#### GET
-##### Summary
-
-Get banner list
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
---
-### Models
+### Schemas
#### APIBasedExtensionListResponse
@@ -11669,7 +10486,7 @@ Get banner list
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| interface_theme | string | *Enum:* `"dark"`, `"light"` | Yes |
+| interface_theme | string,
**Available values:** "dark", "light" | *Enum:* `"dark"`, `"light"` | Yes |
#### AccountNamePayload
@@ -11792,7 +10609,7 @@ Get banner list
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| app_mode | string | Application mode | Yes |
-| has_context | string | Whether has context | No |
+| has_context | string,
**Default:** true | Whether has context | No |
| model_mode | string | Model mode | Yes |
| model_name | string | Model name | Yes |
@@ -11848,7 +10665,7 @@ composer/publish validators and skipped by runtime request builders.
| dangerous_acknowledged | boolean | | No |
| dangerous_command | boolean | | No |
| description | string | | No |
-| enabled | boolean | | No |
+| enabled | boolean,
**Default:** true | | No |
| env | [AgentCliToolEnvConfig](#agentclitoolenvconfig) | | No |
| id | string | | No |
| install | string | | No |
@@ -11931,7 +10748,7 @@ Risk marker for CLI tool bootstrap commands.
| ---- | ---- | ----------- | -------- |
| file_id | string | | No |
| id | string | | No |
-| kind | string | | No |
+| kind | string,
**Default:** file | | No |
| name | string | | No |
| reference | string | | No |
| remote_url | string | | No |
@@ -11972,7 +10789,7 @@ Risk marker for CLI tool bootstrap commands.
| description | string | | No |
| file_id | string | | No |
| id | string | | No |
-| kind | string | | No |
+| kind | string,
**Default:** skill | | No |
| name | string | | No |
| path | string | | No |
@@ -12110,7 +10927,7 @@ Audit operation recorded for Agent Soul version/revision changes.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string | | No |
-| enabled | boolean | | No |
+| enabled | boolean,
**Default:** true | | No |
| name | string | | No |
#### AgentIconType
@@ -12166,8 +10983,8 @@ Supported icon storage formats for Agent roster entries.
| ---- | ---- | ----------- | -------- |
| app_id | string | Workflow app id for in-current-workflow markers | No |
| keyword | string | | No |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
#### AgentInviteOptionsResponse
@@ -12411,7 +11228,7 @@ Visibility and lifecycle scope of an Agent record.
| model | [AgentSoulModelConfig](#agentsoulmodelconfig) | | No |
| prompt | [AgentSoulPromptConfig](#agentsoulpromptconfig) | | No |
| sandbox | [AgentSoulSandboxConfig](#agentsoulsandboxconfig) | | No |
-| schema_version | integer | | No |
+| schema_version | integer,
**Default:** 1 | | No |
| skills_files | [AgentSoulSkillsFilesConfig](#agentsoulskillsfilesconfig) | | No |
| tools | [AgentSoulToolsConfig](#agentsoultoolsconfig) | | No |
@@ -12427,14 +11244,14 @@ new callers should send ``plugin_id`` + ``provider`` when available.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| credential_ref | [AgentSoulDifyToolCredentialRef](#agentsouldifytoolcredentialref) | | No |
-| credential_type | string | *Enum:* `"api-key"`, `"oauth2"`, `"unauthorized"` | No |
+| credential_type | string,
**Available values:** "api-key", "oauth2", "unauthorized",
**Default:** api-key | *Enum:* `"api-key"`, `"oauth2"`, `"unauthorized"` | No |
| description | string | | No |
-| enabled | boolean | | No |
+| enabled | boolean,
**Default:** true | | No |
| name | string | | No |
| plugin_id | string | | No |
| provider | string | | No |
| provider_id | string | | No |
-| provider_type | string | | No |
+| provider_type | string,
**Default:** plugin | | No |
| runtime_parameters | object | | No |
| tool_name | string | | No |
@@ -12450,7 +11267,7 @@ old Agent tool payloads can be read while new payloads stay explicit.
| ---- | ---- | ----------- | -------- |
| id | string | | No |
| provider | string | | No |
-| type | string | *Enum:* `"provider"`, `"tool"` | No |
+| type | string,
**Available values:** "provider", "tool",
**Default:** tool | *Enum:* `"provider"`, `"tool"` | No |
#### AgentSoulEnvConfig
@@ -12664,8 +11481,8 @@ Soft lifecycle state for Agent records.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keyword | string | Search keyword | No |
-| limit | integer | Page size | No |
-| page | integer | Page number | No |
+| limit | integer,
**Default:** 20 | Page size | No |
+| page | integer,
**Default:** 1 | Page number | No |
#### AnnotationReplyPayload
@@ -12679,7 +11496,7 @@ Soft lifecycle state for Agent records.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| action | string | *Enum:* `"disable"`, `"enable"` | Yes |
+| action | string,
**Available values:** "disable", "enable" | *Enum:* `"disable"`, `"enable"` | Yes |
#### AnnotationSettingUpdatePayload
@@ -12897,10 +11714,10 @@ Enum class for api provider schema type.
| ---- | ---- | ----------- | -------- |
| creator_ids | [ string ] | Filter by creator account IDs | No |
| is_created_by_me | boolean | Filter by creator | No |
-| limit | integer | Page size (1-100) | No |
-| mode | string | App mode filter
*Enum:* `"advanced-chat"`, `"agent"`, `"agent-chat"`, `"all"`, `"channel"`, `"chat"`, `"completion"`, `"workflow"` | No |
+| limit | integer,
**Default:** 20 | Page size (1-100) | No |
+| mode | string,
**Available values:** "advanced-chat", "agent", "agent-chat", "all", "channel", "chat", "completion", "workflow",
**Default:** all | App mode filter
*Enum:* `"advanced-chat"`, `"agent"`, `"agent-chat"`, `"all"`, `"channel"`, `"chat"`, `"completion"`, `"workflow"` | No |
| name | string | Filter by app name | No |
-| page | integer | Page number (1-99999) | No |
+| page | integer,
**Default:** 1 | Page number (1-99999) | No |
| tag_ids | [ string ] | Filter by tag IDs | No |
#### AppMCPServerResponse
@@ -13000,7 +11817,7 @@ AppMCPServer Status Enum
| copyright | string | | No |
| custom_disclaimer | string | | No |
| customize_domain | string | | No |
-| customize_token_strategy | string | *Enum:* `"allow"`, `"must"`, `"not_allow"` | No |
+| customize_token_strategy | string | | No |
| default_language | string | | No |
| description | string | | No |
| icon | string | | No |
@@ -13152,12 +11969,12 @@ Button styles for user actions.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| annotation_status | string | Annotation status filter
*Enum:* `"all"`, `"annotated"`, `"not_annotated"` | No |
+| annotation_status | string,
**Available values:** "all", "annotated", "not_annotated",
**Default:** all | Annotation status filter
*Enum:* `"all"`, `"annotated"`, `"not_annotated"` | No |
| end | string | End date (YYYY-MM-DD HH:MM) | No |
| keyword | string | Search keyword | No |
-| limit | integer | Page size (1-100) | No |
-| page | integer | Page number | No |
-| sort_by | string | Sort field and direction
*Enum:* `"-created_at"`, `"-updated_at"`, `"created_at"`, `"updated_at"` | No |
+| limit | integer,
**Default:** 20 | Page size (1-100) | No |
+| page | integer,
**Default:** 1 | Page number | No |
+| sort_by | string,
**Available values:** "-created_at", "-updated_at", "created_at", "updated_at",
**Default:** -updated_at | Sort field and direction
*Enum:* `"-created_at"`, `"-updated_at"`, `"created_at"`, `"updated_at"` | No |
| start | string | Start date (YYYY-MM-DD HH:MM) | No |
#### ChatMessagePayload
@@ -13165,13 +11982,13 @@ Button styles for user actions.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| conversation_id | string | Conversation ID | No |
-| files | [ ] | Uploaded files | No |
+| files | [ object ] | Uploaded files | No |
| inputs | object | | Yes |
| model_config | object | | No |
| parent_message_id | string | Parent message ID | No |
| query | string | User query | Yes |
-| response_mode | string | Response mode
*Enum:* `"blocking"`, `"streaming"` | No |
-| retriever_from | string | Retriever source | No |
+| response_mode | string,
**Available values:** "blocking", "streaming",
**Default:** blocking | Response mode
*Enum:* `"blocking"`, `"streaming"` | No |
+| retriever_from | string,
**Default:** dev | Retriever source | No |
#### ChatMessagesQuery
@@ -13179,18 +11996,18 @@ Button styles for user actions.
| ---- | ---- | ----------- | -------- |
| conversation_id | string | Conversation ID | Yes |
| first_id | string | First message ID for pagination | No |
-| limit | integer | Number of messages to return (1-100) | No |
+| limit | integer,
**Default:** 20 | Number of messages to return (1-100) | No |
#### ChatRequest
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| conversation_id | string | | No |
-| files | [ ] | | No |
+| files | [ object ] | | No |
| inputs | object | | Yes |
| parent_message_id | string | | No |
| query | string | | Yes |
-| retriever_from | string | | No |
+| retriever_from | string,
**Default:** explore_app | | No |
#### CheckDependenciesResult
@@ -13242,8 +12059,8 @@ Button styles for user actions.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keyword | string | | No |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
#### ChildChunkListResponse
@@ -13292,11 +12109,11 @@ Button styles for user actions.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| annotation_status | string | Annotation status filter
*Enum:* `"all"`, `"annotated"`, `"not_annotated"` | No |
+| annotation_status | string,
**Available values:** "all", "annotated", "not_annotated",
**Default:** all | Annotation status filter
*Enum:* `"all"`, `"annotated"`, `"not_annotated"` | No |
| end | string | End date (YYYY-MM-DD HH:MM) | No |
| keyword | string | Search keyword | No |
-| limit | integer | Page size (1-100) | No |
-| page | integer | Page number | No |
+| limit | integer,
**Default:** 20 | Page size (1-100) | No |
+| page | integer,
**Default:** 1 | Page number | No |
| start | string | Start date (YYYY-MM-DD HH:MM) | No |
#### CompletionMessageExplorePayload
@@ -13306,29 +12123,29 @@ Button styles for user actions.
| files | [ object ] | | No |
| inputs | object | | Yes |
| query | string | | No |
-| response_mode | string | *Enum:* `"blocking"`, `"streaming"` | No |
-| retriever_from | string | | No |
+| response_mode | string | | No |
+| retriever_from | string,
**Default:** explore_app | | No |
#### CompletionMessagePayload
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| files | [ ] | Uploaded files | No |
+| files | [ object ] | Uploaded files | No |
| inputs | object | | Yes |
| model_config | object | | No |
| query | string | Query text | No |
-| response_mode | string | Response mode
*Enum:* `"blocking"`, `"streaming"` | No |
-| retriever_from | string | Retriever source | No |
+| response_mode | string,
**Available values:** "blocking", "streaming",
**Default:** blocking | Response mode
*Enum:* `"blocking"`, `"streaming"` | No |
+| retriever_from | string,
**Default:** dev | Retriever source | No |
#### CompletionRequest
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| files | [ ] | | No |
+| files | [ object ] | | No |
| inputs | object | | Yes |
| query | string | | No |
-| response_mode | string | *Enum:* `"blocking"`, `"streaming"` | No |
-| retriever_from | string | | No |
+| response_mode | string | | No |
+| retriever_from | string,
**Default:** explore_app | | No |
#### ComplianceDownloadQuery
@@ -13341,7 +12158,7 @@ Button styles for user actions.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| agent_id | string | | No |
-| binding_type | string | *Enum:* `"inline_agent"`, `"roster_agent"` | Yes |
+| binding_type | string,
**Available values:** "inline_agent", "roster_agent" | *Enum:* `"inline_agent"`, `"roster_agent"` | Yes |
| current_snapshot_id | string | | No |
#### ComposerCandidateCapabilities
@@ -13382,7 +12199,7 @@ Button styles for user actions.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| locked | boolean | | No |
+| locked | boolean,
**Default:** true | | No |
| unlocked_from_version_id | string | | No |
#### ComposerValidationFindingsResponse
@@ -13414,7 +12231,7 @@ Condition detail
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| comparison_operator | string | *Enum:* `"<"`, `"="`, `">"`, `"after"`, `"before"`, `"contains"`, `"empty"`, `"end with"`, `"in"`, `"is"`, `"is not"`, `"not contains"`, `"not empty"`, `"not in"`, `"start with"`, `"≠"`, `"≤"`, `"≥"` | Yes |
+| comparison_operator | string,
**Available values:** "<", "=", ">", "after", "before", "contains", "empty", "end with", "in", "is", "is not", "not contains", "not empty", "not in", "start with", "≠", "≤", "≥" | *Enum:* `"<"`, `"="`, `">"`, `"after"`, `"before"`, `"contains"`, `"empty"`, `"end with"`, `"in"`, `"is"`, `"is not"`, `"not contains"`, `"not empty"`, `"not in"`, `"start with"`, `"≠"`, `"≤"`, `"≥"` | Yes |
| name | string | | Yes |
| value | string
[ string ]
integer
number | | No |
@@ -13425,8 +12242,8 @@ Condition detail
| ids | [ string ] | Filter by dataset IDs | No |
| include_all | boolean | Include all datasets | No |
| keyword | string | Search keyword | No |
-| limit | integer | Number of items per page | No |
-| page | integer | Page number | No |
+| limit | integer,
**Default:** 20 | Number of items per page | No |
+| page | integer,
**Default:** 1 | Page number | No |
| tag_ids | [ string ] | Filter by tag IDs | No |
#### ConsoleSegmentListResponse
@@ -13500,7 +12317,7 @@ Condition detail
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| last_id | string | | No |
-| limit | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
| pinned | boolean | | No |
#### ConversationMessageDetail
@@ -13627,7 +12444,7 @@ Condition detail
| icon | string | Icon | No |
| icon_background | string | Icon background color | No |
| icon_type | [IconType](#icontype) | Icon type | No |
-| mode | string | App mode
*Enum:* `"advanced-chat"`, `"agent"`, `"agent-chat"`, `"chat"`, `"completion"`, `"workflow"` | Yes |
+| mode | string,
**Available values:** "advanced-chat", "agent", "agent-chat", "chat", "completion", "workflow" | App mode
*Enum:* `"advanced-chat"`, `"agent"`, `"agent-chat"`, `"chat"`, `"completion"`, `"workflow"` | Yes |
| name | string | App name | Yes |
#### CreateSnippetPayload
@@ -13641,7 +12458,7 @@ Payload for creating a new snippet.
| icon_info | [IconInfo](#iconinfo) | | No |
| input_fields | [ [InputFieldDefinition](#inputfielddefinition) ] | | No |
| name | string | | Yes |
-| type | string | *Enum:* `"group"`, `"node"` | No |
+| type | string,
**Available values:** "group", "node",
**Default:** node | *Enum:* `"group"`, `"node"` | No |
#### CredentialType
@@ -13727,7 +12544,7 @@ Payload for creating a new snippet.
| indexing_technique | string | | No |
| name | string | | Yes |
| permission | [PermissionEnum](#permissionenum) | | No |
-| provider | string | | No |
+| provider | string,
**Default:** vendor | | No |
#### DatasetDetail
@@ -14270,7 +13087,7 @@ code can call ``output.failure_strategy.on_failure`` without None-guards.
| file | [DeclaredOutputFileConfig](#declaredoutputfileconfig) | | No |
| id | string | | No |
| name | string | | Yes |
-| required | boolean | | No |
+| required | boolean,
**Default:** true | | No |
| type | [DeclaredOutputType](#declaredoutputtype) | | Yes |
#### DeclaredOutputFailureStrategy
@@ -14522,7 +13339,7 @@ Request payload for bulk downloading documents as a zip archive.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keywords | string | | Yes |
-| limit | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
| page | integer | | No |
#### EducationAutocompleteResponse
@@ -14693,8 +13510,8 @@ Request payload for bulk downloading documents as a zip archive.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keyword | string | Search keyword | No |
-| limit | integer | Number of items per page | No |
-| page | integer | Page number | No |
+| limit | integer,
**Default:** 20 | Number of items per page | No |
+| page | integer,
**Default:** 1 | Page number | No |
#### ExternalDatasetCreatePayload
@@ -14748,13 +13565,13 @@ Request payload for bulk downloading documents as a zip archive.
| billing | [BillingModel](#billingmodel) | | Yes |
| can_replace_logo | boolean | | Yes |
| dataset_operator_enabled | boolean | | Yes |
-| docs_processing | string | | Yes |
+| docs_processing | string,
**Default:** standard | | Yes |
| documents_upload_quota | [LimitationModel](#limitationmodel) | | Yes |
| education | [EducationModel](#educationmodel) | | Yes |
| human_input_email_delivery_enabled | boolean | | Yes |
-| is_allow_transfer_workspace | boolean | | Yes |
+| is_allow_transfer_workspace | boolean,
**Default:** true | | Yes |
| knowledge_pipeline | [KnowledgePipeline](#knowledgepipeline) | | Yes |
-| knowledge_rate_limit | integer | | Yes |
+| knowledge_rate_limit | integer,
**Default:** 10 | | Yes |
| members | [LimitationModel](#limitationmodel) | | Yes |
| model_load_balancing_enabled | boolean | | Yes |
| next_credit_reset_date | integer | | Yes |
@@ -14778,10 +13595,10 @@ Request payload for bulk downloading documents as a zip archive.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| end_date | string | End date (YYYY-MM-DD) | No |
-| format | string | Export format
*Enum:* `"csv"`, `"json"` | No |
-| from_source | string | Filter by feedback source
*Enum:* `"admin"`, `"user"` | No |
+| format | string,
**Available values:** "csv", "json",
**Default:** csv | Export format
*Enum:* `"csv"`, `"json"` | No |
+| from_source | string | Filter by feedback source | No |
| has_comment | boolean | Only include feedback with comments | No |
-| rating | string | Filter by rating
*Enum:* `"dislike"`, `"like"` | No |
+| rating | string | Filter by rating | No |
| start_date | string | Start date (YYYY-MM-DD) | No |
#### FeedbackStat
@@ -15093,7 +13910,7 @@ Icon information model.
| ---- | ---- | ----------- | -------- |
| icon | string | | No |
| icon_background | string | | No |
-| icon_type | string | *Enum:* `"emoji"`, `"image"` | No |
+| icon_type | string | | No |
| icon_url | string | | No |
#### IconType
@@ -15116,7 +13933,7 @@ How Dify forwards the end-user's identity to an MCP server.
| ---- | ---- | ----------- | -------- |
| app_id | string | | No |
| app_mode | string | | No |
-| current_dsl_version | string | | No |
+| current_dsl_version | string,
**Default:** 0.6.0 | | No |
| error | string | | No |
| id | string | | Yes |
| imported_dsl_version | string | | No |
@@ -15134,7 +13951,7 @@ Query parameter for including secret variables in export.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| include_secret | string | Whether to include secret variables | No |
+| include_secret | string,
**Default:** false | Whether to include secret variables | No |
#### IndexingEstimate
@@ -15149,8 +13966,8 @@ Query parameter for including secret variables in export.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| dataset_id | string | | No |
-| doc_form | string | | No |
-| doc_language | string | | No |
+| doc_form | string,
**Default:** text_model | | No |
+| doc_language | string,
**Default:** English | | No |
| indexing_technique | string | | Yes |
| info_list | object | | Yes |
| process_rule | object | | Yes |
@@ -15182,7 +13999,7 @@ Query parameter for including secret variables in export.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| data_source_type | string | *Enum:* `"notion_import"`, `"upload_file"`, `"website_crawl"` | Yes |
+| data_source_type | string,
**Available values:** "notion_import", "upload_file", "website_crawl" | *Enum:* `"notion_import"`, `"upload_file"`, `"website_crawl"` | Yes |
| file_info_list | [FileInfo](#fileinfo) | | No |
| notion_info_list | [ [NotionInfo](#notioninfo) ] | | No |
| website_info_list | [WebsiteInfo](#websiteinfo) | | No |
@@ -15272,7 +14089,7 @@ Input field definition for snippet parameters.
| flow_id | string | Workflow/Flow ID | Yes |
| ideal_output | string | Expected ideal output | No |
| instruction | string | Instruction for generation | Yes |
-| language | string | Programming language (javascript/python) | No |
+| language | string,
**Default:** javascript | Programming language (javascript/python) | No |
| model_config | [ModelConfig](#modelconfig) | Model configuration | Yes |
| node_id | string | Node ID for workflow context | No |
@@ -15305,12 +14122,12 @@ Input field definition for snippet parameters.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| data_source | [DataSource](#datasource) | | No |
-| doc_form | string | | No |
-| doc_language | string | | No |
-| duplicate | boolean | | No |
+| doc_form | string,
**Default:** text_model | | No |
+| doc_language | string,
**Default:** English | | No |
+| duplicate | boolean,
**Default:** true | | No |
| embedding_model | string | | No |
| embedding_model_provider | string | | No |
-| indexing_technique | string | *Enum:* `"economy"`, `"high_quality"` | Yes |
+| indexing_technique | string,
**Available values:** "economy", "high_quality" | *Enum:* `"economy"`, `"high_quality"` | Yes |
| is_multimodal | boolean | | No |
| name | string | | No |
| original_document_id | string | | No |
@@ -15547,7 +14364,7 @@ Enum class for large language model mode.
| ---- | ---- | ----------- | -------- |
| content | string | | No |
| message_id | string | Message ID | Yes |
-| rating | string | *Enum:* `"dislike"`, `"like"` | No |
+| rating | string | | No |
#### MessageFile
@@ -15577,14 +14394,14 @@ Enum class for large language model mode.
| ---- | ---- | ----------- | -------- |
| conversation_id | string | Conversation UUID | Yes |
| first_id | string | First message ID for pagination | No |
-| limit | integer | Number of messages to return (1-100) | No |
+| limit | integer,
**Default:** 20 | Number of messages to return (1-100) | No |
#### MetadataArgs
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| name | string | | Yes |
-| type | string | *Enum:* `"number"`, `"string"`, `"time"` | Yes |
+| type | string,
**Available values:** "number", "string", "time" | *Enum:* `"number"`, `"string"`, `"time"` | Yes |
#### MetadataDetail
@@ -15601,7 +14418,7 @@ Metadata Filtering Condition.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| conditions | [ [Condition](#condition) ] | | No |
-| logical_operator | string | *Enum:* `"and"`, `"or"` | No |
+| logical_operator | string | | No |
#### MetadataOperationData
@@ -15666,7 +14483,7 @@ Enum class for model type.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| response_mode | string | *Enum:* `"blocking"`, `"streaming"` | Yes |
+| response_mode | string,
**Available values:** "blocking", "streaming" | *Enum:* `"blocking"`, `"streaming"` | Yes |
#### NewAppResponse
@@ -15704,11 +14521,11 @@ Lifecycle status of a single declared output within a run.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| node_completed_at | dateTime | | No |
+| node_completed_at | string | | No |
| node_display_name | string | | Yes |
| node_id | string | | Yes |
| node_kind | string | | Yes |
-| node_started_at | dateTime | | No |
+| node_started_at | string | | No |
| node_status | [NodeStatus](#nodestatus) | | Yes |
| outputs | [ [NodeOutputView](#nodeoutputview) ] | | No |
@@ -15736,8 +14553,8 @@ Coarse node-level status used by Inspector to pick a banner.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| doc_form | string | | No |
-| doc_language | string | | No |
+| doc_form | string,
**Default:** text_model | | No |
+| doc_language | string,
**Default:** English | | No |
| notion_info_list | [ object ] | | Yes |
| process_rule | object | | Yes |
@@ -15965,7 +14782,7 @@ Form input definition.
| parameter | string | | Yes |
| plugin_id | string | | Yes |
| provider | string | | Yes |
-| provider_type | string | *Enum:* `"tool"`, `"trigger"` | Yes |
+| provider_type | string,
**Available values:** "tool", "trigger" | *Enum:* `"tool"`, `"trigger"` | Yes |
#### ParserDynamicOptionsWithCredentials
@@ -16050,8 +14867,8 @@ Form input definition.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| page | integer | Page number | No |
-| page_size | integer | Page size (1-256) | No |
+| page | integer,
**Default:** 1 | Page number | No |
+| page_size | integer,
**Default:** 256 | Page size (1-256) | No |
#### ParserMarketplaceUpgrade
@@ -16118,13 +14935,13 @@ Form input definition.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| preferred_provider_type | string | *Enum:* `"custom"`, `"system"` | Yes |
+| preferred_provider_type | string,
**Available values:** "custom", "system" | *Enum:* `"custom"`, `"system"` | Yes |
#### ParserReadme
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| language | string | | No |
+| language | string,
**Default:** en-US | | No |
| plugin_unique_identifier | string | | Yes |
#### ParserSwitch
@@ -16139,8 +14956,8 @@ Form input definition.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| page | integer | Page number | No |
-| page_size | integer | Page size (1-256) | No |
+| page | integer,
**Default:** 1 | Page number | No |
+| page_size | integer,
**Default:** 256 | Page size (1-256) | No |
#### ParserUninstall
@@ -16198,7 +15015,7 @@ Shared permission levels for resources (datasets, credentials, etc.)
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| type | string | Template source: built-in or customized | No |
+| type | string,
**Default:** built-in | Template source: built-in or customized | No |
#### PipelineTemplateDetailResponse
@@ -16230,8 +15047,8 @@ Shared permission levels for resources (datasets, credentials, etc.)
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| language | string | Template language | No |
-| type | string | Template source: built-in or customized | No |
+| language | string,
**Default:** en-US | Template language | No |
+| type | string,
**Default:** built-in | Template source: built-in or customized | No |
#### PipelineTemplateListResponse
@@ -16363,7 +15180,7 @@ Payload for publishing snippet workflow.
| inputs | object | | Yes |
| is_preview | boolean | | No |
| original_document_id | string | | No |
-| response_mode | string | *Enum:* `"blocking"`, `"streaming"` | No |
+| response_mode | string,
**Available values:** "blocking", "streaming",
**Default:** streaming | *Enum:* `"blocking"`, `"streaming"` | No |
| start_node_id | string | | Yes |
#### QAPreviewDetail
@@ -16378,7 +15195,7 @@ Payload for publishing snippet workflow.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| limit | integer | | Yes |
-| reset_date | integer | | Yes |
+| reset_date | integer,
**Default:** -1 | | Yes |
| usage | integer | | Yes |
#### RagPipelineDatasetImportPayload
@@ -16423,7 +15240,7 @@ Payload for publishing snippet workflow.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| type | string | | No |
+| type | string,
**Default:** all | | No |
#### RagPipelineWorkflowPublishResponse
@@ -16586,14 +15403,14 @@ Payload for publishing snippet workflow.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keyword | string | | No |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
#### Rule
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| parent_mode | string | *Enum:* `"full-doc"`, `"paragraph"` | No |
+| parent_mode | string | | No |
| pre_processing_rules | [ [PreProcessingRule](#preprocessingrule) ] | | No |
| segmentation | [Segmentation](#segmentation) | | No |
| subchunk_segmentation | [Segmentation](#segmentation) | | No |
@@ -16602,7 +15419,7 @@ Payload for publishing snippet workflow.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| code_language | string | Programming language for code generation | No |
+| code_language | string,
**Default:** javascript | Programming language for code generation | No |
| instruction | string | Rule generation instruction | Yes |
| model_config | [ModelConfig](#modelconfig) | Model configuration | Yes |
| no_variable | boolean | Whether to exclude variables | No |
@@ -16629,7 +15446,7 @@ Payload for publishing snippet workflow.
| mtime | integer | | No |
| name | string | | Yes |
| size | integer | | No |
-| type | string | *Enum:* `"dir"`, `"file"`, `"other"`, `"symlink"` | Yes |
+| type | string,
**Available values:** "dir", "file", "other", "symlink" | *Enum:* `"dir"`, `"file"`, `"other"`, `"symlink"` | Yes |
#### SandboxListResponse
@@ -16654,7 +15471,7 @@ Payload for publishing snippet workflow.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| reference | string | | Yes |
-| transfer_method | string | | No |
+| transfer_method | string,
**Default:** tool_file | | No |
#### SandboxUploadResponse
@@ -16674,7 +15491,7 @@ Payload for publishing snippet workflow.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| last_id | string | | No |
-| limit | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
#### SegmentAttachmentResponse
@@ -16720,11 +15537,11 @@ Payload for publishing snippet workflow.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| enabled | string | | No |
+| enabled | string,
**Default:** all | | No |
| hit_count_gte | integer | | No |
| keyword | string | | No |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
| status | [ string ] | | No |
#### SegmentResponse
@@ -16776,7 +15593,8 @@ Payload for publishing snippet workflow.
| ---- | ---- | ----------- | -------- |
| chunk_overlap | integer | | No |
| max_tokens | integer | | Yes |
-| separator | string | | No |
+| separator | string,
**Default:**
+ | | No |
#### SelectInputConfig
@@ -16984,8 +15802,8 @@ Query parameters for listing snippets.
| creators | [ string ] | Filter by creator account IDs | No |
| is_published | boolean | Filter by published status | No |
| keyword | string | | No |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
| tag_ids | [ string ] | Filter by tag IDs | No |
#### SnippetLoopNodeRunPayload
@@ -17012,8 +15830,8 @@ Query parameters for listing snippet published workflows.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 10 | | No |
+| page | integer,
**Default:** 1 | | No |
#### SnippetWorkflowResponse
@@ -17081,14 +15899,14 @@ Default configuration for form inputs.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| interval | string | | Yes |
-| plan | string | | Yes |
+| plan | string,
**Default:** sandbox | | Yes |
#### SubscriptionQuery
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| interval | string | Billing interval
*Enum:* `"month"`, `"year"` | Yes |
-| plan | string | Subscription plan
*Enum:* `"professional"`, `"team"` | Yes |
+| interval | string,
**Available values:** "month", "year" | Billing interval
*Enum:* `"month"`, `"year"` | Yes |
+| plan | string,
**Available values:** "professional", "team" | Subscription plan
*Enum:* `"professional"`, `"team"` | Yes |
#### SuccessResponse
@@ -17131,11 +15949,11 @@ Default configuration for form inputs.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| branding | [BrandingModel](#brandingmodel) | | Yes |
-| enable_change_email | boolean | | Yes |
-| enable_collaboration_mode | boolean | | Yes |
+| enable_change_email | boolean,
**Default:** true | | Yes |
+| enable_collaboration_mode | boolean,
**Default:** true | | Yes |
| enable_creators_platform | boolean | | Yes |
| enable_email_code_login | boolean | | Yes |
-| enable_email_password_login | boolean | | Yes |
+| enable_email_password_login | boolean,
**Default:** true | | Yes |
| enable_explore_banner | boolean | | Yes |
| enable_marketplace | boolean | | Yes |
| enable_social_oauth_login | boolean | | Yes |
@@ -17144,7 +15962,7 @@ Default configuration for form inputs.
| is_allow_register | boolean | | Yes |
| is_email_setup | boolean | | Yes |
| license | [LicenseModel](#licensemodel) | | Yes |
-| max_plugin_package_size | integer | | Yes |
+| max_plugin_package_size | integer,
**Default:** 15728640 | | Yes |
| plugin_installation_permission | [PluginInstallationPermissionModel](#plugininstallationpermissionmodel) | | Yes |
| plugin_manager | [PluginManagerModel](#pluginmanagermodel) | | Yes |
| sso_enforced_for_signin | boolean | | Yes |
@@ -17187,7 +16005,7 @@ Default configuration for form inputs.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keyword | string | Search keyword | No |
-| type | string | Tag type filter
*Enum:* `""`, `"app"`, `"knowledge"`, `"snippet"` | No |
+| type | string,
**Available values:** "", "app", "knowledge", "snippet" | Tag type filter
*Enum:* `""`, `"app"`, `"knowledge"`, `"snippet"` | No |
#### TagResponse
@@ -17486,7 +16304,7 @@ Tag type
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| credential_type | string | | No |
+| credential_type | string,
**Default:** unauthorized | | No |
#### TriggerSubscriptionBuilderUpdatePayload
@@ -17627,7 +16445,7 @@ in form definiton, or a variable while the workflow is running.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| created_at | dateTime | | No |
+| created_at | string | | No |
| id | string | | Yes |
| node_id | string | | Yes |
| webhook_debug_url | string | | Yes |
@@ -17639,21 +16457,21 @@ in form definiton, or a variable while the workflow is running.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| options | object | | Yes |
-| provider | string | *Enum:* `"firecrawl"`, `"jinareader"`, `"watercrawl"` | Yes |
+| provider | string,
**Available values:** "firecrawl", "jinareader", "watercrawl" | *Enum:* `"firecrawl"`, `"jinareader"`, `"watercrawl"` | Yes |
| url | string | | Yes |
#### WebsiteCrawlStatusQuery
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| provider | string | *Enum:* `"firecrawl"`, `"jinareader"`, `"watercrawl"` | Yes |
+| provider | string,
**Available values:** "firecrawl", "jinareader", "watercrawl" | *Enum:* `"firecrawl"`, `"jinareader"`, `"watercrawl"` | Yes |
#### WebsiteInfo
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| job_id | string | | Yes |
-| only_main_content | boolean | | No |
+| only_main_content | boolean,
**Default:** true | | No |
| provider | string | | Yes |
| urls | [ string ] | | Yes |
@@ -17669,7 +16487,7 @@ in form definiton, or a variable while the workflow is running.
| ---- | ---- | ----------- | -------- |
| keyword_setting | [WeightKeywordSetting](#weightkeywordsetting) | | No |
| vector_setting | [WeightVectorSetting](#weightvectorsetting) | | No |
-| weight_type | string | *Enum:* `"customized"`, `"keyword_first"`, `"semantic_first"` | No |
+| weight_type | string | | No |
#### WeightVectorSetting
@@ -17740,14 +16558,14 @@ How a workflow node is bound to an Agent.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| created_at__after | dateTime | Filter logs created after this timestamp | No |
-| created_at__before | dateTime | Filter logs created before this timestamp | No |
+| created_at__after | string | Filter logs created after this timestamp | No |
+| created_at__before | string | Filter logs created before this timestamp | No |
| created_by_account | string | Filter by account | No |
| created_by_end_user_session_id | string | Filter by end user session ID | No |
| detail | boolean | Whether to return detailed logs | No |
| keyword | string | Search keyword for filtering logs | No |
-| limit | integer | Number of items per page (1-100) | No |
-| page | integer | Page number (1-99999) | No |
+| limit | integer,
**Default:** 20 | Number of items per page (1-100) | No |
+| page | integer,
**Default:** 1 | Page number (1-99999) | No |
| status | [WorkflowExecutionStatus](#workflowexecutionstatus) | Execution status filter (succeeded, failed, stopped, partial-succeeded) | No |
#### WorkflowArchivedLogPaginationResponse
@@ -17966,8 +16784,8 @@ How a workflow node is bound to an Agent.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| limit | integer | Items per page | No |
-| page | integer | Page number | No |
+| limit | integer,
**Default:** 20 | Items per page | No |
+| page | integer,
**Default:** 1 | Page number | No |
#### WorkflowDraftVariableListWithoutValue
@@ -18039,16 +16857,16 @@ can reuse its existing handler.
| current_graph | object | Existing draft graph to refine (cmd+k `/refine`); omit for create-from-scratch | No |
| ideal_output | string | Optional sample output for grounding | No |
| instruction | string | Natural-language workflow description | Yes |
-| mode | string | Target app mode for the generated graph
*Enum:* `"advanced-chat"`, `"workflow"` | Yes |
+| mode | string,
**Available values:** "advanced-chat", "workflow" | Target app mode for the generated graph
*Enum:* `"advanced-chat"`, `"workflow"` | Yes |
| model_config | [ModelConfig](#modelconfig) | Model configuration | Yes |
#### WorkflowListQuery
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| limit | integer | | No |
+| limit | integer,
**Default:** 10 | | No |
| named_only | boolean | | No |
-| page | integer | | No |
+| page | integer,
**Default:** 1 | | No |
| user_id | string | | No |
#### WorkflowNodeJobConfig
@@ -18060,7 +16878,7 @@ can reuse its existing handler.
| metadata | [WorkflowNodeJobMetadata](#workflownodejobmetadata) | | No |
| mode | [WorkflowNodeJobMode](#workflownodejobmode) | | No |
| previous_node_output_refs | [ [WorkflowPreviousNodeOutputRef](#workflowpreviousnodeoutputref) ] | | No |
-| schema_version | integer | | No |
+| schema_version | integer,
**Default:** 1 | | No |
| workflow_prompt | string | | No |
#### WorkflowNodeJobMetadata
@@ -18137,10 +16955,10 @@ can reuse its existing handler.
| name | string | | No |
| node_id | string | | No |
| output | string | | No |
-| selector | [ ] | | No |
-| value_selector | [ ] | | No |
+| selector | [ string
integer
number
boolean ] | | No |
+| value_selector | [ string
integer
number
boolean ] | | No |
| variable | string | | No |
-| variable_selector | [ ] | | No |
+| variable_selector | [ string
integer
number
boolean ] | | No |
#### WorkflowResponse
@@ -18166,9 +16984,9 @@ can reuse its existing handler.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| status | string | Workflow run status filter
*Enum:* `"failed"`, `"partial-succeeded"`, `"running"`, `"stopped"`, `"succeeded"` | No |
+| status | string | Workflow run status filter | No |
| time_range | string | Filter by time range (optional): e.g., 7d (7 days), 4h (4 hours), 30m (30 minutes), 30s (30 seconds). Filters by created_at field. | No |
-| triggered_from | string | Filter by trigger source: debugging or app-run. Default: debugging
*Enum:* `"app-run"`, `"debugging"` | No |
+| triggered_from | string | Filter by trigger source: debugging or app-run. Default: debugging | No |
#### WorkflowRunCountResponse
@@ -18257,9 +17075,9 @@ can reuse its existing handler.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| last_id | string | Last run ID for pagination | No |
-| limit | integer | Number of items per page (1-100) | No |
-| status | string | Workflow run status filter
*Enum:* `"failed"`, `"partial-succeeded"`, `"running"`, `"stopped"`, `"succeeded"` | No |
-| triggered_from | string | Filter by trigger source: debugging or app-run. Default: debugging
*Enum:* `"app-run"`, `"debugging"` | No |
+| limit | integer,
**Default:** 20 | Number of items per page (1-100) | No |
+| status | string | Workflow run status filter | No |
+| triggered_from | string | Filter by trigger source: debugging or app-run. Default: debugging | No |
#### WorkflowRunNodeExecutionListResponse
@@ -18316,13 +17134,13 @@ Query parameters for workflow runs.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| last_id | string | | No |
-| limit | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
#### WorkflowRunRequest
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| files | [ ] | | No |
+| files | [ object ] | | No |
| inputs | object | | Yes |
#### WorkflowRunSnapshotView
@@ -18392,7 +17210,7 @@ Workflow tool configuration
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| created_at | dateTime | | No |
+| created_at | string | | No |
| icon | string | | Yes |
| id | string | | Yes |
| node_id | string | | Yes |
@@ -18400,7 +17218,7 @@ Workflow tool configuration
| status | string | | Yes |
| title | string | | Yes |
| trigger_type | string | | Yes |
-| updated_at | dateTime | | No |
+| updated_at | string | | No |
#### WorkflowUpdatePayload
@@ -18433,8 +17251,8 @@ Workflow tool configuration
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
#### WorkspacePermissionResponse
@@ -18488,7 +17306,7 @@ Workflow tool configuration
| model_provider_name | string | | No |
| summary_prompt | string | | No |
-## FastOpenAPI Preview (OpenAPI 3.0)
+## FastOpenAPI Preview (OpenAPI 3.1)
### Dify API (FastOpenAPI PoC)
FastOpenAPI proof of concept for Dify API
@@ -18620,7 +17438,7 @@ FastOpenAPI proof of concept for Dify API
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| email | string | Admin email address | Yes |
-| language | | Admin language | No |
+| language | string | Admin language | No |
| name | string | Admin name (max 30 characters) | Yes |
| password | string | Admin password | Yes |
@@ -18634,7 +17452,7 @@ FastOpenAPI proof of concept for Dify API
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| setup_at | | Setup completion time (ISO format) | No |
+| setup_at | string | Setup completion time (ISO format) | No |
| step | string,
**Available values:** "finished", "not_started" | Setup step status
*Enum:* `"finished"`, `"not_started"` | Yes |
###### VersionFeatures
diff --git a/api/openapi/markdown/openapi-swagger.md b/api/openapi/markdown/openapi-openapi.md
similarity index 66%
rename from api/openapi/markdown/openapi-swagger.md
rename to api/openapi/markdown/openapi-openapi.md
index 451be85a1c3..f0394f6cc56 100644
--- a/api/openapi/markdown/openapi-swagger.md
+++ b/api/openapi/markdown/openapi-openapi.md
@@ -3,523 +3,485 @@ User-scoped programmatic API (bearer auth)
## Version: 1.0
-### Security
-**Bearer**
-
-| apiKey | *API Key* |
-| ------ | --------- |
-| Description | Type: Bearer {your-api-key} |
-| In | header |
-| Name | Authorization |
+### Available authorizations
+#### Bearer (API Key Authentication)
+Type: Bearer {your-api-key}
+**Name:** Authorization
+**In:** header
---
## openapi
User-scoped operations
-### /_health
-
-#### GET
-##### Responses
+### [GET] /_health
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Health check | [HealthResponse](#healthresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Health check | **application/json**: [HealthResponse](#healthresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /_version
-
-#### GET
-##### Responses
+### [GET] /_version
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Server version | [ServerVersionResponse](#serverversionresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Server version | **application/json**: [ServerVersionResponse](#serverversionresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /account
-
-#### GET
-##### Responses
+### [GET] /account
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Account info | [AccountResponse](#accountresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Account info | **application/json**: [AccountResponse](#accountresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /account/sessions
-
-#### GET
-##### Parameters
+### [GET] /account/sessions
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| limit | query | | No | integer |
-| page | query | | No | integer |
+| limit | query | | No | integer,
**Default:** 100 |
+| page | query | | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Session list | [SessionListResponse](#sessionlistresponse) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Session list | **application/json**: [SessionListResponse](#sessionlistresponse)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /account/sessions/self
-
-#### DELETE
-##### Responses
+### [DELETE] /account/sessions/self
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Session revoked | [RevokeResponse](#revokeresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Session revoked | **application/json**: [RevokeResponse](#revokeresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /account/sessions/{session_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /account/sessions/{session_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| session_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Session revoked | [RevokeResponse](#revokeresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Session revoked | **application/json**: [RevokeResponse](#revokeresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /apps
-
-#### GET
-##### Parameters
+### [GET] /apps
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| limit | query | | No | integer |
+| limit | query | | No | integer,
**Default:** 20 |
| mode | query | | No | string |
| name | query | | No | string |
-| page | query | | No | integer |
+| page | query | | No | integer,
**Default:** 1 |
| tag | query | | No | string |
| workspace_id | query | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | App list | [AppListResponse](#applistresponse) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | App list | **application/json**: [AppListResponse](#applistresponse)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /apps/{app_id}/check-dependencies
-
-#### GET
-##### Parameters
+### [GET] /apps/{app_id}/check-dependencies
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Dependencies checked | [CheckDependenciesResult](#checkdependenciesresult) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Dependencies checked | **application/json**: [CheckDependenciesResult](#checkdependenciesresult)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /apps/{app_id}/describe
-
-#### GET
-##### Parameters
+### [GET] /apps/{app_id}/describe
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| app_id | path | | Yes | string |
| fields | query | | No | string |
+| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | App description | [AppDescribeResponse](#appdescriberesponse) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | App description | **application/json**: [AppDescribeResponse](#appdescriberesponse)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /apps/{app_id}/export
-
-#### GET
-##### Parameters
+### [GET] /apps/{app_id}/export
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| app_id | path | | Yes | string |
| include_secret | query | Include encrypted secret values in the exported DSL | No | boolean |
| workflow_id | query | Export a specific workflow version instead of the current draft | No | string |
+| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Export successful | [AppDslExportResponse](#appdslexportresponse) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
-
-### /apps/{app_id}/files/upload
-
-#### POST
-##### Description
+| 200 | Export successful | **application/json**: [AppDslExportResponse](#appdslexportresponse)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
+### [POST] /apps/{app_id}/files/upload
Upload a file to use as an input variable when running the app
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | File uploaded successfully | [FileResponse](#fileresponse) |
+| 201 | File uploaded successfully | **application/json**: [FileResponse](#fileresponse)
|
| 400 | Bad request — no file or filename missing | |
| 401 | Unauthorized — invalid or expired bearer token | |
| 413 | File too large | |
| 415 | Unsupported file type or blocked extension | |
-| default | Error | [ErrorBody](#errorbody) |
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /apps/{app_id}/form/human_input/{form_token}
-
-#### GET
-##### Parameters
+### [GET] /apps/{app_id}/form/human_input/{form_token}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| form_token | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Form definition |
-#### POST
-##### Parameters
+### [POST] /apps/{app_id}/form/human_input/{form_token}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| form_token | path | | Yes | string |
-| payload | body | | Yes | [HumanInputFormSubmitPayload](#humaninputformsubmitpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HumanInputFormSubmitPayload](#humaninputformsubmitpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Form submitted | [FormSubmitResponse](#formsubmitresponse) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Form submitted | **application/json**: [FormSubmitResponse](#formsubmitresponse)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /apps/{app_id}/run
-
-#### POST
-##### Parameters
+### [POST] /apps/{app_id}/run
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
-| payload | body | | Yes | [AppRunRequest](#apprunrequest) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AppRunRequest](#apprunrequest)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Run result (SSE stream) | |
-| 422 | Validation error | [ErrorBody](#errorbody) |
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
-### /apps/{app_id}/tasks/{task_id}/events
-
-#### GET
-##### Parameters
+### [GET] /apps/{app_id}/tasks/{task_id}/events
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | SSE event stream |
-### /apps/{app_id}/tasks/{task_id}/stop
-
-#### POST
-##### Parameters
+### [POST] /apps/{app_id}/tasks/{task_id}/stop
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| app_id | path | | Yes | string |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Task stopped | [TaskStopResponse](#taskstopresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Task stopped | **application/json**: [TaskStopResponse](#taskstopresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /oauth/device/approve
+### [POST] /oauth/device/approve
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DeviceMutateRequest](#devicemutaterequest)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DeviceMutateRequest](#devicemutaterequest) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Approved | [DeviceMutateResponse](#devicemutateresponse) |
+| 200 | Approved | **application/json**: [DeviceMutateResponse](#devicemutateresponse)
|
-### /oauth/device/code
+### [POST] /oauth/device/code
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DeviceCodeRequest](#devicecoderequest)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DeviceCodeRequest](#devicecoderequest) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Device code created | [DeviceCodeResponse](#devicecoderesponse) |
+| 200 | Device code created | **application/json**: [DeviceCodeResponse](#devicecoderesponse)
|
-### /oauth/device/deny
+### [POST] /oauth/device/deny
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DeviceMutateRequest](#devicemutaterequest)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DeviceMutateRequest](#devicemutaterequest) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Denied | [DeviceMutateResponse](#devicemutateresponse) |
+| 200 | Denied | **application/json**: [DeviceMutateResponse](#devicemutateresponse)
|
-### /oauth/device/lookup
-
-#### GET
-##### Parameters
+### [GET] /oauth/device/lookup
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| user_code | query | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Device lookup result | [DeviceLookupResponse](#devicelookupresponse) |
+| 200 | Device lookup result | **application/json**: [DeviceLookupResponse](#devicelookupresponse)
|
-### /oauth/device/token
+### [POST] /oauth/device/token
+#### Request Body
-#### POST
-##### Parameters
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DevicePollRequest](#devicepollrequest)
|
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DevicePollRequest](#devicepollrequest) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /permitted-external-apps
-
-#### GET
-##### Parameters
+### [GET] /permitted-external-apps
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| limit | query | | No | integer |
+| limit | query | | No | integer,
**Default:** 20 |
| mode | query | | No | string |
| name | query | | No | string |
-| page | query | | No | integer |
+| page | query | | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Permitted external apps list | [PermittedExternalAppsListResponse](#permittedexternalappslistresponse) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Permitted external apps list | **application/json**: [PermittedExternalAppsListResponse](#permittedexternalappslistresponse)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /workspaces
-
-#### GET
-##### Responses
+### [GET] /workspaces
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workspace list | [WorkspaceListResponse](#workspacelistresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Workspace list | **application/json**: [WorkspaceListResponse](#workspacelistresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /workspaces/{workspace_id}
-
-#### GET
-##### Parameters
+### [GET] /workspaces/{workspace_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| workspace_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workspace detail | [WorkspaceDetailResponse](#workspacedetailresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Workspace detail | **application/json**: [WorkspaceDetailResponse](#workspacedetailresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /workspaces/{workspace_id}/apps/imports
-
-#### POST
-##### Parameters
+### [POST] /workspaces/{workspace_id}/apps/imports
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| workspace_id | path | | Yes | string |
-| payload | body | | Yes | [AppDslImportPayload](#appdslimportpayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AppDslImportPayload](#appdslimportpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Import completed | [Import](#import) |
-| 202 | Import pending confirmation | [Import](#import) |
-| 400 | Import failed | [Import](#import) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Import completed | **application/json**: [Import](#import)
|
+| 202 | Import pending confirmation | **application/json**: [Import](#import)
|
+| 400 | Import failed | **application/json**: [Import](#import)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /workspaces/{workspace_id}/apps/imports/{import_id}/confirm
-
-#### POST
-##### Parameters
+### [POST] /workspaces/{workspace_id}/apps/imports/{import_id}/confirm
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| import_id | path | | Yes | string |
| workspace_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Import confirmed | [Import](#import) |
-| 400 | Import failed | [Import](#import) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Import confirmed | **application/json**: [Import](#import)
|
+| 400 | Import failed | **application/json**: [Import](#import)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /workspaces/{workspace_id}/members
+### [GET] /workspaces/{workspace_id}/members
+#### Parameters
-#### GET
-##### Parameters
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
+| workspace_id | path | | Yes | string |
+
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 200 | Member list | **application/json**: [MemberListResponse](#memberlistresponse)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
+
+### [POST] /workspaces/{workspace_id}/members
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| workspace_id | path | | Yes | string |
-| limit | query | | No | integer |
-| page | query | | No | integer |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MemberInvitePayload](#memberinvitepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Member list | [MemberListResponse](#memberlistresponse) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
+| 201 | Member invited | **application/json**: [MemberInviteResponse](#memberinviteresponse)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-#### POST
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| workspace_id | path | | Yes | string |
-| payload | body | | Yes | [MemberInvitePayload](#memberinvitepayload) |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 201 | Member invited | [MemberInviteResponse](#memberinviteresponse) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
-
-### /workspaces/{workspace_id}/members/{member_id}
-
-#### DELETE
-##### Parameters
+### [DELETE] /workspaces/{workspace_id}/members/{member_id}
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| member_id | path | | Yes | string |
| workspace_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Member removed | [MemberActionResponse](#memberactionresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Member removed | **application/json**: [MemberActionResponse](#memberactionresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /workspaces/{workspace_id}/members/{member_id}/role
-
-#### PUT
-##### Parameters
+### [PUT] /workspaces/{workspace_id}/members/{member_id}/role
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| member_id | path | | Yes | string |
| workspace_id | path | | Yes | string |
-| payload | body | | Yes | [MemberRoleUpdatePayload](#memberroleupdatepayload) |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MemberRoleUpdatePayload](#memberroleupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Role updated | [MemberActionResponse](#memberactionresponse) |
-| 422 | Validation error | [ErrorBody](#errorbody) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Role updated | **application/json**: [MemberActionResponse](#memberactionresponse)
|
+| 422 | Validation error | **application/json**: [ErrorBody](#errorbody)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
-### /workspaces/{workspace_id}/switch
-
-#### POST
-##### Parameters
+### [POST] /workspaces/{workspace_id}/switch
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| workspace_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workspace detail | [WorkspaceDetailResponse](#workspacedetailresponse) |
-| default | Error | [ErrorBody](#errorbody) |
+| 200 | Workspace detail | **application/json**: [WorkspaceDetailResponse](#workspacedetailresponse)
|
+| default | Error | **application/json**: [ErrorBody](#errorbody)
|
---
-### Models
+### Schemas
#### AccountPayload
@@ -538,7 +500,7 @@ Upload a file to use as an input variable when running the app
| subject_email | string | | No |
| subject_issuer | string | | No |
| subject_type | string | | Yes |
-| workspaces | [ [WorkspacePayload](#workspacepayload) ] | | No |
+| workspaces | [ [WorkspacePayload](#workspacepayload) ],
**Default:** | | No |
#### AppDescribeInfo
@@ -551,7 +513,7 @@ Upload a file to use as an input variable when running the app
| mode | string | | Yes |
| name | string | | Yes |
| service_api_enabled | boolean | | Yes |
-| tags | [ [TagItem](#tagitem) ] | | No |
+| tags | [ [TagItem](#tagitem) ],
**Default:** | | No |
| updated_at | string | | No |
#### AppDescribeQuery
@@ -600,7 +562,7 @@ Request body for POST /workspaces//apps/imports.
| icon | string | | No |
| icon_background | string | | No |
| icon_type | string | | No |
-| mode | string | Import mode: yaml-content or yaml-url
*Enum:* `"yaml-content"`, `"yaml-url"` | Yes |
+| mode | string,
**Available values:** "yaml-content", "yaml-url" | Import mode: yaml-content or yaml-url
*Enum:* `"yaml-content"`, `"yaml-url"` | Yes |
| name | string | Override the app name from the DSL | No |
| yaml_content | string | Inline YAML DSL string (required when mode is yaml-content) | No |
| yaml_url | string | Remote URL to fetch YAML from (required when mode is yaml-url) | No |
@@ -614,7 +576,7 @@ Request body for POST /workspaces//apps/imports.
| id | string | | Yes |
| mode | string | | Yes |
| name | string | | Yes |
-| tags | [ [TagItem](#tagitem) ] | | No |
+| tags | [ [TagItem](#tagitem) ],
**Default:** | | No |
#### AppListQuery
@@ -622,10 +584,10 @@ mode is a closed enum.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| limit | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
| mode | [AppMode](#appmode) | | No |
| name | string | | No |
-| page | integer | | No |
+| page | integer,
**Default:** 1 | | No |
| tag | string | | No |
| workspace_id | string | | Yes |
@@ -648,7 +610,7 @@ mode is a closed enum.
| id | string | | Yes |
| mode | [AppMode](#appmode) | | Yes |
| name | string | | Yes |
-| tags | [ [TagItem](#tagitem) ] | | No |
+| tags | [ [TagItem](#tagitem) ],
**Default:** | | No |
| updated_at | string | | No |
| workspace_id | string | | No |
| workspace_name | string | | No |
@@ -663,7 +625,7 @@ mode is a closed enum.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| auto_generate_name | boolean | | No |
+| auto_generate_name | boolean,
**Default:** true | | No |
| conversation_id | string | | No |
| files | [ object ] | | No |
| inputs | object | | Yes |
@@ -745,7 +707,7 @@ future server adds a code. Formatter tests pin emitted values to the enum.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| loc | [ ] | | No |
+| loc | [ ],
**Default:** | | No |
| msg | string | | Yes |
| type | string | | Yes |
@@ -808,7 +770,7 @@ Liveness payload for `GET /openapi/v1/_health` — no auth required.
| ---- | ---- | ----------- | -------- |
| app_id | string | | No |
| app_mode | string | | No |
-| current_dsl_version | string | | No |
+| current_dsl_version | string,
**Default:** 0.6.0 | | No |
| error | string | | No |
| id | string | | Yes |
| imported_dsl_version | string | | No |
@@ -837,14 +799,14 @@ Liveness payload for `GET /openapi/v1/_health` — no auth required.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| result | string | | No |
+| result | string,
**Default:** success | | No |
#### MemberInvitePayload
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| email | string | | Yes |
-| role | string | *Enum:* `"admin"`, `"normal"` | Yes |
+| role | string,
**Available values:** "admin", "normal" | *Enum:* `"admin"`, `"normal"` | Yes |
#### MemberInviteResponse
@@ -853,7 +815,7 @@ Liveness payload for `GET /openapi/v1/_health` — no auth required.
| email | string | | Yes |
| invite_url | string | | Yes |
| member_id | string | | Yes |
-| result | string | | No |
+| result | string,
**Default:** success | | No |
| role | string | | Yes |
| tenant_id | string | | Yes |
@@ -863,8 +825,8 @@ Strict (extra='forbid').
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
#### MemberListResponse
@@ -891,13 +853,13 @@ Strict (extra='forbid').
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| role | string | *Enum:* `"admin"`, `"normal"` | Yes |
+| role | string,
**Available values:** "admin", "normal" | *Enum:* `"admin"`, `"normal"` | Yes |
#### MessageMetadata
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| retriever_resources | [ object ] | | No |
+| retriever_resources | [ object ],
**Default:** | | No |
| usage | [UsageInfo](#usageinfo) | | No |
#### OpenApiErrorCode
@@ -919,10 +881,10 @@ Strict (extra='forbid').
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| limit | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
| mode | [AppMode](#appmode) | | No |
| name | string | | No |
-| page | integer | | No |
+| page | integer,
**Default:** 1 | | No |
#### PermittedExternalAppsListResponse
@@ -954,7 +916,7 @@ Meta endpoint payload for `GET /openapi/v1/_version` — no auth required.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| edition | string | *Enum:* `"CLOUD"`, `"SELF_HOSTED"` | Yes |
+| edition | string,
**Available values:** "CLOUD", "SELF_HOSTED" | *Enum:* `"CLOUD"`, `"SELF_HOSTED"` | Yes |
| version | string | | Yes |
#### SessionListQuery
@@ -963,8 +925,8 @@ Pagination for GET /account/sessions. Strict (extra='forbid').
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 100 | | No |
+| page | integer,
**Default:** 1 | | No |
#### SessionListResponse
diff --git a/api/openapi/markdown/service-swagger.md b/api/openapi/markdown/service-openapi.md
similarity index 74%
rename from api/openapi/markdown/service-swagger.md
rename to api/openapi/markdown/service-openapi.md
index f32e998bd1c..47350fa8479 100644
--- a/api/openapi/markdown/service-swagger.md
+++ b/api/openapi/markdown/service-openapi.md
@@ -3,97 +3,76 @@ API for application services
## Version: 1.0
-### Security
-**Bearer**
-
-| apiKey | *API Key* |
-| ------ | --------- |
-| Description | Type: Bearer {your-api-key} |
-| In | header |
-| Name | Authorization |
+### Available authorizations
+#### Bearer (API Key Authentication)
+Type: Bearer {your-api-key}
+**Name:** Authorization
+**In:** header
---
## service_api
Service operations
-### /
-
-#### GET
-##### Responses
+### [GET] /
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [IndexInfoResponse](#indexinforesponse) |
+| 200 | Success | **application/json**: [IndexInfoResponse](#indexinforesponse)
|
-### /app/feedbacks
-
-#### GET
-##### Summary
-
-Get all feedbacks for the application
-
-##### Description
+### [GET] /app/feedbacks
+**Get all feedbacks for the application**
Get all feedbacks for the application
Returns paginated list of all feedback submitted for messages in this app.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [FeedbackListQuery](#feedbacklistquery) |
+| limit | query | Number of feedbacks per page | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Feedbacks retrieved successfully |
| 401 | Unauthorized - invalid API token |
-### /apps/annotation-reply/{action}
+### [POST] /apps/annotation-reply/{action}
+**Enable or disable annotation reply feature**
-#### POST
-##### Summary
-
-Enable or disable annotation reply feature
-
-##### Description
-
-Enable or disable annotation reply feature
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AnnotationReplyActionPayload](#annotationreplyactionpayload) |
| action | path | Action to perform: 'enable' or 'disable' | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AnnotationReplyActionPayload](#annotationreplyactionpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Action completed successfully |
| 401 | Unauthorized - invalid API token |
-### /apps/annotation-reply/{action}/status/{job_id}
+### [GET] /apps/annotation-reply/{action}/status/{job_id}
+**Get the status of an annotation reply action job**
-#### GET
-##### Summary
-
-Get the status of an annotation reply action job
-
-##### Description
-
-Get the status of an annotation reply action job
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| action | path | Action type | Yes | string |
| job_id | path | Job ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -101,72 +80,50 @@ Get the status of an annotation reply action job
| 401 | Unauthorized - invalid API token |
| 404 | Job not found |
-### /apps/annotations
+### [GET] /apps/annotations
+**List annotations for the application**
-#### GET
-##### Summary
-
-List annotations for the application
-
-##### Description
-
-List annotations for the application
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| keyword | query | Keyword to search annotations | No | string |
-| limit | query | Number of annotations per page | No | integer |
-| page | query | Page number | No | integer |
+| limit | query | Number of annotations per page | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Annotations retrieved successfully | [AnnotationList](#annotationlist) |
+| 200 | Annotations retrieved successfully | **application/json**: [AnnotationList](#annotationlist)
|
| 401 | Unauthorized - invalid API token | |
-#### POST
-##### Summary
+### [POST] /apps/annotations
+**Create a new annotation**
-Create a new annotation
+#### Request Body
-##### Description
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AnnotationCreatePayload](#annotationcreatepayload)
|
-Create a new annotation
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AnnotationCreatePayload](#annotationcreatepayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Annotation created successfully | [Annotation](#annotation) |
+| 201 | Annotation created successfully | **application/json**: [Annotation](#annotation)
|
| 401 | Unauthorized - invalid API token | |
-### /apps/annotations/{annotation_id}
+### [DELETE] /apps/annotations/{annotation_id}
+**Delete an annotation**
-#### DELETE
-##### Summary
-
-Delete an annotation
-
-##### Description
-
-Delete an annotation
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| annotation_id | path | Annotation ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -175,44 +132,37 @@ Delete an annotation
| 403 | Forbidden - insufficient permissions |
| 404 | Annotation not found |
-#### PUT
-##### Summary
+### [PUT] /apps/annotations/{annotation_id}
+**Update an existing annotation**
-Update an existing annotation
-
-##### Description
-
-Update an existing annotation
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [AnnotationCreatePayload](#annotationcreatepayload) |
| annotation_id | path | Annotation ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [AnnotationCreatePayload](#annotationcreatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Annotation updated successfully | [Annotation](#annotation) |
+| 200 | Annotation updated successfully | **application/json**: [Annotation](#annotation)
|
| 401 | Unauthorized - invalid API token | |
| 403 | Forbidden - insufficient permissions | |
| 404 | Annotation not found | |
-### /audio-to-text
-
-#### POST
-##### Summary
-
-Convert audio to text using speech-to-text
-
-##### Description
+### [POST] /audio-to-text
+**Convert audio to text using speech-to-text**
Convert audio to text using speech-to-text
Accepts an audio file upload and returns the transcribed text.
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -223,26 +173,20 @@ Accepts an audio file upload and returns the transcribed text.
| 415 | Unsupported audio type |
| 500 | Internal server error |
-### /chat-messages
-
-#### POST
-##### Summary
-
-Send a message in a chat conversation
-
-##### Description
+### [POST] /chat-messages
+**Send a message in a chat conversation**
Send a message in a chat conversation
This endpoint handles chat messages for chat, agent chat, and advanced chat applications.
Supports conversation management and both blocking and streaming response modes.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChatRequestPayload](#chatrequestpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChatRequestPayload](#chatrequestpayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -253,51 +197,37 @@ Supports conversation management and both blocking and streaming response modes.
| 429 | Rate limit exceeded |
| 500 | Internal server error |
-### /chat-messages/{task_id}/stop
+### [POST] /chat-messages/{task_id}/stop
+**Stop a running chat message generation**
-#### POST
-##### Summary
-
-Stop a running chat message generation
-
-##### Description
-
-Stop a running chat message generation
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| task_id | path | The ID of the task to stop | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Task stopped successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Task stopped successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Task not found | |
-### /completion-messages
-
-#### POST
-##### Summary
-
-Create a completion for the given prompt
-
-##### Description
+### [POST] /completion-messages
+**Create a completion for the given prompt**
Create a completion for the given prompt
This endpoint generates a completion based on the provided inputs and query.
Supports both blocking and streaming response modes.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [CompletionRequestPayload](#completionrequestpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CompletionRequestPayload](#completionrequestpayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -307,50 +237,38 @@ Supports both blocking and streaming response modes.
| 404 | Conversation not found |
| 500 | Internal server error |
-### /completion-messages/{task_id}/stop
+### [POST] /completion-messages/{task_id}/stop
+**Stop a running completion task**
-#### POST
-##### Summary
-
-Stop a running completion task
-
-##### Description
-
-Stop a running completion task
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| task_id | path | The ID of the task to stop | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Task stopped successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Task stopped successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Task not found | |
-### /conversations
-
-#### GET
-##### Summary
-
-List all conversations for the current user
-
-##### Description
+### [GET] /conversations
+**List all conversations for the current user**
List all conversations for the current user
Supports pagination using last_id and limit parameters.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ConversationListQuery](#conversationlistquery) |
+| last_id | query | Last conversation ID for pagination | No | |
+| limit | query | Number of conversations to return | No | integer,
**Default:** 20 |
+| sort_by | query | Sort order for conversations | No | string,
**Available values:** "-created_at", "-updated_at", "created_at", "updated_at",
**Default:** -updated_at |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -358,24 +276,16 @@ Supports pagination using last_id and limit parameters.
| 401 | Unauthorized - invalid API token |
| 404 | Last conversation not found |
-### /conversations/{c_id}
+### [DELETE] /conversations/{c_id}
+**Delete a specific conversation**
-#### DELETE
-##### Summary
-
-Delete a specific conversation
-
-##### Description
-
-Delete a specific conversation
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| c_id | path | Conversation ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -383,25 +293,22 @@ Delete a specific conversation
| 401 | Unauthorized - invalid API token |
| 404 | Conversation not found |
-### /conversations/{c_id}/name
+### [POST] /conversations/{c_id}/name
+**Rename a conversation or auto-generate a name**
-#### POST
-##### Summary
-
-Rename a conversation or auto-generate a name
-
-##### Description
-
-Rename a conversation or auto-generate a name
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ConversationRenamePayload](#conversationrenamepayload) |
| c_id | path | Conversation ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ConversationRenamePayload](#conversationrenamepayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -409,127 +316,106 @@ Rename a conversation or auto-generate a name
| 401 | Unauthorized - invalid API token |
| 404 | Conversation not found |
-### /conversations/{c_id}/variables
-
-#### GET
-##### Summary
-
-List all variables for a conversation
-
-##### Description
+### [GET] /conversations/{c_id}/variables
+**List all variables for a conversation**
List all variables for a conversation
Conversational variables are only available for chat applications.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ConversationVariablesQuery](#conversationvariablesquery) |
| c_id | path | Conversation ID | Yes | string |
+| last_id | query | Last variable ID for pagination | No | |
+| limit | query | Number of variables to return | No | integer,
**Default:** 20 |
+| variable_name | query | Filter variables by name | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Variables retrieved successfully | [ConversationVariableInfiniteScrollPaginationResponse](#conversationvariableinfinitescrollpaginationresponse) |
+| 200 | Variables retrieved successfully | **application/json**: [ConversationVariableInfiniteScrollPaginationResponse](#conversationvariableinfinitescrollpaginationresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Conversation not found | |
-### /conversations/{c_id}/variables/{variable_id}
-
-#### PUT
-##### Summary
-
-Update a conversation variable's value
-
-##### Description
+### [PUT] /conversations/{c_id}/variables/{variable_id}
+**Update a conversation variable's value**
Update a conversation variable's value
Allows updating the value of a specific conversation variable.
The value must match the variable's expected type.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ConversationVariableUpdatePayload](#conversationvariableupdatepayload) |
| c_id | path | Conversation ID | Yes | string |
| variable_id | path | Variable ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ConversationVariableUpdatePayload](#conversationvariableupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Variable updated successfully | [ConversationVariableResponse](#conversationvariableresponse) |
+| 200 | Variable updated successfully | **application/json**: [ConversationVariableResponse](#conversationvariableresponse)
|
| 400 | Bad request - type mismatch | |
| 401 | Unauthorized - invalid API token | |
| 404 | Conversation or variable not found | |
-### /datasets
-
-#### GET
-##### Summary
-
-Resource for getting datasets
-
-##### Description
+### [GET] /datasets
+**Resource for getting datasets**
List all datasets
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| include_all | query | Include all datasets | No | boolean |
| keyword | query | Search keyword | No | string |
-| limit | query | Number of items per page | No | integer |
-| page | query | Page number | No | integer |
+| limit | query | Number of items per page | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
| tag_ids | query | Filter by tag IDs | No | [ string ] |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Datasets retrieved successfully | [DatasetListResponse](#datasetlistresponse) |
+| 200 | Datasets retrieved successfully | **application/json**: [DatasetListResponse](#datasetlistresponse)
|
| 401 | Unauthorized - invalid API token | |
-#### POST
-##### Summary
-
-Resource for creating datasets
-
-##### Description
+### [POST] /datasets
+**Resource for creating datasets**
Create a new dataset
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DatasetCreatePayload](#datasetcreatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasetCreatePayload](#datasetcreatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Dataset created successfully | [DatasetDetailResponse](#datasetdetailresponse) |
+| 200 | Dataset created successfully | **application/json**: [DatasetDetailResponse](#datasetdetailresponse)
|
| 400 | Bad request - invalid parameters | |
| 401 | Unauthorized - invalid API token | |
-### /datasets/pipeline/file-upload
-
-#### POST
-##### Summary
-
-Upload a file for use in conversations
-
-##### Description
+### [POST] /datasets/pipeline/file-upload
+**Upload a file for use in conversations**
Upload a file to a knowledgebase pipeline
Accepts a single file upload via multipart/form-data.
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -539,24 +425,16 @@ Accepts a single file upload via multipart/form-data.
| 413 | File too large |
| 415 | Unsupported file type |
-### /datasets/tags
+### [DELETE] /datasets/tags
+**Delete a knowledge type tag**
-#### DELETE
-##### Summary
+#### Request Body
-Delete a knowledge type tag
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TagDeletePayload](#tagdeletepayload)
|
-##### Description
-
-Delete a knowledge type tag
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TagDeletePayload](#tagdeletepayload) |
-
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -564,78 +442,60 @@ Delete a knowledge type tag
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
-#### GET
-##### Summary
+### [GET] /datasets/tags
+**Get all knowledge type tags**
-Get all knowledge type tags
-
-##### Description
-
-Get all knowledge type tags
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Tags retrieved successfully | [KnowledgeTagListResponse](#knowledgetaglistresponse) |
+| 200 | Tags retrieved successfully | **application/json**: [KnowledgeTagListResponse](#knowledgetaglistresponse)
|
| 401 | Unauthorized - invalid API token | |
-#### PATCH
-##### Description
-
+### [PATCH] /datasets/tags
Update a knowledge type tag
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TagUpdatePayload](#tagupdatepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TagUpdatePayload](#tagupdatepayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Tag updated successfully | [KnowledgeTagResponse](#knowledgetagresponse) |
+| 200 | Tag updated successfully | **application/json**: [KnowledgeTagResponse](#knowledgetagresponse)
|
| 401 | Unauthorized - invalid API token | |
| 403 | Forbidden - insufficient permissions | |
-#### POST
-##### Summary
+### [POST] /datasets/tags
+**Add a knowledge type tag**
-Add a knowledge type tag
+#### Request Body
-##### Description
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TagCreatePayload](#tagcreatepayload)
|
-Add a knowledge type tag
-
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TagCreatePayload](#tagcreatepayload) |
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Tag created successfully | [KnowledgeTagResponse](#knowledgetagresponse) |
+| 200 | Tag created successfully | **application/json**: [KnowledgeTagResponse](#knowledgetagresponse)
|
| 401 | Unauthorized - invalid API token | |
| 403 | Forbidden - insufficient permissions | |
-### /datasets/tags/binding
-
-#### POST
-##### Description
-
+### [POST] /datasets/tags/binding
Bind tags to a dataset
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TagBindingPayload](#tagbindingpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TagBindingPayload](#tagbindingpayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -643,20 +503,16 @@ Bind tags to a dataset
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
-### /datasets/tags/unbinding
-
-#### POST
-##### Description
-
+### [POST] /datasets/tags/unbinding
Unbind tags from a dataset
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TagUnbindingPayload](#tagunbindingpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TagUnbindingPayload](#tagunbindingpayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -664,14 +520,8 @@ Unbind tags from a dataset
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
-### /datasets/{dataset_id}
-
-#### DELETE
-##### Summary
-
-Deletes a dataset given its ID
-
-##### Description
+### [DELETE] /datasets/{dataset_id}
+**Deletes a dataset given its ID**
Delete a dataset
Args:
@@ -686,13 +536,13 @@ Returns:
Raises:
NotFound: If the dataset with the given ID does not exist.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -701,178 +551,180 @@ Raises:
| 404 | Dataset not found |
| 409 | Conflict - dataset is in use |
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}
Get a specific dataset by ID
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Dataset retrieved successfully | [DatasetDetailWithPartialMembersResponse](#datasetdetailwithpartialmembersresponse) |
+| 200 | Dataset retrieved successfully | **application/json**: [DatasetDetailWithPartialMembersResponse](#datasetdetailwithpartialmembersresponse)
|
| 401 | Unauthorized - invalid API token | |
| 403 | Forbidden - insufficient permissions | |
| 404 | Dataset not found | |
-#### PATCH
-##### Description
-
+### [PATCH] /datasets/{dataset_id}
Update an existing dataset
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DatasetUpdatePayload](#datasetupdatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DatasetUpdatePayload](#datasetupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Dataset updated successfully | [DatasetDetailWithPartialMembersResponse](#datasetdetailwithpartialmembersresponse) |
+| 200 | Dataset updated successfully | **application/json**: [DatasetDetailWithPartialMembersResponse](#datasetdetailwithpartialmembersresponse)
|
| 401 | Unauthorized - invalid API token | |
| 403 | Forbidden - insufficient permissions | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/document/create-by-file
-
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/document/create-by-file
Create a new document by uploading a file
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| data | formData | Optional JSON string with document creation settings. | No | string |
-| file | formData | Document file to upload. | Yes | file |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **multipart/form-data**: { **"data"**: string, **"file"**: binary }
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document created successfully | [DocumentAndBatchResponse](#documentandbatchresponse) |
+| 200 | Document created successfully | **application/json**: [DocumentAndBatchResponse](#documentandbatchresponse)
|
| 400 | Bad request - invalid file or parameters | |
| 401 | Unauthorized - invalid API token | |
-### /datasets/{dataset_id}/document/create-by-text
-
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/document/create-by-text
Create a new document by providing text content
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DocumentTextCreatePayload](#documenttextcreatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DocumentTextCreatePayload](#documenttextcreatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document created successfully | [DocumentAndBatchResponse](#documentandbatchresponse) |
+| 200 | Document created successfully | **application/json**: [DocumentAndBatchResponse](#documentandbatchresponse)
|
| 400 | Bad request - invalid parameters | |
| 401 | Unauthorized - invalid API token | |
-### /datasets/{dataset_id}/document/create_by_file
-
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/document/create_by_file
Create a new document by uploading a file
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| data | formData | Optional JSON string with document creation settings. | No | string |
-| file | formData | Document file to upload. | Yes | file |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **multipart/form-data**: { **"data"**: string, **"file"**: binary }
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document created successfully | [DocumentAndBatchResponse](#documentandbatchresponse) |
+| 200 | Document created successfully | **application/json**: [DocumentAndBatchResponse](#documentandbatchresponse)
|
| 400 | Bad request - invalid file or parameters | |
| 401 | Unauthorized - invalid API token | |
-### /datasets/{dataset_id}/document/create_by_text
+### ~~[POST] /datasets/{dataset_id}/document/create_by_text~~
-#### POST
***DEPRECATED***
-##### Description
Deprecated legacy alias for creating a new document by providing text content. Use /datasets/{dataset_id}/document/create-by-text instead.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DocumentTextCreatePayload](#documenttextcreatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DocumentTextCreatePayload](#documenttextcreatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document created successfully | [DocumentAndBatchResponse](#documentandbatchresponse) |
+| 200 | Document created successfully | **application/json**: [DocumentAndBatchResponse](#documentandbatchresponse)
|
| 400 | Bad request - invalid parameters | |
| 401 | Unauthorized - invalid API token | |
-### /datasets/{dataset_id}/documents
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents
List all documents in a dataset
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| keyword | query | Search keyword | No | string |
-| limit | query | Number of items per page | No | integer |
-| page | query | Page number | No | integer |
+| limit | query | Number of items per page | No | integer,
**Default:** 20 |
+| page | query | Page number | No | integer,
**Default:** 1 |
| status | query | Document status filter | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Documents retrieved successfully | [DocumentListResponse](#documentlistresponse) |
+| 200 | Documents retrieved successfully | **application/json**: [DocumentListResponse](#documentlistresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/documents/download-zip
-
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/documents/download-zip
Download selected uploaded documents as a single ZIP archive
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DocumentBatchDownloadZipPayload](#documentbatchdownloadzippayload) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DocumentBatchDownloadZipPayload](#documentbatchdownloadzippayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -881,40 +733,31 @@ Download selected uploaded documents as a single ZIP archive
| 403 | Forbidden - insufficient permissions |
| 404 | Document or dataset not found |
-### /datasets/{dataset_id}/documents/metadata
+### [POST] /datasets/{dataset_id}/documents/metadata
+**Update metadata for multiple documents**
-#### POST
-##### Summary
-
-Update metadata for multiple documents
-
-##### Description
-
-Update metadata for multiple documents
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MetadataOperationData](#metadataoperationdata) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MetadataOperationData](#metadataoperationdata)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Documents metadata updated successfully | [DatasetMetadataActionResponse](#datasetmetadataactionresponse) |
+| 200 | Documents metadata updated successfully | **application/json**: [DatasetMetadataActionResponse](#datasetmetadataactionresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/documents/status/{action}
-
-#### PATCH
-##### Summary
-
-Batch update document status
-
-##### Description
+### [PATCH] /datasets/{dataset_id}/documents/status/{action}
+**Batch update document status**
Batch update document status
Args:
@@ -931,64 +774,54 @@ Raises:
Forbidden: If the user does not have permission.
InvalidActionError: If the action is invalid or cannot be performed.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| action | path | Action to perform: 'enable', 'disable', 'archive', or 'un_archive' | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document status updated successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Document status updated successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 400 | Bad request - invalid action | |
| 401 | Unauthorized - invalid API token | |
| 403 | Forbidden - insufficient permissions | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/documents/{batch}/indexing-status
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents/{batch}/indexing-status
Get indexing status for documents in a batch
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| batch | path | Batch ID | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Indexing status retrieved successfully | [DocumentStatusListResponse](#documentstatuslistresponse) |
+| 200 | Indexing status retrieved successfully | **application/json**: [DocumentStatusListResponse](#documentstatuslistresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset or documents not found | |
-### /datasets/{dataset_id}/documents/{document_id}
-
-#### DELETE
-##### Summary
-
-Delete document
-
-##### Description
+### [DELETE] /datasets/{dataset_id}/documents/{document_id}
+**Delete document**
Delete a document
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -997,19 +830,17 @@ Delete a document
| 403 | Forbidden - document is archived |
| 404 | Document not found |
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents/{document_id}
Get a specific document by ID
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1018,107 +849,100 @@ Get a specific document by ID
| 403 | Forbidden - insufficient permissions |
| 404 | Document not found |
-#### PATCH
-##### Description
-
+### [PATCH] /datasets/{dataset_id}/documents/{document_id}
Update an existing document by uploading a file
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| data | formData | Optional JSON string with document update settings. | No | string |
-| file | formData | Replacement document file. | No | file |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| No | **multipart/form-data**: { **"data"**: string, **"file"**: binary }
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document updated successfully | [DocumentAndBatchResponse](#documentandbatchresponse) |
+| 200 | Document updated successfully | **application/json**: [DocumentAndBatchResponse](#documentandbatchresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Document not found | |
-### /datasets/{dataset_id}/documents/{document_id}/download
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents/{document_id}/download
Get a signed download URL for a document's original uploaded file
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Download URL generated successfully | [UrlResponse](#urlresponse) |
+| 200 | Download URL generated successfully | **application/json**: [UrlResponse](#urlresponse)
|
| 401 | Unauthorized - invalid API token | |
| 403 | Forbidden - insufficient permissions | |
| 404 | Document or upload file not found | |
-### /datasets/{dataset_id}/documents/{document_id}/segments
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents/{document_id}/segments
List segments in a document
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| keyword | query | | No | string |
-| limit | query | | No | integer |
-| page | query | | No | integer |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
| status | query | | No | [ string ] |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Segments retrieved successfully | [SegmentListResponse](#segmentlistresponse) |
+| 200 | Segments retrieved successfully | **application/json**: [SegmentListResponse](#segmentlistresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset or document not found | |
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/documents/{document_id}/segments
Create segments in a document
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SegmentCreatePayload](#segmentcreatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SegmentCreatePayload](#segmentcreatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Segments created successfully | [SegmentCreateListResponse](#segmentcreatelistresponse) |
+| 200 | Segments created successfully | **application/json**: [SegmentCreateListResponse](#segmentcreatelistresponse)
|
| 400 | Bad request - segments data is missing | |
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset or document not found | |
-### /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}
-
-#### DELETE
-##### Description
-
+### [DELETE] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}
Delete a specific segment
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -1126,7 +950,7 @@ Delete a specific segment
| document_id | path | Document ID | Yes | string |
| segment_id | path | Segment ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1134,12 +958,10 @@ Delete a specific segment
| 401 | Unauthorized - invalid API token |
| 404 | Dataset, document, or segment not found |
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}
Get a specific segment by ID
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -1147,44 +969,43 @@ Get a specific segment by ID
| document_id | path | Document ID | Yes | string |
| segment_id | path | Segment ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Segment retrieved successfully | [SegmentDetailResponse](#segmentdetailresponse) |
+| 200 | Segment retrieved successfully | **application/json**: [SegmentDetailResponse](#segmentdetailresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset, document, or segment not found | |
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}
Update a specific segment
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [SegmentUpdatePayload](#segmentupdatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Segment ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [SegmentUpdatePayload](#segmentupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Segment updated successfully | [SegmentDetailResponse](#segmentdetailresponse) |
+| 200 | Segment updated successfully | **application/json**: [SegmentDetailResponse](#segmentdetailresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset, document, or segment not found | |
-### /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks
-
-#### GET
-##### Description
-
+### [GET] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks
List child chunks for a segment
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -1192,47 +1013,46 @@ List child chunks for a segment
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
| keyword | query | | No | string |
-| limit | query | | No | integer |
-| page | query | | No | integer |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Child chunks retrieved successfully | [ChildChunkListResponse](#childchunklistresponse) |
+| 200 | Child chunks retrieved successfully | **application/json**: [ChildChunkListResponse](#childchunklistresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset, document, or segment not found | |
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks
Create a new child chunk for a segment
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChildChunkCreatePayload](#childchunkcreatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChildChunkCreatePayload](#childchunkcreatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Child chunk created successfully | [ChildChunkDetailResponse](#childchunkdetailresponse) |
+| 200 | Child chunk created successfully | **application/json**: [ChildChunkDetailResponse](#childchunkdetailresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset, document, or segment not found | |
-### /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}
-
-#### DELETE
-##### Description
-
+### [DELETE] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}
Delete a specific child chunk
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -1241,7 +1061,7 @@ Delete a specific child chunk
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1249,271 +1069,248 @@ Delete a specific child chunk
| 401 | Unauthorized - invalid API token |
| 404 | Dataset, document, segment, or child chunk not found |
-#### PATCH
-##### Description
-
+### [PATCH] /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}
Update a specific child chunk
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChildChunkUpdatePayload](#childchunkupdatepayload) |
| child_chunk_id | path | Child chunk ID | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChildChunkUpdatePayload](#childchunkupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Child chunk updated successfully | [ChildChunkDetailResponse](#childchunkdetailresponse) |
+| 200 | Child chunk updated successfully | **application/json**: [ChildChunkDetailResponse](#childchunkdetailresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset, document, segment, or child chunk not found | |
-### /datasets/{dataset_id}/documents/{document_id}/update-by-file
+### ~~[POST] /datasets/{dataset_id}/documents/{document_id}/update-by-file~~
-#### POST
***DEPRECATED***
-##### Description
Deprecated legacy alias for updating an existing document by uploading a file. Use PATCH /datasets/{dataset_id}/documents/{document_id} instead.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| data | formData | Optional JSON string with document update settings. | No | string |
-| file | formData | Replacement document file. | No | file |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| No | **multipart/form-data**: { **"data"**: string, **"file"**: binary }
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document updated successfully | [DocumentAndBatchResponse](#documentandbatchresponse) |
+| 200 | Document updated successfully | **application/json**: [DocumentAndBatchResponse](#documentandbatchresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Document not found | |
-### /datasets/{dataset_id}/documents/{document_id}/update-by-text
-
-#### POST
-##### Description
-
+### [POST] /datasets/{dataset_id}/documents/{document_id}/update-by-text
Update an existing document by providing text content
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DocumentTextUpdate](#documenttextupdate) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DocumentTextUpdate](#documenttextupdate)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document updated successfully | [DocumentAndBatchResponse](#documentandbatchresponse) |
+| 200 | Document updated successfully | **application/json**: [DocumentAndBatchResponse](#documentandbatchresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Document not found | |
-### /datasets/{dataset_id}/documents/{document_id}/update_by_file
+### ~~[POST] /datasets/{dataset_id}/documents/{document_id}/update_by_file~~
-#### POST
***DEPRECATED***
-##### Description
Deprecated legacy alias for updating an existing document by uploading a file. Use PATCH /datasets/{dataset_id}/documents/{document_id} instead.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| data | formData | Optional JSON string with document update settings. | No | string |
-| file | formData | Replacement document file. | No | file |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| No | **multipart/form-data**: { **"data"**: string, **"file"**: binary }
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document updated successfully | [DocumentAndBatchResponse](#documentandbatchresponse) |
+| 200 | Document updated successfully | **application/json**: [DocumentAndBatchResponse](#documentandbatchresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Document not found | |
-### /datasets/{dataset_id}/documents/{document_id}/update_by_text
+### ~~[POST] /datasets/{dataset_id}/documents/{document_id}/update_by_text~~
-#### POST
***DEPRECATED***
-##### Description
Deprecated legacy alias for updating an existing document by providing text content. Use /datasets/{dataset_id}/documents/{document_id}/update-by-text instead.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [DocumentTextUpdate](#documenttextupdate) |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [DocumentTextUpdate](#documenttextupdate)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Document updated successfully | [DocumentAndBatchResponse](#documentandbatchresponse) |
+| 200 | Document updated successfully | **application/json**: [DocumentAndBatchResponse](#documentandbatchresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Document not found | |
-### /datasets/{dataset_id}/hit-testing
-
-#### POST
-##### Summary
-
-Perform hit testing on a dataset
-
-##### Description
+### [POST] /datasets/{dataset_id}/hit-testing
+**Perform hit testing on a dataset**
Perform hit testing on a dataset
Tests retrieval performance for the specified dataset.
-##### Parameters
-
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [HitTestingPayload](#hittestingpayload) |
-| dataset_id | path | Dataset ID | Yes | string |
-
-##### Responses
-
-| Code | Description | Schema |
-| ---- | ----------- | ------ |
-| 200 | Hit testing results | [HitTestingResponse](#hittestingresponse) |
-| 401 | Unauthorized - invalid API token | |
-| 404 | Dataset not found | |
-
-### /datasets/{dataset_id}/metadata
-
-#### GET
-##### Summary
-
-Get all metadata for a dataset
-
-##### Description
-
-Get all metadata for a dataset
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HitTestingPayload](#hittestingpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Metadata retrieved successfully | [DatasetMetadataListResponse](#datasetmetadatalistresponse) |
+| 200 | Hit testing results | **application/json**: [HitTestingResponse](#hittestingresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset not found | |
-#### POST
-##### Summary
+### [GET] /datasets/{dataset_id}/metadata
+**Get all metadata for a dataset**
-Create metadata for a dataset
-
-##### Description
-
-Create metadata for a dataset
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MetadataArgs](#metadataargs) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Metadata created successfully | [DatasetMetadataResponse](#datasetmetadataresponse) |
+| 200 | Metadata retrieved successfully | **application/json**: [DatasetMetadataListResponse](#datasetmetadatalistresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/metadata/built-in
+### [POST] /datasets/{dataset_id}/metadata
+**Create metadata for a dataset**
-#### GET
-##### Summary
+#### Parameters
-Get all built-in metadata fields
+| Name | Located in | Description | Required | Schema |
+| ---- | ---------- | ----------- | -------- | ------ |
+| dataset_id | path | Dataset ID | Yes | string |
-##### Description
+#### Request Body
-Get all built-in metadata fields
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MetadataArgs](#metadataargs)
|
-##### Parameters
+#### Responses
+
+| Code | Description | Schema |
+| ---- | ----------- | ------ |
+| 201 | Metadata created successfully | **application/json**: [DatasetMetadataResponse](#datasetmetadataresponse)
|
+| 401 | Unauthorized - invalid API token | |
+| 404 | Dataset not found | |
+
+### [GET] /datasets/{dataset_id}/metadata/built-in
+**Get all built-in metadata fields**
+
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Built-in fields retrieved successfully | [DatasetMetadataBuiltInFieldsResponse](#datasetmetadatabuiltinfieldsresponse) |
+| 200 | Built-in fields retrieved successfully | **application/json**: [DatasetMetadataBuiltInFieldsResponse](#datasetmetadatabuiltinfieldsresponse)
|
| 401 | Unauthorized - invalid API token | |
-### /datasets/{dataset_id}/metadata/built-in/{action}
+### [POST] /datasets/{dataset_id}/metadata/built-in/{action}
+**Enable or disable built-in metadata field**
-#### POST
-##### Summary
-
-Enable or disable built-in metadata field
-
-##### Description
-
-Enable or disable built-in metadata field
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| action | path | Action to perform: 'enable' or 'disable' | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Action completed successfully | [DatasetMetadataActionResponse](#datasetmetadataactionresponse) |
+| 200 | Action completed successfully | **application/json**: [DatasetMetadataActionResponse](#datasetmetadataactionresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/metadata/{metadata_id}
+### [DELETE] /datasets/{dataset_id}/metadata/{metadata_id}
+**Delete metadata**
-#### DELETE
-##### Summary
-
-Delete metadata
-
-##### Description
-
-Delete metadata
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
| metadata_id | path | Metadata ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1521,226 +1318,182 @@ Delete metadata
| 401 | Unauthorized - invalid API token |
| 404 | Dataset or metadata not found |
-#### PATCH
-##### Summary
+### [PATCH] /datasets/{dataset_id}/metadata/{metadata_id}
+**Update metadata name**
-Update metadata name
-
-##### Description
-
-Update metadata name
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MetadataUpdatePayload](#metadataupdatepayload) |
| dataset_id | path | Dataset ID | Yes | string |
| metadata_id | path | Metadata ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MetadataUpdatePayload](#metadataupdatepayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Metadata updated successfully | [DatasetMetadataResponse](#datasetmetadataresponse) |
+| 200 | Metadata updated successfully | **application/json**: [DatasetMetadataResponse](#datasetmetadataresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset or metadata not found | |
-### /datasets/{dataset_id}/pipeline/datasource-plugins
-
-#### GET
-##### Summary
-
-Resource for getting datasource plugins
-
-##### Description
+### [GET] /datasets/{dataset_id}/pipeline/datasource-plugins
+**Resource for getting datasource plugins**
List all datasource plugins for a rag pipeline
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| dataset_id | path | | Yes | string |
| is_published | query | Whether to get published or draft datasource plugins (true for published, false for draft, default: true) | No | string |
+| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Datasource plugins retrieved successfully |
| 401 | Unauthorized - invalid API token |
-### /datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run
-
-#### POST
-##### Summary
-
-Resource for getting datasource plugins
-
-##### Description
+### [POST] /datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run
+**Resource for getting datasource plugins**
Run a datasource node for a rag pipeline
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
| node_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Datasource node run successfully |
| 401 | Unauthorized - invalid API token |
-### /datasets/{dataset_id}/pipeline/run
-
-#### POST
-##### Summary
-
-Resource for running a rag pipeline
-
-##### Description
+### [POST] /datasets/{dataset_id}/pipeline/run
+**Resource for running a rag pipeline**
Run a datasource node for a rag pipeline
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Pipeline run successfully |
| 401 | Unauthorized - invalid API token |
-### /datasets/{dataset_id}/retrieve
-
-#### POST
-##### Summary
-
-Perform hit testing on a dataset
-
-##### Description
+### [POST] /datasets/{dataset_id}/retrieve
+**Perform hit testing on a dataset**
Perform hit testing on a dataset
Tests retrieval performance for the specified dataset.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [HitTestingPayload](#hittestingpayload) |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HitTestingPayload](#hittestingpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Hit testing results | [HitTestingResponse](#hittestingresponse) |
+| 200 | Hit testing results | **application/json**: [HitTestingResponse](#hittestingresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Dataset not found | |
-### /datasets/{dataset_id}/tags
-
-#### GET
-##### Summary
-
-Get all knowledge type tags
-
-##### Description
+### [GET] /datasets/{dataset_id}/tags
+**Get all knowledge type tags**
Get tags bound to a specific dataset
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| dataset_id | path | Dataset ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Tags retrieved successfully | [DatasetBoundTagListResponse](#datasetboundtaglistresponse) |
+| 200 | Tags retrieved successfully | **application/json**: [DatasetBoundTagListResponse](#datasetboundtaglistresponse)
|
| 401 | Unauthorized - invalid API token | |
-### /end-users/{end_user_id}
-
-#### GET
-##### Summary
-
-Get end user detail
-
-##### Description
+### [GET] /end-users/{end_user_id}
+**Get end user detail**
Get an end user by ID
This endpoint is scoped to the current app token's tenant/app to prevent
cross-tenant/app access when an end-user ID is known.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| end_user_id | path | End user ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | End user retrieved successfully | [EndUserDetail](#enduserdetail) |
+| 200 | End user retrieved successfully | **application/json**: [EndUserDetail](#enduserdetail)
|
| 401 | Unauthorized - invalid API token | |
| 404 | End user not found | |
-### /files/upload
-
-#### POST
-##### Summary
-
-Upload a file for use in conversations
-
-##### Description
+### [POST] /files/upload
+**Upload a file for use in conversations**
Upload a file for use in conversations
Accepts a single file upload via multipart/form-data.
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | File uploaded successfully | [FileResponse](#fileresponse) |
+| 201 | File uploaded successfully | **application/json**: [FileResponse](#fileresponse)
|
| 400 | Bad request - no file or invalid file | |
| 401 | Unauthorized - invalid API token | |
| 413 | File too large | |
| 415 | Unsupported file type | |
-### /files/{file_id}/preview
-
-#### GET
-##### Summary
-
-Preview/Download a file that was uploaded via Service API
-
-##### Description
+### [GET] /files/{file_id}/preview
+**Preview/Download a file that was uploaded via Service API**
Preview or download a file uploaded via Service API
Provides secure file preview/download functionality.
Files can only be accessed if they belong to messages within the requesting app's context.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [FilePreviewQuery](#filepreviewquery) |
| file_id | path | UUID of the file to preview | Yes | string |
+| as_attachment | query | Download as attachment | No | boolean |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1749,20 +1502,16 @@ Files can only be accessed if they belong to messages within the requesting app'
| 403 | Forbidden - file access denied |
| 404 | File not found |
-### /form/human_input/{form_token}
-
-#### GET
-##### Description
-
+### [GET] /form/human_input/{form_token}
Get a paused human input form by token
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| form_token | path | Human input form token | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1771,19 +1520,22 @@ Get a paused human input form by token
| 404 | Form not found |
| 412 | Form already submitted or expired |
-#### POST
-##### Description
-
+### [POST] /form/human_input/{form_token}
Submit a paused human input form by token
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [HumanInputFormSubmitPayload](#humaninputformsubmitpayload) |
| form_token | path | Human input form token | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [HumanInputFormSubmitPayload](#humaninputformsubmitpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1793,45 +1545,35 @@ Submit a paused human input form by token
| 404 | Form not found |
| 412 | Form already submitted or expired |
-### /info
-
-#### GET
-##### Summary
-
-Get app information
-
-##### Description
+### [GET] /info
+**Get app information**
Get basic application information
Returns basic information about the application including name, description, tags, and mode.
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Application info retrieved successfully | [AppInfoResponse](#appinforesponse) |
+| 200 | Application info retrieved successfully | **application/json**: [AppInfoResponse](#appinforesponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Application not found | |
-### /messages
-
-#### GET
-##### Summary
-
-List messages in a conversation
-
-##### Description
+### [GET] /messages
+**List messages in a conversation**
List messages in a conversation
Retrieves messages with pagination support using first_id.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MessageListQuery](#messagelistquery) |
+| conversation_id | query | Conversation UUID | Yes | string |
+| first_id | query | First message ID for pagination | No | |
+| limit | query | Number of messages to return (1-100) | No | integer,
**Default:** 20 |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1839,74 +1581,61 @@ Retrieves messages with pagination support using first_id.
| 401 | Unauthorized - invalid API token |
| 404 | Conversation or first message not found |
-### /messages/{message_id}/feedbacks
-
-#### POST
-##### Summary
-
-Submit feedback for a message
-
-##### Description
+### [POST] /messages/{message_id}/feedbacks
+**Submit feedback for a message**
Submit feedback for a message
Allows users to rate messages as like/dislike and provide optional feedback content.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [MessageFeedbackPayload](#messagefeedbackpayload) |
| message_id | path | Message ID | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [MessageFeedbackPayload](#messagefeedbackpayload)
|
+
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Feedback submitted successfully | [ResultResponse](#resultresponse) |
+| 200 | Feedback submitted successfully | **application/json**: [ResultResponse](#resultresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Message not found | |
-### /messages/{message_id}/suggested
-
-#### GET
-##### Summary
-
-Get suggested follow-up questions for a message
-
-##### Description
+### [GET] /messages/{message_id}/suggested
+**Get suggested follow-up questions for a message**
Get suggested follow-up questions for a message
Returns AI-generated follow-up questions based on the message content.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| message_id | path | Message ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Suggested questions retrieved successfully | [SimpleResultStringListResponse](#simpleresultstringlistresponse) |
+| 200 | Suggested questions retrieved successfully | **application/json**: [SimpleResultStringListResponse](#simpleresultstringlistresponse)
|
| 400 | Suggested questions feature is disabled | |
| 401 | Unauthorized - invalid API token | |
| 404 | Message not found | |
| 500 | Internal server error | |
-### /meta
-
-#### GET
-##### Summary
-
-Get app metadata
-
-##### Description
+### [GET] /meta
+**Get app metadata**
Get application metadata
Returns metadata about the application including configuration and settings.
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1914,19 +1643,13 @@ Returns metadata about the application including configuration and settings.
| 401 | Unauthorized - invalid API token |
| 404 | Application not found |
-### /parameters
-
-#### GET
-##### Summary
-
-Retrieve app parameters
-
-##### Description
+### [GET] /parameters
+**Retrieve app parameters**
Retrieve application input parameters and configuration
Returns the input form parameters and configuration for the application.
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1934,45 +1657,33 @@ Returns the input form parameters and configuration for the application.
| 401 | Unauthorized - invalid API token |
| 404 | Application not found |
-### /site
-
-#### GET
-##### Summary
-
-Retrieve app site info
-
-##### Description
+### [GET] /site
+**Retrieve app site info**
Get application site configuration
Returns the site configuration for the application including theme, icons, and text.
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Site configuration retrieved successfully | [Site](#site) |
+| 200 | Site configuration retrieved successfully | **application/json**: [Site](#site)
|
| 401 | Unauthorized - invalid API token | |
| 403 | Forbidden - site not found or tenant archived | |
-### /text-to-audio
-
-#### POST
-##### Summary
-
-Convert text to audio using text-to-speech
-
-##### Description
+### [POST] /text-to-audio
+**Convert text to audio using text-to-speech**
Convert text to audio using text-to-speech
Converts the provided text to audio using the specified voice.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TextToAudioPayload](#texttoaudiopayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TextToAudioPayload](#texttoaudiopayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1981,14 +1692,10 @@ Converts the provided text to audio using the specified voice.
| 401 | Unauthorized - invalid API token |
| 500 | Internal server error |
-### /workflow/{task_id}/events
-
-#### GET
-##### Description
-
+### [GET] /workflow/{task_id}/events
Get workflow execution events stream after resume
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -1997,7 +1704,7 @@ Get workflow execution events stream after resume
| include_state_snapshot | query | Whether to replay from persisted state snapshot, specify `"true"` to include a status snapshot of executed nodes | No | string |
| user | query | End user identifier (query param) | No | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -2005,51 +1712,46 @@ Get workflow execution events stream after resume
| 401 | Unauthorized - invalid API token |
| 404 | Workflow run not found |
-### /workflows/logs
-
-#### GET
-##### Summary
-
-Get workflow app logs
-
-##### Description
+### [GET] /workflows/logs
+**Get workflow app logs**
Get workflow execution logs
Returns paginated workflow execution logs with filtering options.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowLogQuery](#workflowlogquery) |
+| created_at__after | query | | No | |
+| created_at__before | query | | No | |
+| created_by_account | query | | No | |
+| created_by_end_user_session_id | query | | No | |
+| keyword | query | | No | |
+| limit | query | | No | integer,
**Default:** 20 |
+| page | query | | No | integer,
**Default:** 1 |
+| status | query | | No | |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Logs retrieved successfully | [WorkflowAppLogPaginationResponse](#workflowapplogpaginationresponse) |
+| 200 | Logs retrieved successfully | **application/json**: [WorkflowAppLogPaginationResponse](#workflowapplogpaginationresponse)
|
| 401 | Unauthorized - invalid API token | |
-### /workflows/run
-
-#### POST
-##### Summary
-
-Execute a workflow
-
-##### Description
+### [POST] /workflows/run
+**Execute a workflow**
Execute a workflow
Runs a workflow with the provided inputs and returns the results.
Supports both blocking and streaming response modes.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowRunPayload](#workflowrunpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowRunPayload](#workflowrunpayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -2060,77 +1762,62 @@ Supports both blocking and streaming response modes.
| 429 | Rate limit exceeded |
| 500 | Internal server error |
-### /workflows/run/{workflow_run_id}
-
-#### GET
-##### Summary
-
-Get a workflow task running detail
-
-##### Description
+### [GET] /workflows/run/{workflow_run_id}
+**Get a workflow task running detail**
Get workflow run details
Returns detailed information about a specific workflow run.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| workflow_run_id | path | Workflow run ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Workflow run details retrieved successfully | [WorkflowRunResponse](#workflowrunresponse) |
+| 200 | Workflow run details retrieved successfully | **application/json**: [WorkflowRunResponse](#workflowrunresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Workflow run not found | |
-### /workflows/tasks/{task_id}/stop
+### [POST] /workflows/tasks/{task_id}/stop
+**Stop a running workflow task**
-#### POST
-##### Summary
-
-Stop a running workflow task
-
-##### Description
-
-Stop a running workflow task
-
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| task_id | path | Task ID to stop | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Task stopped successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Task stopped successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 401 | Unauthorized - invalid API token | |
| 404 | Task not found | |
-### /workflows/{workflow_id}/run
-
-#### POST
-##### Summary
-
-Run specific workflow by ID
-
-##### Description
+### [POST] /workflows/{workflow_id}/run
+**Run specific workflow by ID**
Execute a specific workflow by ID
Executes a specific workflow version identified by its ID.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowRunPayload](#workflowrunpayload) |
| workflow_id | path | Workflow ID to execute | Yes | string |
-##### Responses
+#### Request Body
+
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowRunPayload](#workflowrunpayload)
|
+
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -2141,25 +1828,19 @@ Executes a specific workflow version identified by its ID.
| 429 | Rate limit exceeded |
| 500 | Internal server error |
-### /workspaces/current/models/model-types/{model_type}
-
-#### GET
-##### Summary
-
-Get available models by model type
-
-##### Description
+### [GET] /workspaces/current/models/model-types/{model_type}
+**Get available models by model type**
Get available models by model type
Returns a list of available models for the specified model type.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| model_type | path | Type of model to retrieve | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -2167,7 +1848,7 @@ Returns a list of available models for the specified model type.
| 401 | Unauthorized - invalid API token |
---
-### Models
+### Schemas
#### Annotation
@@ -2201,8 +1882,8 @@ Returns a list of available models for the specified model type.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keyword | string | Keyword to search annotations | No |
-| limit | integer | Number of annotations per page | No |
-| page | integer | Page number | No |
+| limit | integer,
**Default:** 20 | Number of annotations per page | No |
+| page | integer,
**Default:** 1 | Page number | No |
#### AnnotationReplyActionPayload
@@ -2226,13 +1907,13 @@ Returns a list of available models for the specified model type.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| auto_generate_name | boolean | Auto generate conversation name | No |
+| auto_generate_name | boolean,
**Default:** true | Auto generate conversation name | No |
| conversation_id | string | Conversation UUID | No |
| files | [ object ] | | No |
| inputs | object | | Yes |
| query | string | | Yes |
-| response_mode | string | *Enum:* `"blocking"`, `"streaming"` | No |
-| retriever_from | string | | No |
+| response_mode | string | | No |
+| retriever_from | string,
**Default:** dev | | No |
| trace_session_id | string | Trace session ID for observability grouping | No |
| workflow_id | string | Workflow ID for advanced chat | No |
@@ -2253,8 +1934,8 @@ Returns a list of available models for the specified model type.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keyword | string | | No |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
#### ChildChunkListResponse
@@ -2292,8 +1973,8 @@ Returns a list of available models for the specified model type.
| files | [ object ] | | No |
| inputs | object | | Yes |
| query | string | | No |
-| response_mode | string | *Enum:* `"blocking"`, `"streaming"` | No |
-| retriever_from | string | | No |
+| response_mode | string | | No |
+| retriever_from | string,
**Default:** dev | | No |
| trace_session_id | string | Trace session ID for observability grouping | No |
#### Condition
@@ -2302,7 +1983,7 @@ Condition detail
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| comparison_operator | string | *Enum:* `"<"`, `"="`, `">"`, `"after"`, `"before"`, `"contains"`, `"empty"`, `"end with"`, `"in"`, `"is"`, `"is not"`, `"not contains"`, `"not empty"`, `"not in"`, `"start with"`, `"≠"`, `"≤"`, `"≥"` | Yes |
+| comparison_operator | string,
**Available values:** "<", "=", ">", "after", "before", "contains", "empty", "end with", "in", "is", "is not", "not contains", "not empty", "not in", "start with", "≠", "≤", "≥" | *Enum:* `"<"`, `"="`, `">"`, `"after"`, `"before"`, `"contains"`, `"empty"`, `"end with"`, `"in"`, `"is"`, `"is not"`, `"not contains"`, `"not empty"`, `"not in"`, `"start with"`, `"≠"`, `"≤"`, `"≥"` | Yes |
| name | string | | Yes |
| value | string
[ string ]
integer
number | | No |
@@ -2311,8 +1992,8 @@ Condition detail
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| last_id | string | Last conversation ID for pagination | No |
-| limit | integer | Number of conversations to return | No |
-| sort_by | string | Sort order for conversations
*Enum:* `"-created_at"`, `"-updated_at"`, `"created_at"`, `"updated_at"` | No |
+| limit | integer,
**Default:** 20 | Number of conversations to return | No |
+| sort_by | string,
**Available values:** "-created_at", "-updated_at", "created_at", "updated_at",
**Default:** -updated_at | Sort order for conversations
*Enum:* `"-created_at"`, `"-updated_at"`, `"created_at"`, `"updated_at"` | No |
#### ConversationRenamePayload
@@ -2352,7 +2033,7 @@ Condition detail
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| last_id | string | Last variable ID for pagination | No |
-| limit | integer | Number of variables to return | No |
+| limit | integer,
**Default:** 20 | Number of variables to return | No |
| variable_name | string | Filter variables by name | No |
#### DatasetBoundTagListResponse
@@ -2378,10 +2059,10 @@ Condition detail
| embedding_model_provider | string | | No |
| external_knowledge_api_id | string | | No |
| external_knowledge_id | string | | No |
-| indexing_technique | string | *Enum:* `"economy"`, `"high_quality"` | No |
+| indexing_technique | string | | No |
| name | string | | Yes |
| permission | [PermissionEnum](#permissionenum) | | No |
-| provider | string | | No |
+| provider | string,
**Default:** vendor | | No |
| retrieval_model | [RetrievalModel](#retrievalmodel) | | No |
| summary_index_setting | object | | No |
@@ -2512,8 +2193,8 @@ Condition detail
| ---- | ---- | ----------- | -------- |
| include_all | boolean | Include all datasets | No |
| keyword | string | Search keyword | No |
-| limit | integer | Number of items per page | No |
-| page | integer | Page number | No |
+| limit | integer,
**Default:** 20 | Number of items per page | No |
+| page | integer,
**Default:** 1 | Page number | No |
| tag_ids | [ string ] | Filter by tag IDs | No |
#### DatasetListResponse
@@ -2616,7 +2297,7 @@ Condition detail
| external_knowledge_api_id | string | | No |
| external_knowledge_id | string | | No |
| external_retrieval_model | object | | No |
-| indexing_technique | string | *Enum:* `"economy"`, `"high_quality"` | No |
+| indexing_technique | string | | No |
| name | string | | No |
| partial_member_list | [ object ] | | No |
| permission | [PermissionEnum](#permissionenum) | | No |
@@ -2667,8 +2348,8 @@ Request payload for bulk downloading documents as a zip archive.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keyword | string | Search keyword | No |
-| limit | integer | Number of items per page | No |
-| page | integer | Page number | No |
+| limit | integer,
**Default:** 20 | Number of items per page | No |
+| page | integer,
**Default:** 1 | Page number | No |
| status | string | Document status filter | No |
#### DocumentListResponse
@@ -2754,8 +2435,8 @@ Request payload for bulk downloading documents as a zip archive.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| doc_form | string | | No |
-| doc_language | string | | No |
+| doc_form | string,
**Default:** text_model | | No |
+| doc_language | string,
**Default:** English | | No |
| embedding_model | string | | No |
| embedding_model_provider | string | | No |
| indexing_technique | string | | No |
@@ -2769,8 +2450,8 @@ Request payload for bulk downloading documents as a zip archive.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| doc_form | string | | No |
-| doc_language | string | | No |
+| doc_form | string,
**Default:** text_model | | No |
+| doc_language | string,
**Default:** English | | No |
| name | string | | No |
| process_rule | [ProcessRule](#processrule) | | No |
| retrieval_model | [RetrievalModel](#retrievalmodel) | | No |
@@ -2801,8 +2482,8 @@ Note: The SQLAlchemy model defines an `is_anonymous` property for Flask-Login se
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| limit | integer | Number of feedbacks per page | No |
-| page | integer | Page number | No |
+| limit | integer,
**Default:** 20 | Number of feedbacks per page | No |
+| page | integer,
**Default:** 1 | Page number | No |
#### FilePreviewQuery
@@ -2962,7 +2643,7 @@ Note: The SQLAlchemy model defines an `is_anonymous` property for Flask-Login se
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| content | string | | No |
-| rating | string | *Enum:* `"dislike"`, `"like"` | No |
+| rating | string | | No |
#### MessageListQuery
@@ -2970,14 +2651,14 @@ Note: The SQLAlchemy model defines an `is_anonymous` property for Flask-Login se
| ---- | ---- | ----------- | -------- |
| conversation_id | string | Conversation UUID | Yes |
| first_id | string | First message ID for pagination | No |
-| limit | integer | Number of messages to return (1-100) | No |
+| limit | integer,
**Default:** 20 | Number of messages to return (1-100) | No |
#### MetadataArgs
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| name | string | | Yes |
-| type | string | *Enum:* `"number"`, `"string"`, `"time"` | Yes |
+| type | string,
**Available values:** "number", "string", "time" | *Enum:* `"number"`, `"string"`, `"time"` | Yes |
#### MetadataDetail
@@ -2994,7 +2675,7 @@ Metadata Filtering Condition.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| conditions | [ [Condition](#condition) ] | | No |
-| logical_operator | string | *Enum:* `"and"`, `"or"` | No |
+| logical_operator | string | | No |
#### MetadataOperationData
@@ -3088,7 +2769,7 @@ Dataset Process Rule Mode
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| parent_mode | string | *Enum:* `"full-doc"`, `"paragraph"` | No |
+| parent_mode | string | | No |
| pre_processing_rules | [ [PreProcessingRule](#preprocessingrule) ] | | No |
| segmentation | [Segmentation](#segmentation) | | No |
| subchunk_segmentation | [Segmentation](#segmentation) | | No |
@@ -3138,8 +2819,8 @@ Dataset Process Rule Mode
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| keyword | string | | No |
-| limit | integer | | No |
-| page | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
| status | [ string ] | | No |
#### SegmentListResponse
@@ -3209,7 +2890,8 @@ Dataset Process Rule Mode
| ---- | ---- | ----------- | -------- |
| chunk_overlap | integer | | No |
| max_tokens | integer | | Yes |
-| separator | string | | No |
+| separator | string,
**Default:**
+ | | No |
#### SimpleAccount
@@ -3323,7 +3005,7 @@ Accept the legacy single-tag Service API payload while exposing a normalized tag
| ---- | ---- | ----------- | -------- |
| keyword_setting | [WeightKeywordSetting](#weightkeywordsetting) | | No |
| vector_setting | [WeightVectorSetting](#weightvectorsetting) | | No |
-| weight_type | string | *Enum:* `"customized"`, `"keyword_first"`, `"semantic_first"` | No |
+| weight_type | string | | No |
#### WeightVectorSetting
@@ -3365,9 +3047,9 @@ Accept the legacy single-tag Service API payload while exposing a normalized tag
| created_by_account | string | | No |
| created_by_end_user_session_id | string | | No |
| keyword | string | | No |
-| limit | integer | | No |
-| page | integer | | No |
-| status | string | *Enum:* `"failed"`, `"stopped"`, `"succeeded"` | No |
+| limit | integer,
**Default:** 20 | | No |
+| page | integer,
**Default:** 1 | | No |
+| status | string | | No |
#### WorkflowRunForLogResponse
@@ -3391,7 +3073,7 @@ Accept the legacy single-tag Service API payload while exposing a normalized tag
| ---- | ---- | ----------- | -------- |
| files | [ object ] | | No |
| inputs | object | | Yes |
-| response_mode | string | *Enum:* `"blocking"`, `"streaming"` | No |
+| response_mode | string | | No |
| trace_session_id | string | Trace session ID for observability grouping | No |
#### WorkflowRunResponse
diff --git a/api/openapi/markdown/web-swagger.md b/api/openapi/markdown/web-openapi.md
similarity index 73%
rename from api/openapi/markdown/web-swagger.md
rename to api/openapi/markdown/web-openapi.md
index d24dc48ee69..5903d56b193 100644
--- a/api/openapi/markdown/web-swagger.md
+++ b/api/openapi/markdown/web-openapi.md
@@ -3,31 +3,22 @@ Public APIs for web applications including file uploads, chat interactions, and
## Version: 1.0
-### Security
-**Bearer**
-
-| apiKey | *API Key* |
-| ------ | --------- |
-| Description | Type: Bearer {your-api-key} |
-| In | header |
-| Name | Authorization |
+### Available authorizations
+#### Bearer (API Key Authentication)
+Type: Bearer {your-api-key}
+**Name:** Authorization
+**In:** header
---
## web
Web application API operations
-### /audio-to-text
-
-#### POST
-##### Summary
-
-Convert audio to text
-
-##### Description
+### [POST] /audio-to-text
+**Convert audio to text**
Convert audio file to text using speech-to-text service.
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -39,20 +30,16 @@ Convert audio file to text using speech-to-text service.
| 415 | Unsupported audio type |
| 500 | Internal Server Error |
-### /chat-messages
-
-#### POST
-##### Description
-
+### [POST] /chat-messages
Create a chat message for conversational applications.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ChatMessagePayload](#chatmessagepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ChatMessagePayload](#chatmessagepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -63,44 +50,36 @@ Create a chat message for conversational applications.
| 404 | App Not Found |
| 500 | Internal Server Error |
-### /chat-messages/{task_id}/stop
-
-#### POST
-##### Description
-
+### [POST] /chat-messages/{task_id}/stop
Stop a running chat message task.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| task_id | path | Task ID to stop | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Task Not Found | |
| 500 | Internal Server Error | |
-### /completion-messages
-
-#### POST
-##### Description
-
+### [POST] /completion-messages
Create a completion message for text generation applications.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [CompletionMessagePayload](#completionmessagepayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [CompletionMessagePayload](#completionmessagepayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -111,47 +90,39 @@ Create a completion message for text generation applications.
| 404 | App Not Found |
| 500 | Internal Server Error |
-### /completion-messages/{task_id}/stop
-
-#### POST
-##### Description
-
+### [POST] /completion-messages/{task_id}/stop
Stop a running completion message task.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| task_id | path | Task ID to stop | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Task Not Found | |
| 500 | Internal Server Error | |
-### /conversations
-
-#### GET
-##### Description
-
+### [GET] /conversations
Retrieve paginated list of conversations for a chat application.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| last_id | query | Last conversation ID for pagination | No | string |
-| limit | query | Number of conversations to return (1-100) | No | integer |
-| pinned | query | Filter by pinned status | No | string |
-| sort_by | query | Sort order | No | string |
+| limit | query | Number of conversations to return (1-100) | No | integer,
**Default:** 20 |
+| pinned | query | Filter by pinned status | No | string,
**Available values:** "false", "true" |
+| sort_by | query | Sort order | No | string,
**Available values:** "-created_at", "-updated_at", "created_at", "updated_at",
**Default:** -updated_at |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -162,20 +133,16 @@ Retrieve paginated list of conversations for a chat application.
| 404 | App Not Found or Not a Chat App |
| 500 | Internal Server Error |
-### /conversations/{c_id}
-
-#### DELETE
-##### Description
-
+### [DELETE] /conversations/{c_id}
Delete a specific conversation.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| c_id | path | Conversation UUID | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -186,14 +153,10 @@ Delete a specific conversation.
| 404 | Conversation Not Found or Not a Chat App |
| 500 | Internal Server Error |
-### /conversations/{c_id}/name
-
-#### POST
-##### Description
-
+### [POST] /conversations/{c_id}/name
Rename a specific conversation with a custom name or auto-generate one.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
@@ -201,7 +164,7 @@ Rename a specific conversation with a custom name or auto-generate one.
| auto_generate | query | Auto-generate conversation name | No | boolean |
| name | query | New conversation name | No | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -212,105 +175,83 @@ Rename a specific conversation with a custom name or auto-generate one.
| 404 | Conversation Not Found or Not a Chat App |
| 500 | Internal Server Error |
-### /conversations/{c_id}/pin
-
-#### PATCH
-##### Description
-
+### [PATCH] /conversations/{c_id}/pin
Pin a specific conversation to keep it at the top of the list.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| c_id | path | Conversation UUID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Conversation pinned successfully | [ResultResponse](#resultresponse) |
+| 200 | Conversation pinned successfully | **application/json**: [ResultResponse](#resultresponse)
|
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Conversation Not Found or Not a Chat App | |
| 500 | Internal Server Error | |
-### /conversations/{c_id}/unpin
-
-#### PATCH
-##### Description
-
+### [PATCH] /conversations/{c_id}/unpin
Unpin a specific conversation to remove it from the top of the list.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| c_id | path | Conversation UUID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Conversation unpinned successfully | [ResultResponse](#resultresponse) |
+| 200 | Conversation unpinned successfully | **application/json**: [ResultResponse](#resultresponse)
|
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Conversation Not Found or Not a Chat App | |
| 500 | Internal Server Error | |
-### /email-code-login
-
-#### POST
-##### Description
-
+### [POST] /email-code-login
Send email verification code for login
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EmailCodeLoginSendPayload](#emailcodeloginsendpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EmailCodeLoginSendPayload](#emailcodeloginsendpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Email code sent successfully | [SimpleResultDataResponse](#simpleresultdataresponse) |
+| 200 | Email code sent successfully | **application/json**: [SimpleResultDataResponse](#simpleresultdataresponse)
|
| 400 | Bad request - invalid email format | |
| 404 | Account not found | |
-### /email-code-login/validity
-
-#### POST
-##### Description
-
+### [POST] /email-code-login/validity
Verify email code and complete login
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [EmailCodeLoginVerifyPayload](#emailcodeloginverifypayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [EmailCodeLoginVerifyPayload](#emailcodeloginverifypayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Email code verified and login successful | [AccessTokenResultResponse](#accesstokenresultresponse) |
+| 200 | Email code verified and login successful | **application/json**: [AccessTokenResultResponse](#accesstokenresultresponse)
|
| 400 | Bad request - invalid code or token | |
| 401 | Invalid token or expired code | |
| 404 | Account not found | |
-### /files/upload
-
-#### POST
-##### Summary
-
-Upload a file for use in web applications
-
-##### Description
+### [POST] /files/upload
+**Upload a file for use in web applications**
Upload a file for use in web applications
Accepts file uploads for use within web applications, supporting
@@ -335,109 +276,87 @@ Raises:
FileTooLargeError: File exceeds size limit
UnsupportedFileTypeError: File type not supported
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | File uploaded successfully | [FileResponse](#fileresponse) |
+| 201 | File uploaded successfully | **application/json**: [FileResponse](#fileresponse)
|
| 400 | Bad request - invalid file or parameters | |
| 413 | File too large | |
| 415 | Unsupported file type | |
-### /forgot-password
-
-#### POST
-##### Description
-
+### [POST] /forgot-password
Send password reset email
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ForgotPasswordSendPayload](#forgotpasswordsendpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ForgotPasswordSendPayload](#forgotpasswordsendpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Password reset email sent successfully | [SimpleResultDataResponse](#simpleresultdataresponse) |
+| 200 | Password reset email sent successfully | **application/json**: [SimpleResultDataResponse](#simpleresultdataresponse)
|
| 400 | Bad request - invalid email format | |
| 404 | Account not found | |
| 429 | Too many requests - rate limit exceeded | |
-### /forgot-password/resets
-
-#### POST
-##### Description
-
+### [POST] /forgot-password/resets
Reset user password with verification token
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ForgotPasswordResetPayload](#forgotpasswordresetpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ForgotPasswordResetPayload](#forgotpasswordresetpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Password reset successfully | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Password reset successfully | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 400 | Bad request - invalid parameters or password mismatch | |
| 401 | Invalid or expired token | |
| 404 | Account not found | |
-### /forgot-password/validity
-
-#### POST
-##### Description
-
+### [POST] /forgot-password/validity
Verify password reset token validity
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [ForgotPasswordCheckPayload](#forgotpasswordcheckpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [ForgotPasswordCheckPayload](#forgotpasswordcheckpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Token is valid | [VerificationTokenResponse](#verificationtokenresponse) |
+| 200 | Token is valid | **application/json**: [VerificationTokenResponse](#verificationtokenresponse)
|
| 400 | Bad request - invalid token format | |
| 401 | Invalid or expired token | |
-### /form/human_input/{form_token}
-
-#### GET
-##### Summary
-
-Get human input form definition by token
-
-##### Description
+### [GET] /form/human_input/{form_token}
+**Get human input form definition by token**
GET /api/form/human_input/
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| form_token | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-#### POST
-##### Summary
-
-Submit human input form by token
-
-##### Description
+### [POST] /form/human_input/{form_token}
+**Submit human input form by token**
POST /api/form/human_input/
@@ -449,124 +368,96 @@ Request body:
"action": "Approve"
}
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| form_token | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /form/human_input/{form_token}/upload-token
-
-#### POST
-##### Summary
-
-Issue an upload token for a human input form
-
-##### Description
+### [POST] /form/human_input/{form_token}/upload-token
+**Issue an upload token for a human input form**
POST /api/form/human_input//upload-token
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| form_token | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
-### /human-input-forms/files
+### [POST] /human-input-forms/files
+**Upload one local file or remote URL file for a HITL human input form**
-#### POST
-##### Summary
-
-Upload one local file or remote URL file for a HITL human input form
-
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | File uploaded successfully | [FileResponse](#fileresponse) |
+| 201 | File uploaded successfully | **application/json**: [FileResponse](#fileresponse)
|
-### /login
-
-#### POST
-##### Summary
-
-Authenticate user and login
-
-##### Description
+### [POST] /login
+**Authenticate user and login**
Authenticate user for web application access
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [LoginPayload](#loginpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [LoginPayload](#loginpayload)
|
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Authentication successful | [AccessTokenResultResponse](#accesstokenresultresponse) |
+| 200 | Authentication successful | **application/json**: [AccessTokenResultResponse](#accesstokenresultresponse)
|
| 400 | Bad request - invalid email or password format | |
| 401 | Authentication failed - email or password mismatch | |
| 403 | Account banned or login disabled | |
| 404 | Account not found | |
-### /login/status
-
-#### GET
-##### Description
-
+### [GET] /login/status
Check login status
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Login status | [LoginStatusResponse](#loginstatusresponse) |
+| 200 | Login status | **application/json**: [LoginStatusResponse](#loginstatusresponse)
|
| 401 | Login status | |
-### /logout
-
-#### POST
-##### Description
-
+### [POST] /logout
Logout user from web application
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Logout successful | [SimpleResultResponse](#simpleresultresponse) |
-
-### /messages
-
-#### GET
-##### Description
+| 200 | Logout successful | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
+### [GET] /messages
Retrieve paginated list of messages from a conversation in a chat application.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| conversation_id | query | Conversation UUID | Yes | string |
| first_id | query | First message ID for pagination | No | string |
-| limit | query | Number of messages to return (1-100) | No | integer |
+| limit | query | Number of messages to return (1-100) | No | integer,
**Default:** 20 |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -577,47 +468,39 @@ Retrieve paginated list of messages from a conversation in a chat application.
| 404 | Conversation Not Found or Not a Chat App |
| 500 | Internal Server Error |
-### /messages/{message_id}/feedbacks
-
-#### POST
-##### Description
-
+### [POST] /messages/{message_id}/feedbacks
Submit feedback (like/dislike) for a specific message.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| message_id | path | Message UUID | Yes | string |
| content | query | Feedback content | No | string |
-| rating | query | Feedback rating | No | string |
+| rating | query | Feedback rating | No | string,
**Available values:** "dislike", "like" |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Feedback submitted successfully | [ResultResponse](#resultresponse) |
+| 200 | Feedback submitted successfully | **application/json**: [ResultResponse](#resultresponse)
|
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Message Not Found | |
| 500 | Internal Server Error | |
-### /messages/{message_id}/more-like-this
-
-#### GET
-##### Description
-
+### [GET] /messages/{message_id}/more-like-this
Generate a new completion similar to an existing message (completion apps only).
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
+| response_mode | query | Response mode | Yes | string,
**Available values:** "blocking", "streaming" |
| message_id | path | | Yes | string |
-| payload | body | | Yes | [MessageMoreLikeThisQuery](#messagemorelikethisquery) |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -628,42 +511,32 @@ Generate a new completion similar to an existing message (completion apps only).
| 404 | Message Not Found |
| 500 | Internal Server Error |
-### /messages/{message_id}/suggested-questions
-
-#### GET
-##### Description
-
+### [GET] /messages/{message_id}/suggested-questions
Get suggested follow-up questions after a message (chat apps only).
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| message_id | path | Message UUID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SuggestedQuestionsResponse](#suggestedquestionsresponse) |
+| 200 | Success | **application/json**: [SuggestedQuestionsResponse](#suggestedquestionsresponse)
|
| 400 | Bad Request - Not a chat app or feature disabled | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Message Not Found or Conversation Not Found | |
| 500 | Internal Server Error | |
-### /meta
-
-#### GET
-##### Summary
-
-Get app meta
-
-##### Description
+### [GET] /meta
+**Get app meta**
Retrieve the metadata for a specific app.
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -674,18 +547,12 @@ Retrieve the metadata for a specific app.
| 404 | App Not Found |
| 500 | Internal Server Error |
-### /parameters
-
-#### GET
-##### Summary
-
-Retrieve app parameters
-
-##### Description
+### [GET] /parameters
+**Retrieve app parameters**
Retrieve the parameters for a specific app.
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -696,14 +563,10 @@ Retrieve the parameters for a specific app.
| 404 | App Not Found |
| 500 | Internal Server Error |
-### /passport
-
-#### GET
-##### Description
-
+### [GET] /passport
Get authentication passport for web application access
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -711,14 +574,8 @@ Get authentication passport for web application access
| 401 | Unauthorized - missing app code or invalid authentication |
| 404 | Application or user not found |
-### /remote-files/upload
-
-#### POST
-##### Summary
-
-Upload a file from a remote URL
-
-##### Description
+### [POST] /remote-files/upload
+**Upload a file from a remote URL**
Upload a file from a remote URL
Downloads a file from the provided remote URL and uploads it
@@ -740,24 +597,18 @@ Raises:
FileTooLargeError: File exceeds size limit
UnsupportedFileTypeError: File type not supported
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 201 | Remote file uploaded successfully | [FileWithSignedUrl](#filewithsignedurl) |
+| 201 | Remote file uploaded successfully | **application/json**: [FileWithSignedUrl](#filewithsignedurl)
|
| 400 | Bad request - invalid URL or parameters | |
| 413 | File too large | |
| 415 | Unsupported file type | |
| 500 | Failed to fetch remote file | |
-### /remote-files/{url}
-
-#### GET
-##### Summary
-
-Get information about a remote file
-
-##### Description
+### [GET] /remote-files/{url}
+**Get information about a remote file**
Get information about a remote file
Retrieves basic information about a file located at a remote URL,
@@ -774,36 +625,32 @@ Returns:
Raises:
HTTPException: If the remote file cannot be accessed
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| url | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Remote file information retrieved successfully | [RemoteFileInfo](#remotefileinfo) |
+| 200 | Remote file information retrieved successfully | **application/json**: [RemoteFileInfo](#remotefileinfo)
|
| 400 | Bad request - invalid URL | |
| 404 | Remote file not found | |
| 500 | Failed to fetch remote file | |
-### /saved-messages
-
-#### GET
-##### Description
-
+### [GET] /saved-messages
Retrieve paginated list of saved messages for a completion application.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| last_id | query | Last message ID for pagination | No | string |
-| limit | query | Number of messages to return (1-100) | No | integer |
+| limit | query | Number of messages to return (1-100) | No | integer,
**Default:** 20 |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -814,42 +661,36 @@ Retrieve paginated list of saved messages for a completion application.
| 404 | App Not Found |
| 500 | Internal Server Error |
-#### POST
-##### Description
-
+### [POST] /saved-messages
Save a specific message for later reference.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| message_id | query | Message UUID to save | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Message saved successfully | [ResultResponse](#resultresponse) |
+| 200 | Message saved successfully | **application/json**: [ResultResponse](#resultresponse)
|
| 400 | Bad Request - Not a completion app | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Message Not Found | |
| 500 | Internal Server Error | |
-### /saved-messages/{message_id}
-
-#### DELETE
-##### Description
-
+### [DELETE] /saved-messages/{message_id}
Remove a message from saved messages.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| message_id | path | Message UUID to delete | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -860,18 +701,12 @@ Remove a message from saved messages.
| 404 | Message Not Found |
| 500 | Internal Server Error |
-### /site
-
-#### GET
-##### Summary
-
-Retrieve app site info
-
-##### Description
+### [GET] /site
+**Retrieve app site info**
Retrieve app site information and configuration.
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -882,14 +717,8 @@ Retrieve app site information and configuration.
| 404 | App Not Found |
| 500 | Internal Server Error |
-### /system-features
-
-#### GET
-##### Summary
-
-Get system feature flags and configuration
-
-##### Description
+### [GET] /system-features
+**Get system feature flags and configuration**
Get system feature flags and configuration
Returns the current system feature flags and configuration
@@ -908,31 +737,25 @@ Authentication would create circular dependency (can't authenticate without weba
Only non-sensitive configuration data should be returned by this endpoint.
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | System features retrieved successfully | [SystemFeatureModel](#systemfeaturemodel) |
+| 200 | System features retrieved successfully | **application/json**: [SystemFeatureModel](#systemfeaturemodel)
|
| 500 | Internal server error | |
-### /text-to-audio
-
-#### POST
-##### Summary
-
-Convert text to audio
-
-##### Description
+### [POST] /text-to-audio
+**Convert text to audio**
Convert text to audio using text-to-speech service.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [TextToAudioPayload](#texttoaudiopayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [TextToAudioPayload](#texttoaudiopayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -942,68 +765,54 @@ Convert text to audio using text-to-speech service.
| 403 | Forbidden |
| 500 | Internal Server Error |
-### /webapp/access-mode
-
-#### GET
-##### Description
-
+### [GET] /webapp/access-mode
Retrieve the access mode for a web application (public or restricted).
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| appCode | query | Application code | No | string |
| appId | query | Application ID | No | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [AccessModeResponse](#accessmoderesponse) |
+| 200 | Success | **application/json**: [AccessModeResponse](#accessmoderesponse)
|
| 400 | Bad Request | |
| 500 | Internal Server Error | |
-### /webapp/permission
-
-#### GET
-##### Description
-
+### [GET] /webapp/permission
Check if user has permission to access a web application.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| appId | query | Application ID | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [BooleanResultResponse](#booleanresultresponse) |
+| 200 | Success | **application/json**: [BooleanResultResponse](#booleanresultresponse)
|
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 500 | Internal Server Error | |
-### /workflows/run
-
-#### POST
-##### Summary
-
-Run workflow
-
-##### Description
+### [POST] /workflows/run
+**Run workflow**
Execute a workflow with provided inputs and files.
-##### Parameters
+#### Request Body
-| Name | Located in | Description | Required | Schema |
-| ---- | ---------- | ----------- | -------- | ------ |
-| payload | body | | Yes | [WorkflowRunPayload](#workflowrunpayload) |
+| Required | Schema |
+| -------- | ------ |
+| Yes | **application/json**: [WorkflowRunPayload](#workflowrunpayload)
|
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
@@ -1014,28 +823,22 @@ Execute a workflow with provided inputs and files.
| 404 | App Not Found |
| 500 | Internal Server Error |
-### /workflows/tasks/{task_id}/stop
-
-#### POST
-##### Summary
-
-Stop workflow task
-
-##### Description
+### [POST] /workflows/tasks/{task_id}/stop
+**Stop workflow task**
Stop a running workflow task.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| task_id | path | Task ID to stop | Yes | string |
-##### Responses
+#### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
-| 200 | Success | [SimpleResultResponse](#simpleresultresponse) |
+| 200 | Success | **application/json**: [SimpleResultResponse](#simpleresultresponse)
|
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
@@ -1046,33 +849,27 @@ Stop a running workflow task.
## default
Default namespace
-### /workflow/{task_id}/events
-
-#### GET
-##### Summary
-
-Get workflow execution events stream after resume
-
-##### Description
+### [GET] /workflow/{task_id}/events
+**Get workflow execution events stream after resume**
GET /api/workflow//events
Returns Server-Sent Events stream.
-##### Parameters
+#### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| task_id | path | | Yes | string |
-##### Responses
+#### Responses
| Code | Description |
| ---- | ----------- |
| 200 | Success |
---
-### Models
+### Schemas
#### AccessModeResponse
@@ -1125,8 +922,8 @@ Returns Server-Sent Events stream.
| inputs | object | Input variables for the chat | Yes |
| parent_message_id | string | Parent message ID | No |
| query | string | User query/message | Yes |
-| response_mode | string | Response mode: blocking or streaming
*Enum:* `"blocking"`, `"streaming"` | No |
-| retriever_from | string | Source of retriever | No |
+| response_mode | string | Response mode: blocking or streaming | No |
+| retriever_from | string,
**Default:** web_app | Source of retriever | No |
#### CompletionMessagePayload
@@ -1135,17 +932,17 @@ Returns Server-Sent Events stream.
| files | [ object ] | Files to be processed | No |
| inputs | object | Input variables for the completion | Yes |
| query | string | Query text for completion | No |
-| response_mode | string | Response mode: blocking or streaming
*Enum:* `"blocking"`, `"streaming"` | No |
-| retriever_from | string | Source of retriever | No |
+| response_mode | string | Response mode: blocking or streaming | No |
+| retriever_from | string,
**Default:** web_app | Source of retriever | No |
#### ConversationListQuery
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| last_id | string | | No |
-| limit | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
| pinned | boolean | | No |
-| sort_by | string | *Enum:* `"-created_at"`, `"-updated_at"`, `"created_at"`, `"updated_at"` | No |
+| sort_by | string,
**Available values:** "-created_at", "-updated_at", "created_at", "updated_at",
**Default:** -updated_at | *Enum:* `"-created_at"`, `"-updated_at"`, `"created_at"`, `"updated_at"` | No |
#### ConversationRenamePayload
@@ -1231,7 +1028,7 @@ Parsed multipart form fields for HITL uploads.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| url | string (uri) | Remote file URL | No |
+| url | string | Remote file URL | No |
#### HumanInputUploadTokenResponse
@@ -1285,7 +1082,7 @@ Parsed multipart form fields for HITL uploads.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| content | string | | No |
-| rating | string | *Enum:* `"dislike"`, `"like"` | No |
+| rating | string | | No |
#### MessageListQuery
@@ -1293,13 +1090,13 @@ Parsed multipart form fields for HITL uploads.
| ---- | ---- | ----------- | -------- |
| conversation_id | string | Conversation UUID | Yes |
| first_id | string | First message ID for pagination | No |
-| limit | integer | Number of messages to return (1-100) | No |
+| limit | integer,
**Default:** 20 | Number of messages to return (1-100) | No |
#### MessageMoreLikeThisQuery
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
-| response_mode | string | Response mode
*Enum:* `"blocking"`, `"streaming"` | Yes |
+| response_mode | string,
**Available values:** "blocking", "streaming" | Response mode
*Enum:* `"blocking"`, `"streaming"` | Yes |
#### PluginInstallationPermissionModel
@@ -1350,7 +1147,7 @@ Parsed multipart form fields for HITL uploads.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| last_id | string | | No |
-| limit | integer | | No |
+| limit | integer,
**Default:** 20 | | No |
#### SimpleResultDataResponse
@@ -1376,11 +1173,11 @@ Parsed multipart form fields for HITL uploads.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| branding | [BrandingModel](#brandingmodel) | | Yes |
-| enable_change_email | boolean | | Yes |
-| enable_collaboration_mode | boolean | | Yes |
+| enable_change_email | boolean,
**Default:** true | | Yes |
+| enable_collaboration_mode | boolean,
**Default:** true | | Yes |
| enable_creators_platform | boolean | | Yes |
| enable_email_code_login | boolean | | Yes |
-| enable_email_password_login | boolean | | Yes |
+| enable_email_password_login | boolean,
**Default:** true | | Yes |
| enable_explore_banner | boolean | | Yes |
| enable_marketplace | boolean | | Yes |
| enable_social_oauth_login | boolean | | Yes |
@@ -1389,7 +1186,7 @@ Parsed multipart form fields for HITL uploads.
| is_allow_register | boolean | | Yes |
| is_email_setup | boolean | | Yes |
| license | [LicenseModel](#licensemodel) | | Yes |
-| max_plugin_package_size | integer | | Yes |
+| max_plugin_package_size | integer,
**Default:** 15728640 | | Yes |
| plugin_installation_permission | [PluginInstallationPermissionModel](#plugininstallationpermissionmodel) | | Yes |
| plugin_manager | [PluginManagerModel](#pluginmanagermodel) | | Yes |
| sso_enforced_for_signin | boolean | | Yes |
diff --git a/api/pyproject.toml b/api/pyproject.toml
index 14f16a8ee59..8e4ebe4112e 100644
--- a/api/pyproject.toml
+++ b/api/pyproject.toml
@@ -60,6 +60,7 @@ exclude = ["providers/vdb/__pycache__", "providers/trace/__pycache__"]
[tool.uv.sources]
dify-agent = { path = "../dify-agent", editable = true }
+flask-restx = { git = "https://github.com/asukaminato0721/flask-restx", rev = "27758e26f8f740d7525d5039c51a9e524b6e2b68" }
dify-vdb-alibabacloud-mysql = { workspace = true }
dify-vdb-analyticdb = { workspace = true }
dify-vdb-baidu = { workspace = true }
diff --git a/api/tests/unit_tests/commands/test_generate_swagger_markdown_docs.py b/api/tests/unit_tests/commands/test_generate_swagger_markdown_docs.py
index 4da03b2a883..8444af741fb 100644
--- a/api/tests/unit_tests/commands/test_generate_swagger_markdown_docs.py
+++ b/api/tests/unit_tests/commands/test_generate_swagger_markdown_docs.py
@@ -22,7 +22,7 @@ def _load_generate_swagger_markdown_docs_module():
def test_generate_markdown_docs_keeps_split_docs_and_merges_fastopenapi_into_console(tmp_path, monkeypatch):
module = _load_generate_swagger_markdown_docs_module()
- swagger_dir = tmp_path / "openapi"
+ openapi_dir = tmp_path / "openapi"
markdown_dir = tmp_path / "markdown"
stale_combined_doc = markdown_dir / "api-reference.md"
markdown_dir.mkdir()
@@ -50,23 +50,23 @@ def test_generate_markdown_docs_keeps_split_docs_and_merges_fastopenapi_into_con
monkeypatch.setattr(module, "generate_fastopenapi_specs", write_fastopenapi_specs)
monkeypatch.setattr(module, "_convert_spec_to_markdown", convert_spec_to_markdown)
- written_paths = module.generate_markdown_docs(swagger_dir, markdown_dir)
+ written_paths = module.generate_markdown_docs(openapi_dir, markdown_dir)
assert [path.name for path in written_paths] == [
- "console-swagger.md",
- "web-swagger.md",
- "service-swagger.md",
- "openapi-swagger.md",
+ "console-openapi.md",
+ "web-openapi.md",
+ "service-openapi.md",
+ "openapi-openapi.md",
]
assert not stale_combined_doc.exists()
- assert not list(swagger_dir.glob("*.json"))
+ assert not list(openapi_dir.glob("*.json"))
- console_markdown = (markdown_dir / "console-swagger.md").read_text(encoding="utf-8")
- assert "## FastOpenAPI Preview (OpenAPI 3.0)" in console_markdown
+ console_markdown = (markdown_dir / "console-openapi.md").read_text(encoding="utf-8")
+ assert "## FastOpenAPI Preview (OpenAPI 3.1)" in console_markdown
assert "### fastopenapi-console-openapi" in console_markdown
assert "#### Routes" in console_markdown
- assert "FastOpenAPI Preview" not in (markdown_dir / "web-swagger.md").read_text(encoding="utf-8")
- assert "FastOpenAPI Preview" not in (markdown_dir / "service-swagger.md").read_text(encoding="utf-8")
+ assert "FastOpenAPI Preview" not in (markdown_dir / "web-openapi.md").read_text(encoding="utf-8")
+ assert "FastOpenAPI Preview" not in (markdown_dir / "service-openapi.md").read_text(encoding="utf-8")
def test_generate_markdown_docs_only_removes_generated_specs_from_separate_swagger_dir(tmp_path, monkeypatch):
@@ -107,39 +107,41 @@ def test_generate_markdown_docs_only_removes_generated_specs_from_separate_swagg
def test_patch_union_schema_markdown_fills_converter_blank_schema_types(tmp_path):
module = _load_generate_swagger_markdown_docs_module()
- spec_path = tmp_path / "console-swagger.json"
+ spec_path = tmp_path / "console-openapi.json"
spec_path.write_text(
json.dumps(
{
- "definitions": {
- "FormInputConfig": {
- "oneOf": [
- {"$ref": "#/definitions/ParagraphInputConfig"},
- {"$ref": "#/definitions/SelectInputConfig"},
- {"$ref": "#/definitions/FileInputConfig"},
- ],
- },
- "ParagraphInputConfig": {
- "properties": {
- "default": {
- "anyOf": [
- {"$ref": "#/definitions/StringSource"},
- {"type": "null"},
- ],
+ "components": {
+ "schemas": {
+ "FormInputConfig": {
+ "oneOf": [
+ {"$ref": "#/components/schemas/ParagraphInputConfig"},
+ {"$ref": "#/components/schemas/SelectInputConfig"},
+ {"$ref": "#/components/schemas/FileInputConfig"},
+ ],
+ },
+ "ParagraphInputConfig": {
+ "properties": {
+ "default": {
+ "anyOf": [
+ {"$ref": "#/components/schemas/StringSource"},
+ {"type": "null"},
+ ],
+ },
+ "output_variable_name": {"type": "string"},
},
- "output_variable_name": {"type": "string"},
},
- },
- "SelectInputConfig": {
- "properties": {
- "option_source": {"$ref": "#/definitions/StringListSource"},
+ "SelectInputConfig": {
+ "properties": {
+ "option_source": {"$ref": "#/components/schemas/StringListSource"},
+ },
},
- },
- "FileInputConfig": {
- "properties": {
- "allowed_file_types": {
- "type": "array",
- "items": {"$ref": "#/definitions/FileType"},
+ "FileInputConfig": {
+ "properties": {
+ "allowed_file_types": {
+ "type": "array",
+ "items": {"$ref": "#/components/schemas/FileType"},
+ },
},
},
},
@@ -188,24 +190,26 @@ def test_patch_union_schema_markdown_fills_converter_blank_schema_types(tmp_path
assert "| allowed_file_types | [ [FileType](#filetype) ] | | No |" in patched
-def test_patch_union_schema_markdown_fills_regular_definition_union_property(tmp_path):
+def test_patch_union_schema_markdown_fills_regular_schema_union_property(tmp_path):
module = _load_generate_swagger_markdown_docs_module()
- spec_path = tmp_path / "service-swagger.json"
+ spec_path = tmp_path / "service-openapi.json"
spec_path.write_text(
json.dumps(
{
- "definitions": {
- "DocumentMetadataResponse": {
- "properties": {
- "id": {"type": "string"},
- "value": {
- "anyOf": [
- {"type": "string"},
- {"type": "integer"},
- {"type": "number"},
- {"type": "boolean"},
- {"type": "null"},
- ],
+ "components": {
+ "schemas": {
+ "DocumentMetadataResponse": {
+ "properties": {
+ "id": {"type": "string"},
+ "value": {
+ "anyOf": [
+ {"type": "string"},
+ {"type": "integer"},
+ {"type": "number"},
+ {"type": "boolean"},
+ {"type": "null"},
+ ],
+ },
},
},
},
@@ -227,9 +231,9 @@ def test_patch_union_schema_markdown_fills_regular_definition_union_property(tmp
assert "| value | string
integer
number
boolean | | No |" in patched
-def test_patch_union_schema_markdown_ignores_specs_without_definitions(tmp_path):
+def test_patch_union_schema_markdown_ignores_specs_without_schemas(tmp_path):
module = _load_generate_swagger_markdown_docs_module()
- spec_path = tmp_path / "console-swagger.json"
+ spec_path = tmp_path / "console-openapi.json"
spec_path.write_text("{}", encoding="utf-8")
assert module._patch_union_schema_markdown("unchanged", spec_path) == "unchanged"
@@ -237,27 +241,29 @@ def test_patch_union_schema_markdown_ignores_specs_without_definitions(tmp_path)
def test_patch_union_schema_markdown_ignores_unrenderable_shapes(tmp_path):
module = _load_generate_swagger_markdown_docs_module()
- spec_path = tmp_path / "console-swagger.json"
+ spec_path = tmp_path / "console-openapi.json"
spec_path.write_text(
json.dumps(
{
- "definitions": {
- "NotAMapping": [],
- "BrokenUnion": {
- "oneOf": [
- {},
- {"$ref": "#/definitions/Missing"},
- {"$ref": "#/definitions/NoPropertyMapping"},
- ],
+ "components": {
+ "schemas": {
+ "NotAMapping": [],
+ "BrokenUnion": {
+ "oneOf": [
+ {},
+ {"$ref": "#/components/schemas/Missing"},
+ {"$ref": "#/components/schemas/NoPropertyMapping"},
+ ],
+ },
+ "NoPropertyMapping": {"properties": []},
},
- "NoPropertyMapping": {"properties": []},
}
}
),
encoding="utf-8",
)
- assert module._definition_ref_name(None) is None
+ assert module._schema_ref_name(None) is None
assert module._schema_markdown_type(None) == ""
assert module._schema_markdown_type({"anyOf": [{"type": "null"}]}) == ""
assert module._replace_schema_table_type("unchanged", "Definition", "field", "") == "unchanged"
@@ -280,24 +286,26 @@ def test_patch_union_schema_markdown_ignores_unrenderable_shapes(tmp_path):
def test_convert_spec_to_markdown_patches_generated_union_tables(tmp_path, monkeypatch):
module = _load_generate_swagger_markdown_docs_module()
- spec_path = tmp_path / "console-swagger.json"
- output_path = tmp_path / "console-swagger.md"
+ spec_path = tmp_path / "console-openapi.json"
+ output_path = tmp_path / "console-openapi.md"
spec_path.write_text(
json.dumps(
{
- "definitions": {
- "FormInputConfig": {
- "oneOf": [
- {"$ref": "#/definitions/ParagraphInputConfig"},
- ],
- },
- "ParagraphInputConfig": {
- "properties": {
- "default": {
- "anyOf": [
- {"$ref": "#/definitions/StringSource"},
- {"type": "null"},
- ],
+ "components": {
+ "schemas": {
+ "FormInputConfig": {
+ "oneOf": [
+ {"$ref": "#/components/schemas/ParagraphInputConfig"},
+ ],
+ },
+ "ParagraphInputConfig": {
+ "properties": {
+ "default": {
+ "anyOf": [
+ {"$ref": "#/components/schemas/StringSource"},
+ {"type": "null"},
+ ],
+ },
},
},
},
diff --git a/api/tests/unit_tests/commands/test_generate_swagger_specs.py b/api/tests/unit_tests/commands/test_generate_swagger_specs.py
index 7b2ed78f56f..bfc98f5f517 100644
--- a/api/tests/unit_tests/commands/test_generate_swagger_specs.py
+++ b/api/tests/unit_tests/commands/test_generate_swagger_specs.py
@@ -1,4 +1,4 @@
-"""Unit tests for the standalone Swagger export helper."""
+"""Unit tests for the standalone OpenAPI export helper."""
import importlib.util
import json
@@ -30,42 +30,82 @@ def _load_generate_swagger_specs_module():
return module
-def test_generate_specs_writes_console_web_and_service_swagger_files(tmp_path):
+def _operation_ids(payload):
+ methods = {"delete", "get", "head", "options", "patch", "post", "put", "trace"}
+ for path_item in payload["paths"].values():
+ for method, operation in path_item.items():
+ if method in methods and isinstance(operation, dict) and "operationId" in operation:
+ yield operation["operationId"]
+
+
+def _get_operations(payload):
+ for path_item in payload["paths"].values():
+ operation = path_item.get("get")
+ if isinstance(operation, dict):
+ yield operation
+
+
+def test_generate_specs_writes_console_web_and_service_openapi_files(tmp_path):
module = _load_generate_swagger_specs_module()
written_paths = module.generate_specs(tmp_path)
assert [path.name for path in written_paths] == [
- "console-swagger.json",
- "web-swagger.json",
- "service-swagger.json",
- "openapi-swagger.json",
+ "console-openapi.json",
+ "web-openapi.json",
+ "service-openapi.json",
+ "openapi-openapi.json",
]
for path in written_paths:
payload = json.loads(path.read_text(encoding="utf-8"))
- assert payload["swagger"] == "2.0"
+ assert payload["openapi"].startswith("3.")
assert "paths" in payload
-def test_generate_specs_writes_swagger_with_resolvable_references_and_no_nulls(tmp_path):
+def test_generate_specs_writes_openapi_with_resolvable_references_and_no_nulls(tmp_path):
module = _load_generate_swagger_specs_module()
written_paths = module.generate_specs(tmp_path)
for path in written_paths:
payload = json.loads(path.read_text(encoding="utf-8"))
- definitions = payload["definitions"]
+ schemas = payload["components"]["schemas"]
refs = {
- item["$ref"].removeprefix("#/definitions/")
+ item["$ref"].removeprefix("#/components/schemas/")
for item in _walk_values(payload)
- if isinstance(item, dict) and isinstance(item.get("$ref"), str)
+ if isinstance(item, dict)
+ and isinstance(item.get("$ref"), str)
+ and item["$ref"].startswith("#/components/schemas/")
}
- assert refs <= set(definitions)
+ assert refs <= set(schemas)
assert all(value is not None for value in _walk_values(payload))
+def test_generate_specs_writes_unique_operation_ids(tmp_path):
+ module = _load_generate_swagger_specs_module()
+
+ written_paths = module.generate_specs(tmp_path)
+
+ for path in written_paths:
+ payload = json.loads(path.read_text(encoding="utf-8"))
+ operation_ids = list(_operation_ids(payload))
+
+ assert len(operation_ids) == len(set(operation_ids))
+
+
+def test_generate_specs_moves_get_request_bodies_to_query_parameters(tmp_path):
+ module = _load_generate_swagger_specs_module()
+
+ written_paths = module.generate_specs(tmp_path)
+
+ for path in written_paths:
+ payload = json.loads(path.read_text(encoding="utf-8"))
+
+ assert all("requestBody" not in operation for operation in _get_operations(payload))
+
+
def test_generate_specs_is_idempotent(tmp_path):
module = _load_generate_swagger_specs_module()
diff --git a/api/tests/unit_tests/controllers/common/test_schema.py b/api/tests/unit_tests/controllers/common/test_schema.py
index c5da7093a02..9cd83ad54db 100644
--- a/api/tests/unit_tests/controllers/common/test_schema.py
+++ b/api/tests/unit_tests/controllers/common/test_schema.py
@@ -78,9 +78,9 @@ def mock_console_ns():
def test_default_ref_template_value():
- from controllers.common.schema import DEFAULT_REF_TEMPLATE_SWAGGER_2_0
+ from controllers.common.schema import DEFAULT_REF_TEMPLATE_OPENAPI_3_0
- assert DEFAULT_REF_TEMPLATE_SWAGGER_2_0 == "#/definitions/{model}"
+ assert DEFAULT_REF_TEMPLATE_OPENAPI_3_0 == "#/components/schemas/{model}"
def test_register_schema_model_calls_namespace_schema_model():
@@ -100,7 +100,7 @@ def test_register_schema_model_calls_namespace_schema_model():
def test_register_schema_model_passes_schema_from_pydantic():
- from controllers.common.schema import DEFAULT_REF_TEMPLATE_SWAGGER_2_0, register_schema_model
+ from controllers.common.schema import DEFAULT_REF_TEMPLATE_OPENAPI_3_0, register_schema_model
namespace = MagicMock(spec=Namespace)
@@ -108,24 +108,24 @@ def test_register_schema_model_passes_schema_from_pydantic():
schema = namespace.schema_model.call_args.args[1]
- expected_schema = UserModel.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_SWAGGER_2_0)
+ expected_schema = UserModel.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_OPENAPI_3_0)
assert schema == expected_schema
def test_register_schema_model_promotes_nested_pydantic_definitions():
- from controllers.common.schema import DEFAULT_REF_TEMPLATE_SWAGGER_2_0, register_schema_model
+ from controllers.common.schema import DEFAULT_REF_TEMPLATE_OPENAPI_3_0, register_schema_model
namespace = MagicMock(spec=Namespace)
register_schema_model(namespace, ParentModel)
called_schemas = {call.args[0]: call.args[1] for call in namespace.schema_model.call_args_list}
- parent_schema = ParentModel.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_SWAGGER_2_0)
+ parent_schema = ParentModel.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_OPENAPI_3_0)
assert set(called_schemas) == {"ParentModel", "ChildModel"}
assert "$defs" not in called_schemas["ParentModel"]
- assert called_schemas["ParentModel"]["properties"]["child"]["$ref"] == "#/definitions/ChildModel"
+ assert called_schemas["ParentModel"]["properties"]["child"]["$ref"] == "#/components/schemas/ChildModel"
assert called_schemas["ChildModel"] == parent_schema["$defs"]["ChildModel"]
@@ -179,7 +179,7 @@ def test_register_response_schema_model_uses_serialized_field_names():
assert "internal_name" not in schema["properties"]
-def test_register_schema_model_flattens_simple_nullable_any_of_for_swagger_2():
+def test_register_schema_model_preserves_openapi_nullable_unions():
from controllers.common.schema import register_schema_model
namespace = MagicMock(spec=Namespace)
@@ -189,14 +189,9 @@ def test_register_schema_model_flattens_simple_nullable_any_of_for_swagger_2():
called_schemas = {call.args[0]: call.args[1] for call in namespace.schema_model.call_args_list}
properties = called_schemas["NullableSchemaModel"]["properties"]
- assert properties["name"]["type"] == "string"
- assert properties["name"]["x-nullable"] is True
- assert "anyOf" not in properties["name"]
- assert properties["tags"]["type"] == "array"
- assert properties["tags"]["items"] == {"type": "string"}
- assert properties["tags"]["x-nullable"] is True
- assert properties["owner"]["$ref"] == "#/definitions/UserModel"
- assert properties["owner"]["x-nullable"] is True
+ assert properties["name"]["anyOf"] == [{"type": "string"}, {"type": "null"}]
+ assert properties["tags"]["anyOf"] == [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}]
+ assert properties["owner"]["anyOf"] == [{"$ref": "#/components/schemas/UserModel"}, {"type": "null"}]
assert "anyOf" in properties["ambiguous"]
diff --git a/api/tests/unit_tests/controllers/test_swagger.py b/api/tests/unit_tests/controllers/test_swagger.py
index 4e81763a20a..fae4268210d 100644
--- a/api/tests/unit_tests/controllers/test_swagger.py
+++ b/api/tests/unit_tests/controllers/test_swagger.py
@@ -1,20 +1,20 @@
-"""Swagger JSON rendering tests for Flask-RESTX API blueprints."""
+"""OpenAPI JSON rendering tests for Flask-RESTX API blueprints."""
import pytest
from flask import Flask
-def _definition_refs(value: object) -> set[str]:
+def _schema_refs(value: object) -> set[str]:
refs: set[str] = set()
if isinstance(value, dict):
ref = value.get("$ref")
- if isinstance(ref, str) and ref.startswith("#/definitions/"):
- refs.add(ref.removeprefix("#/definitions/"))
+ if isinstance(ref, str) and ref.startswith("#/components/schemas/"):
+ refs.add(ref.removeprefix("#/components/schemas/"))
for item in value.values():
- refs.update(_definition_refs(item))
+ refs.update(_schema_refs(item))
elif isinstance(value, list):
for item in value:
- refs.update(_definition_refs(item))
+ refs.update(_schema_refs(item))
return refs
@@ -31,6 +31,18 @@ def _parameters_by_name(operation: dict[str, object]) -> dict[str, dict[str, obj
return result
+def _multipart_form_schema(operation: dict[str, object]) -> dict[str, object]:
+ request_body = operation.get("requestBody")
+ assert isinstance(request_body, dict)
+ content = request_body.get("content")
+ assert isinstance(content, dict)
+ multipart = content.get("multipart/form-data")
+ assert isinstance(multipart, dict)
+ schema = multipart.get("schema")
+ assert isinstance(schema, dict)
+ return schema
+
+
@pytest.mark.parametrize(
("first_kwargs", "second_kwargs"),
[
@@ -53,7 +65,7 @@ def test_inline_model_name_includes_list_constraints(
assert _inline_model_name(first_inline_model) != _inline_model_name(second_inline_model)
-def test_swagger_json_endpoints_render(monkeypatch: pytest.MonkeyPatch):
+def test_openapi_json_endpoints_render(monkeypatch: pytest.MonkeyPatch):
from configs import dify_config
from controllers.console import bp as console_bp
from controllers.service_api import bp as service_api_bp
@@ -70,17 +82,17 @@ def test_swagger_json_endpoints_render(monkeypatch: pytest.MonkeyPatch):
client = app.test_client()
- for route in ("/console/api/swagger.json", "/api/swagger.json", "/v1/swagger.json"):
+ for route in ("/console/api/openapi.json", "/api/openapi.json", "/v1/openapi.json"):
response = client.get(route)
assert response.status_code == 200
payload = response.get_json()
- assert payload["swagger"] == "2.0"
+ assert payload["openapi"].startswith("3.")
assert "paths" in payload
- assert "definitions" in payload
- assert isinstance(payload["definitions"], dict)
- missing_refs = _definition_refs(payload) - set(payload["definitions"])
- assert not sorted(ref for ref in missing_refs if ref.startswith("_AnonymousInlineModel"))
+ assert "schemas" in payload["components"]
+ assert isinstance(payload["components"]["schemas"], dict)
+ missing_refs = _schema_refs(payload) - set(payload["components"]["schemas"])
+ assert not missing_refs
assert app.config["RESTX_INCLUDE_ALL_MODELS"] is True
@@ -96,17 +108,17 @@ def test_service_document_file_routes_document_multipart_form_data(monkeypatch:
app.config["RESTX_INCLUDE_ALL_MODELS"] = True
app.register_blueprint(service_api_bp)
- payload = app.test_client().get("/v1/swagger.json").get_json()
+ payload = app.test_client().get("/v1/openapi.json").get_json()
paths = payload["paths"]
create_operation = paths["/datasets/{dataset_id}/document/create-by-file"]["post"]
- create_params = _parameters_by_name(create_operation)
- assert create_operation["consumes"] == ["multipart/form-data"]
- assert create_params["file"]["in"] == "formData"
- assert create_params["file"]["type"] == "file"
- assert create_params["file"]["required"] is True
- assert create_params["data"]["in"] == "formData"
- assert create_params["data"]["type"] == "string"
+ create_schema = _multipart_form_schema(create_operation)
+ create_properties = create_schema["properties"]
+ assert isinstance(create_properties, dict)
+ assert create_properties["file"] == {"type": "string", "format": "binary"}
+ assert create_properties["data"] == {"type": "string"}
+ assert create_schema["required"] == ["file"]
+ assert create_operation["requestBody"]["required"] is True
for path in (
"/datasets/{dataset_id}/documents/{document_id}",
@@ -114,13 +126,13 @@ def test_service_document_file_routes_document_multipart_form_data(monkeypatch:
"/datasets/{dataset_id}/documents/{document_id}/update_by_file",
):
update_operation = paths[path]["patch" if path.endswith("{document_id}") else "post"]
- update_params = _parameters_by_name(update_operation)
- assert update_operation["consumes"] == ["multipart/form-data"]
- assert update_params["file"]["in"] == "formData"
- assert update_params["file"]["type"] == "file"
- assert update_params["file"]["required"] is False
- assert update_params["data"]["in"] == "formData"
- assert update_params["data"]["type"] == "string"
+ update_schema = _multipart_form_schema(update_operation)
+ update_properties = update_schema["properties"]
+ assert isinstance(update_properties, dict)
+ assert update_properties["file"] == {"type": "string", "format": "binary"}
+ assert update_properties["data"] == {"type": "string"}
+ assert "required" not in update_schema
+ assert update_operation["requestBody"]["required"] is False
def test_service_document_list_documents_query_params_render(monkeypatch: pytest.MonkeyPatch):
@@ -134,7 +146,7 @@ def test_service_document_list_documents_query_params_render(monkeypatch: pytest
app.config["RESTX_INCLUDE_ALL_MODELS"] = True
app.register_blueprint(service_api_bp)
- payload = app.test_client().get("/v1/swagger.json").get_json()
+ payload = app.test_client().get("/v1/openapi.json").get_json()
operation = payload["paths"]["/datasets/{dataset_id}/documents"]["get"]
params = _parameters_by_name(operation)
@@ -153,7 +165,7 @@ def test_console_account_avatar_query_param_renders_as_query(monkeypatch: pytest
app.config["RESTX_INCLUDE_ALL_MODELS"] = True
app.register_blueprint(console_bp)
- payload = app.test_client().get("/console/api/swagger.json").get_json()
+ payload = app.test_client().get("/console/api/openapi.json").get_json()
operation = payload["paths"]["/account/avatar"]["get"]
params = _parameters_by_name(operation)
diff --git a/api/uv.lock b/api/uv.lock
index 55c2505225a..3445ec78321 100644
--- a/api/uv.lock
+++ b/api/uv.lock
@@ -1630,7 +1630,7 @@ requires-dist = [
{ name = "flask-login", specifier = "==0.6.3" },
{ name = "flask-migrate", specifier = ">=4.1.0,<5.0.0" },
{ name = "flask-orjson", specifier = ">=2.0.0,<3.0.0" },
- { name = "flask-restx", specifier = ">=1.3.2,<2.0.0" },
+ { name = "flask-restx", git = "https://github.com/asukaminato0721/flask-restx?rev=27758e26f8f740d7525d5039c51a9e524b6e2b68" },
{ name = "gevent", specifier = ">=26.4.0,<26.5.0" },
{ name = "gevent-websocket", specifier = "==0.10.1" },
{ name = "gmpy2", specifier = ">=2.3.0,<3.0.0" },
@@ -2570,8 +2570,8 @@ wheels = [
[[package]]
name = "flask-restx"
-version = "1.3.2"
-source = { registry = "https://pypi.org/simple" }
+version = "1.3.3.dev0"
+source = { git = "https://github.com/asukaminato0721/flask-restx?rev=27758e26f8f740d7525d5039c51a9e524b6e2b68#27758e26f8f740d7525d5039c51a9e524b6e2b68" }
dependencies = [
{ name = "aniso8601" },
{ name = "flask" },
@@ -2580,10 +2580,6 @@ dependencies = [
{ name = "referencing" },
{ name = "werkzeug" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/43/89/9b9ca58cbb8e9ec46f4a510ba93878e0c88d518bf03c350e3b1b7ad85cbe/flask-restx-1.3.2.tar.gz", hash = "sha256:0ae13d77e7d7e4dce513970cfa9db45364aef210e99022de26d2b73eb4dbced5", size = 2814719, upload-time = "2025-09-23T20:34:25.21Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/7a/3f/b82cd8e733a355db1abb8297afbf59ec972c00ef90bf8d4eed287958b204/flask_restx-1.3.2-py2.py3-none-any.whl", hash = "sha256:6e035496e8223668044fc45bf769e526352fd648d9e159bd631d94fd645a687b", size = 2799859, upload-time = "2025-09-23T20:34:23.055Z" },
-]
[[package]]
name = "flask-sqlalchemy"
diff --git a/cli/src/commands/import/app/run.ts b/cli/src/commands/import/app/run.ts
index ad5bde2420c..8a04c6d2bc5 100644
--- a/cli/src/commands/import/app/run.ts
+++ b/cli/src/commands/import/app/run.ts
@@ -36,6 +36,12 @@ export type ImportAppResult = {
readonly leakedDependencies: readonly PluginDependency[]
}
+type PluginDependencyLabelInput = {
+ readonly current_identifier?: string | null
+ readonly type?: PluginDependency['type']
+ readonly value?: unknown
+}
+
export async function runImportApp(opts: ImportAppOptions, deps: ImportAppDeps): Promise {
const env = deps.envLookup ?? getEnv
const io = deps.io ?? nullStreams()
@@ -124,7 +130,7 @@ export async function runImportApp(opts: ImportAppOptions, deps: ImportAppDeps):
// `value` is a loosely-typed wire object (Github | Marketplace | Package); narrow it here to
// surface a human-readable identifier without depending on which variant the server returned.
-export function pluginDependencyLabel(dep: PluginDependency): string {
+export function pluginDependencyLabel(dep: PluginDependencyLabelInput): string {
const value = dep.value
if (typeof value === 'object' && value !== null) {
const fields = value as Record
diff --git a/packages/contracts/generated/api/console/account/zod.gen.ts b/packages/contracts/generated/api/console/account/zod.gen.ts
index d1ce84faf5a..a75e3a285f7 100644
--- a/packages/contracts/generated/api/console/account/zod.gen.ts
+++ b/packages/contracts/generated/api/console/account/zod.gen.ts
@@ -21,7 +21,7 @@ export const zAccountAvatarPayload = z.object({
*/
export const zAccount = z.object({
avatar: z.string().nullish(),
- avatar_url: z.string().readonly().nullable(),
+ avatar_url: z.string().nullable(),
created_at: z.int().nullish(),
email: z.string(),
id: z.string(),
diff --git a/packages/contracts/generated/api/console/activate/types.gen.ts b/packages/contracts/generated/api/console/activate/types.gen.ts
index ae12c3e4615..5160896b75c 100644
--- a/packages/contracts/generated/api/console/activate/types.gen.ts
+++ b/packages/contracts/generated/api/console/activate/types.gen.ts
@@ -18,7 +18,7 @@ export type ActivationResponse = {
}
export type ActivationCheckResponse = {
- data?: ActivationCheckData
+ data?: ActivationCheckData | null
is_valid: boolean
}
diff --git a/packages/contracts/generated/api/console/activate/zod.gen.ts b/packages/contracts/generated/api/console/activate/zod.gen.ts
index 573c2d5f4c1..4f877fcd7e0 100644
--- a/packages/contracts/generated/api/console/activate/zod.gen.ts
+++ b/packages/contracts/generated/api/console/activate/zod.gen.ts
@@ -34,7 +34,7 @@ export const zActivationCheckData = z.object({
* ActivationCheckResponse
*/
export const zActivationCheckResponse = z.object({
- data: zActivationCheckData.optional(),
+ data: zActivationCheckData.nullish(),
is_valid: z.boolean(),
})
diff --git a/packages/contracts/generated/api/console/agents/types.gen.ts b/packages/contracts/generated/api/console/agents/types.gen.ts
index 4aa49fc18f6..620a91cd023 100644
--- a/packages/contracts/generated/api/console/agents/types.gen.ts
+++ b/packages/contracts/generated/api/console/agents/types.gen.ts
@@ -17,14 +17,14 @@ export type RosterAgentCreatePayload = {
description?: string
icon?: string | null
icon_background?: string | null
- icon_type?: AgentIconType
+ icon_type?: AgentIconType | null
name: string
role?: string
version_note?: string | null
}
export type AgentRosterResponse = {
- active_config_snapshot?: AgentConfigSnapshotSummaryResponse
+ active_config_snapshot?: AgentConfigSnapshotSummaryResponse | null
active_config_snapshot_id?: string | null
agent_kind: AgentKind
app_id?: string | null
@@ -35,7 +35,7 @@ export type AgentRosterResponse = {
description: string
icon?: string | null
icon_background?: string | null
- icon_type?: AgentIconType
+ icon_type?: AgentIconType | null
id: string
name: string
published_node_reference_count?: number
@@ -63,7 +63,7 @@ export type RosterAgentUpdatePayload = {
description?: string | null
icon?: string | null
icon_background?: string | null
- icon_type?: AgentIconType
+ icon_type?: AgentIconType | null
name?: string | null
role?: string | null
}
@@ -92,7 +92,7 @@ export type AgentSoulConfig = {
knowledge?: AgentSoulKnowledgeConfig
memory?: AgentSoulMemoryConfig
misc_legacy?: AgentSoulAppFeaturesConfig
- model?: AgentSoulModelConfig
+ model?: AgentSoulModelConfig | null
prompt?: AgentSoulPromptConfig
sandbox?: AgentSoulSandboxConfig
schema_version?: number
@@ -130,7 +130,7 @@ export type AgentSource = 'agent_app' | 'imported' | 'system' | 'workflow'
export type AgentStatus = 'active' | 'archived'
export type AgentInviteOptionResponse = {
- active_config_snapshot?: AgentConfigSnapshotSummaryResponse
+ active_config_snapshot?: AgentConfigSnapshotSummaryResponse | null
active_config_snapshot_id?: string | null
agent_kind: AgentKind
app_id?: string | null
@@ -142,7 +142,7 @@ export type AgentInviteOptionResponse = {
existing_node_ids?: Array
icon?: string | null
icon_background?: string | null
- icon_type?: AgentIconType
+ icon_type?: AgentIconType | null
id: string
in_current_workflow_count?: number
is_in_current_workflow?: boolean
@@ -174,12 +174,12 @@ export type AgentConfigRevisionResponse = {
export type AgentSoulAppFeaturesConfig = {
opening_statement?: string | null
- retriever_resource?: AgentFeatureToggleConfig
- sensitive_word_avoidance?: AgentSensitiveWordAvoidanceFeatureConfig
- speech_to_text?: AgentFeatureToggleConfig
+ retriever_resource?: AgentFeatureToggleConfig | null
+ sensitive_word_avoidance?: AgentSensitiveWordAvoidanceFeatureConfig | null
+ speech_to_text?: AgentFeatureToggleConfig | null
suggested_questions?: Array | null
- suggested_questions_after_answer?: AgentSuggestedQuestionsAfterAnswerFeatureConfig
- text_to_speech?: AgentTextToSpeechFeatureConfig
+ suggested_questions_after_answer?: AgentSuggestedQuestionsAfterAnswerFeatureConfig | null
+ text_to_speech?: AgentTextToSpeechFeatureConfig | null
[key: string]: unknown
}
@@ -203,7 +203,7 @@ export type AgentSoulHumanConfig = {
export type AgentSoulKnowledgeConfig = {
datasets?: Array
query_config?: AgentKnowledgeQueryConfig
- query_mode?: AgentKnowledgeQueryMode
+ query_mode?: AgentKnowledgeQueryMode | null
}
export type AgentSoulMemoryConfig = {
@@ -213,7 +213,7 @@ export type AgentSoulMemoryConfig = {
}
export type AgentSoulModelConfig = {
- credential_ref?: AgentSoulModelCredentialRef
+ credential_ref?: AgentSoulModelCredentialRef | null
model: string
model_provider: string
model_settings?: AgentSoulModelSettings
@@ -252,7 +252,7 @@ export type AgentFeatureToggleConfig = {
}
export type AgentSensitiveWordAvoidanceFeatureConfig = {
- config?: AgentModerationProviderConfig
+ config?: AgentModerationProviderConfig | null
enabled?: boolean
type?: string | null
[key: string]: unknown
@@ -260,7 +260,7 @@ export type AgentSensitiveWordAvoidanceFeatureConfig = {
export type AgentSuggestedQuestionsAfterAnswerFeatureConfig = {
enabled?: boolean
- model?: AgentSoulModelConfig
+ model?: AgentSoulModelConfig | null
prompt?: string | null
[key: string]: unknown
}
@@ -279,7 +279,7 @@ export type AgentSecretRefConfig = {
id?: string | null
key?: string | null
name?: string | null
- permission?: AgentPermissionConfig
+ permission?: AgentPermissionConfig | null
permission_status?: string | null
provider?: string | null
provider_credential_id?: string | null
@@ -290,13 +290,31 @@ export type AgentSecretRefConfig = {
}
export type AgentEnvVariableConfig = {
- default?: unknown
+ default?:
+ | string
+ | number
+ | number
+ | boolean
+ | Array
+ | Array
+ | Array
+ | Array
+ | null
env_name?: string | null
key?: string | null
name?: string | null
required?: boolean
type?: string | null
- value?: unknown
+ value?:
+ | string
+ | number
+ | number
+ | boolean
+ | Array
+ | Array
+ | Array
+ | Array
+ | null
variable?: string | null
[key: string]: unknown
}
@@ -356,7 +374,7 @@ export type AgentSoulModelSettings = {
frequency_penalty?: number | null
max_tokens?: number | null
presence_penalty?: number | null
- response_format?: AgentModelResponseFormatConfig
+ response_format?: AgentModelResponseFormatConfig | null
stop?: Array | null
temperature?: number | null
top_p?: number | null
@@ -395,7 +413,7 @@ export type AgentSkillRefConfig = {
export type AgentCliToolConfig = {
approved?: boolean
- authorization_status?: AgentCliToolAuthorizationStatus
+ authorization_status?: AgentCliToolAuthorizationStatus | null
command?: string | null
dangerous?: boolean
dangerous_accepted?: boolean
@@ -413,18 +431,18 @@ export type AgentCliToolConfig = {
}
label?: string | null
name?: string | null
- permission?: AgentPermissionConfig
+ permission?: AgentPermissionConfig | null
pre_authorized?: boolean | null
requires_confirmation?: boolean
risk_accepted?: boolean
- risk_level?: AgentCliToolRiskLevel
+ risk_level?: AgentCliToolRiskLevel | null
setup_command?: string | null
tool_name?: string | null
[key: string]: unknown
}
export type AgentSoulDifyToolConfig = {
- credential_ref?: AgentSoulDifyToolCredentialRef
+ credential_ref?: AgentSoulDifyToolCredentialRef | null
credential_type?: 'api-key' | 'oauth2' | 'unauthorized'
description?: string | null
enabled?: boolean
@@ -434,16 +452,25 @@ export type AgentSoulDifyToolConfig = {
provider_id?: string | null
provider_type?: string
runtime_parameters?: {
- [key: string]: unknown
+ [key: string]:
+ | string
+ | number
+ | number
+ | boolean
+ | Array
+ | Array
+ | Array
+ | Array
+ | null
}
tool_name?: string | null
}
export type AgentModerationProviderConfig = {
api_based_extension_id?: string | null
- inputs_config?: AgentModerationIoConfig
+ inputs_config?: AgentModerationIoConfig | null
keywords?: string | null
- outputs_config?: AgentModerationIoConfig
+ outputs_config?: AgentModerationIoConfig | null
[key: string]: unknown
}
@@ -546,9 +573,7 @@ export type DeleteAgentsByAgentIdData = {
}
export type DeleteAgentsByAgentIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAgentsByAgentIdResponse
diff --git a/packages/contracts/generated/api/console/agents/zod.gen.ts b/packages/contracts/generated/api/console/agents/zod.gen.ts
index 35de844cf2d..e1bfc0a021f 100644
--- a/packages/contracts/generated/api/console/agents/zod.gen.ts
+++ b/packages/contracts/generated/api/console/agents/zod.gen.ts
@@ -16,7 +16,7 @@ export const zRosterAgentUpdatePayload = z.object({
description: z.string().nullish(),
icon: z.string().max(255).nullish(),
icon_background: z.string().max(255).nullish(),
- icon_type: zAgentIconType.optional(),
+ icon_type: zAgentIconType.nullish(),
name: z.string().min(1).max(255).nullish(),
role: z.string().max(255).nullish(),
})
@@ -88,7 +88,7 @@ export const zAgentStatus = z.enum(['active', 'archived'])
* AgentRosterResponse
*/
export const zAgentRosterResponse = z.object({
- active_config_snapshot: zAgentConfigSnapshotSummaryResponse.optional(),
+ active_config_snapshot: zAgentConfigSnapshotSummaryResponse.nullish(),
active_config_snapshot_id: z.string().nullish(),
agent_kind: zAgentKind,
app_id: z.string().nullish(),
@@ -99,7 +99,7 @@ export const zAgentRosterResponse = z.object({
description: z.string(),
icon: z.string().nullish(),
icon_background: z.string().nullish(),
- icon_type: zAgentIconType.optional(),
+ icon_type: zAgentIconType.nullish(),
id: z.string(),
name: z.string(),
published_node_reference_count: z.int().optional().default(0),
@@ -130,7 +130,7 @@ export const zAgentRosterListResponse = z.object({
* AgentInviteOptionResponse
*/
export const zAgentInviteOptionResponse = z.object({
- active_config_snapshot: zAgentConfigSnapshotSummaryResponse.optional(),
+ active_config_snapshot: zAgentConfigSnapshotSummaryResponse.nullish(),
active_config_snapshot_id: z.string().nullish(),
agent_kind: zAgentKind,
app_id: z.string().nullish(),
@@ -142,7 +142,7 @@ export const zAgentInviteOptionResponse = z.object({
existing_node_ids: z.array(z.string()).optional(),
icon: z.string().nullish(),
icon_background: z.string().nullish(),
- icon_type: zAgentIconType.optional(),
+ icon_type: zAgentIconType.nullish(),
id: z.string(),
in_current_workflow_count: z.int().optional().default(0),
is_in_current_workflow: z.boolean().optional().default(false),
@@ -237,13 +237,35 @@ export const zAgentTextToSpeechFeatureConfig = z.object({
* AgentEnvVariableConfig
*/
export const zAgentEnvVariableConfig = z.object({
- default: z.unknown().optional(),
+ default: z
+ .union([
+ z.string(),
+ z.int(),
+ z.number(),
+ z.boolean(),
+ z.array(z.string()),
+ z.array(z.int()),
+ z.array(z.number()),
+ z.array(z.boolean()),
+ ])
+ .nullish(),
env_name: z.string().max(255).nullish(),
key: z.string().max(255).nullish(),
name: z.string().max(255).nullish(),
required: z.boolean().optional().default(false),
type: z.string().max(64).nullish(),
- value: z.unknown().optional(),
+ value: z
+ .union([
+ z.string(),
+ z.int(),
+ z.number(),
+ z.boolean(),
+ z.array(z.string()),
+ z.array(z.int()),
+ z.array(z.number()),
+ z.array(z.boolean()),
+ ])
+ .nullish(),
variable: z.string().max(255).nullish(),
})
@@ -309,7 +331,7 @@ export const zAgentKnowledgeQueryMode = z.enum(['generated_query', 'user_query']
export const zAgentSoulKnowledgeConfig = z.object({
datasets: z.array(zAgentKnowledgeDatasetConfig).optional(),
query_config: zAgentKnowledgeQueryConfig.optional(),
- query_mode: zAgentKnowledgeQueryMode.optional(),
+ query_mode: zAgentKnowledgeQueryMode.nullish(),
})
/**
@@ -413,7 +435,7 @@ export const zAgentSecretRefConfig = z.object({
id: z.string().max(255).nullish(),
key: z.string().max(255).nullish(),
name: z.string().max(255).nullish(),
- permission: zAgentPermissionConfig.optional(),
+ permission: zAgentPermissionConfig.nullish(),
permission_status: z.string().max(64).nullish(),
provider: z.string().max(255).nullish(),
provider_credential_id: z.string().max(255).nullish(),
@@ -444,7 +466,7 @@ export const zAgentSoulModelSettings = z.object({
frequency_penalty: z.number().nullish(),
max_tokens: z.int().nullish(),
presence_penalty: z.number().nullish(),
- response_format: zAgentModelResponseFormatConfig.optional(),
+ response_format: zAgentModelResponseFormatConfig.nullish(),
stop: z.array(z.string()).nullish(),
temperature: z.number().nullish(),
top_p: z.number().nullish(),
@@ -456,7 +478,7 @@ export const zAgentSoulModelSettings = z.object({
* Stable model selection for Agent runtime without storing secret values.
*/
export const zAgentSoulModelConfig = z.object({
- credential_ref: zAgentSoulModelCredentialRef.optional(),
+ credential_ref: zAgentSoulModelCredentialRef.nullish(),
model: z.string().min(1).max(255),
model_provider: z.string().min(1).max(255),
model_settings: zAgentSoulModelSettings.optional(),
@@ -468,7 +490,7 @@ export const zAgentSoulModelConfig = z.object({
*/
export const zAgentSuggestedQuestionsAfterAnswerFeatureConfig = z.object({
enabled: z.boolean().optional().default(false),
- model: zAgentSoulModelConfig.optional(),
+ model: zAgentSoulModelConfig.nullish(),
prompt: z.string().nullish(),
})
@@ -512,7 +534,7 @@ export const zAgentCliToolRiskLevel = z.enum(['dangerous', 'safe', 'unknown'])
*/
export const zAgentCliToolConfig = z.object({
approved: z.boolean().optional().default(false),
- authorization_status: zAgentCliToolAuthorizationStatus.optional(),
+ authorization_status: zAgentCliToolAuthorizationStatus.nullish(),
command: z.string().nullish(),
dangerous: z.boolean().optional().default(false),
dangerous_accepted: z.boolean().optional().default(false),
@@ -528,11 +550,11 @@ export const zAgentCliToolConfig = z.object({
invoke_metadata: z.record(z.string(), z.unknown()).optional(),
label: z.string().max(255).nullish(),
name: z.string().max(255).nullish(),
- permission: zAgentPermissionConfig.optional(),
+ permission: zAgentPermissionConfig.nullish(),
pre_authorized: z.boolean().nullish(),
requires_confirmation: z.boolean().optional().default(false),
risk_accepted: z.boolean().optional().default(false),
- risk_level: zAgentCliToolRiskLevel.optional(),
+ risk_level: zAgentCliToolRiskLevel.nullish(),
setup_command: z.string().nullish(),
tool_name: z.string().max(255).nullish(),
})
@@ -563,7 +585,7 @@ export const zAgentSoulDifyToolCredentialRef = z.object({
* new callers should send ``plugin_id`` + ``provider`` when available.
*/
export const zAgentSoulDifyToolConfig = z.object({
- credential_ref: zAgentSoulDifyToolCredentialRef.optional(),
+ credential_ref: zAgentSoulDifyToolCredentialRef.nullish(),
credential_type: z.enum(['api-key', 'oauth2', 'unauthorized']).optional().default('api-key'),
description: z.string().nullish(),
enabled: z.boolean().optional().default(true),
@@ -572,7 +594,23 @@ export const zAgentSoulDifyToolConfig = z.object({
provider: z.string().max(255).nullish(),
provider_id: z.string().max(255).nullish(),
provider_type: z.string().optional().default('plugin'),
- runtime_parameters: z.record(z.string(), z.unknown()).optional(),
+ runtime_parameters: z
+ .record(
+ z.string(),
+ z
+ .union([
+ z.string(),
+ z.int(),
+ z.number(),
+ z.boolean(),
+ z.array(z.string()),
+ z.array(z.int()),
+ z.array(z.number()),
+ z.array(z.boolean()),
+ ])
+ .nullable(),
+ )
+ .optional(),
tool_name: z.string().min(1).max(255).nullish(),
})
@@ -597,16 +635,16 @@ export const zAgentModerationIoConfig = z.object({
*/
export const zAgentModerationProviderConfig = z.object({
api_based_extension_id: z.string().nullish(),
- inputs_config: zAgentModerationIoConfig.optional(),
+ inputs_config: zAgentModerationIoConfig.nullish(),
keywords: z.string().nullish(),
- outputs_config: zAgentModerationIoConfig.optional(),
+ outputs_config: zAgentModerationIoConfig.nullish(),
})
/**
* AgentSensitiveWordAvoidanceFeatureConfig
*/
export const zAgentSensitiveWordAvoidanceFeatureConfig = z.object({
- config: zAgentModerationProviderConfig.optional(),
+ config: zAgentModerationProviderConfig.nullish(),
enabled: z.boolean().optional().default(false),
type: z.string().nullish(),
})
@@ -616,12 +654,12 @@ export const zAgentSensitiveWordAvoidanceFeatureConfig = z.object({
*/
export const zAgentSoulAppFeaturesConfig = z.object({
opening_statement: z.string().nullish(),
- retriever_resource: zAgentFeatureToggleConfig.optional(),
- sensitive_word_avoidance: zAgentSensitiveWordAvoidanceFeatureConfig.optional(),
- speech_to_text: zAgentFeatureToggleConfig.optional(),
+ retriever_resource: zAgentFeatureToggleConfig.nullish(),
+ sensitive_word_avoidance: zAgentSensitiveWordAvoidanceFeatureConfig.nullish(),
+ speech_to_text: zAgentFeatureToggleConfig.nullish(),
suggested_questions: z.array(z.string()).nullish(),
- suggested_questions_after_answer: zAgentSuggestedQuestionsAfterAnswerFeatureConfig.optional(),
- text_to_speech: zAgentTextToSpeechFeatureConfig.optional(),
+ suggested_questions_after_answer: zAgentSuggestedQuestionsAfterAnswerFeatureConfig.nullish(),
+ text_to_speech: zAgentTextToSpeechFeatureConfig.nullish(),
})
/**
@@ -635,7 +673,7 @@ export const zAgentSoulConfig = z.object({
knowledge: zAgentSoulKnowledgeConfig.optional(),
memory: zAgentSoulMemoryConfig.optional(),
misc_legacy: zAgentSoulAppFeaturesConfig.optional(),
- model: zAgentSoulModelConfig.optional(),
+ model: zAgentSoulModelConfig.nullish(),
prompt: zAgentSoulPromptConfig.optional(),
sandbox: zAgentSoulSandboxConfig.optional(),
schema_version: z.int().optional().default(1),
@@ -651,7 +689,7 @@ export const zRosterAgentCreatePayload = z.object({
description: z.string().optional().default(''),
icon: z.string().max(255).nullish(),
icon_background: z.string().max(255).nullish(),
- icon_type: zAgentIconType.optional(),
+ icon_type: zAgentIconType.nullish(),
name: z.string().min(1).max(255),
role: z.string().max(255).optional().default(''),
version_note: z.string().nullish(),
@@ -709,7 +747,7 @@ export const zDeleteAgentsByAgentIdPath = z.object({
/**
* Agent archived
*/
-export const zDeleteAgentsByAgentIdResponse = z.record(z.string(), z.never())
+export const zDeleteAgentsByAgentIdResponse = z.void()
export const zGetAgentsByAgentIdPath = z.object({
agent_id: z.string(),
diff --git a/packages/contracts/generated/api/console/api-based-extension/types.gen.ts b/packages/contracts/generated/api/console/api-based-extension/types.gen.ts
index 1b460d21664..e24fb6efc44 100644
--- a/packages/contracts/generated/api/console/api-based-extension/types.gen.ts
+++ b/packages/contracts/generated/api/console/api-based-extension/types.gen.ts
@@ -58,9 +58,7 @@ export type DeleteApiBasedExtensionByIdData = {
}
export type DeleteApiBasedExtensionByIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteApiBasedExtensionByIdResponse
diff --git a/packages/contracts/generated/api/console/api-based-extension/zod.gen.ts b/packages/contracts/generated/api/console/api-based-extension/zod.gen.ts
index dd7fa0c51d8..9bb0f67728f 100644
--- a/packages/contracts/generated/api/console/api-based-extension/zod.gen.ts
+++ b/packages/contracts/generated/api/console/api-based-extension/zod.gen.ts
@@ -43,7 +43,7 @@ export const zDeleteApiBasedExtensionByIdPath = z.object({
/**
* Extension deleted successfully
*/
-export const zDeleteApiBasedExtensionByIdResponse = z.record(z.string(), z.never())
+export const zDeleteApiBasedExtensionByIdResponse = z.void()
export const zGetApiBasedExtensionByIdPath = z.object({
id: z.string(),
diff --git a/packages/contracts/generated/api/console/api-key-auth/types.gen.ts b/packages/contracts/generated/api/console/api-key-auth/types.gen.ts
index a519481a738..60e4634ca08 100644
--- a/packages/contracts/generated/api/console/api-key-auth/types.gen.ts
+++ b/packages/contracts/generated/api/console/api-key-auth/types.gen.ts
@@ -65,9 +65,7 @@ export type DeleteApiKeyAuthDataSourceByBindingIdData = {
}
export type DeleteApiKeyAuthDataSourceByBindingIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteApiKeyAuthDataSourceByBindingIdResponse
diff --git a/packages/contracts/generated/api/console/api-key-auth/zod.gen.ts b/packages/contracts/generated/api/console/api-key-auth/zod.gen.ts
index 65c3c92f5cc..acdb5851734 100644
--- a/packages/contracts/generated/api/console/api-key-auth/zod.gen.ts
+++ b/packages/contracts/generated/api/console/api-key-auth/zod.gen.ts
@@ -49,4 +49,4 @@ export const zDeleteApiKeyAuthDataSourceByBindingIdPath = z.object({
/**
* Binding deleted successfully
*/
-export const zDeleteApiKeyAuthDataSourceByBindingIdResponse = z.record(z.string(), z.never())
+export const zDeleteApiKeyAuthDataSourceByBindingIdResponse = z.void()
diff --git a/packages/contracts/generated/api/console/apps/orpc.gen.ts b/packages/contracts/generated/api/console/apps/orpc.gen.ts
index 8c66e870621..f6b44fa8f77 100644
--- a/packages/contracts/generated/api/console/apps/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/apps/orpc.gen.ts
@@ -1450,16 +1450,10 @@ export const annotations = {
/**
* Enable or disable app API
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const post19 = oc
.route({
- deprecated: true,
- description:
- 'Enable or disable app API\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Enable or disable app API',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAppsByAppIdApiEnable',
@@ -1510,16 +1504,10 @@ export const delete3 = oc
/**
* Get chat conversation details
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const get17 = oc
.route({
- deprecated: true,
- description:
- 'Get chat conversation details\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Get chat conversation details',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAppsByAppIdChatConversationsByConversationId',
@@ -1607,16 +1595,10 @@ export const byTaskId = {
/**
* Get chat messages for a conversation with pagination
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const get20 = oc
.route({
- deprecated: true,
- description:
- 'Get chat messages for a conversation with pagination\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Get chat messages for a conversation with pagination',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAppsByAppIdChatMessages',
@@ -1652,16 +1634,10 @@ export const delete4 = oc
/**
* Get completion conversation details with messages
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const get21 = oc
.route({
- deprecated: true,
- description:
- 'Get completion conversation details with messages\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Get completion conversation details with messages',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAppsByAppIdCompletionConversationsByConversationId',
@@ -1813,16 +1789,10 @@ export const convertToWorkflow = {
* Copy app
*
* Create a copy of an existing application
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const post25 = oc
.route({
- deprecated: true,
- description:
- 'Create a copy of an existing application\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Create a copy of an existing application',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAppsByAppIdCopy',
@@ -1939,16 +1909,10 @@ export const icon = {
/**
* Get message details by ID
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const get26 = oc
.route({
- deprecated: true,
- description:
- 'Get message details by ID\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Get message details by ID',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAppsByAppIdMessagesByMessageId',
@@ -1998,16 +1962,10 @@ export const modelConfig = {
/**
* Check if app name is available
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const post29 = oc
.route({
- deprecated: true,
- description:
- 'Check if app name is available\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Check if app name is available',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAppsByAppIdName',
@@ -2151,16 +2109,10 @@ export const site = {
/**
* Enable or disable app site
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const post34 = oc
.route({
- deprecated: true,
- description:
- 'Enable or disable app site\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Enable or disable app site',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAppsByAppIdSiteEnable',
@@ -4614,16 +4566,9 @@ export const published = {
/**
* Get webhook trigger for a node
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const get77 = oc
.route({
- deprecated: true,
- description:
- 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAppsByAppIdWorkflowsTriggersWebhook',
@@ -4791,16 +4736,10 @@ export const delete12 = oc
* Get app detail
*
* Get application details
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const get79 = oc
.route({
- deprecated: true,
- description:
- 'Get application details\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Get application details',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAppsByAppId',
@@ -4815,16 +4754,10 @@ export const get79 = oc
* Update app
*
* Update application details
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const put7 = oc
.route({
- deprecated: true,
- description:
- 'Update application details\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Update application details',
inputStructure: 'detailed',
method: 'PUT',
operationId: 'putAppsByAppId',
@@ -5006,16 +4939,10 @@ export const get82 = oc
* Create app
*
* Create a new application
- *
- * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
- *
- * @deprecated
*/
export const post64 = oc
.route({
- deprecated: true,
- description:
- 'Create a new application\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
+ description: 'Create a new application',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postApps',
diff --git a/packages/contracts/generated/api/console/apps/types.gen.ts b/packages/contracts/generated/api/console/apps/types.gen.ts
index 73ef265f19a..42fd165ba05 100644
--- a/packages/contracts/generated/api/console/apps/types.gen.ts
+++ b/packages/contracts/generated/api/console/apps/types.gen.ts
@@ -16,14 +16,14 @@ export type CreateAppPayload = {
description?: string | null
icon?: string | null
icon_background?: string | null
- icon_type?: IconType
+ icon_type?: IconType | null
mode: 'advanced-chat' | 'agent' | 'agent-chat' | 'chat' | 'completion' | 'workflow'
name: string
}
export type AppDetail = {
access_mode?: string | null
- app_model_config?: ModelConfig
+ app_model_config?: ModelConfig | null
created_at?: number | null
created_by?: string | null
description?: string | null
@@ -35,11 +35,11 @@ export type AppDetail = {
mode_compatible_with_agent: string
name: string
tags?: Array
- tracing?: JsonValue
+ tracing?: JsonValue | null
updated_at?: number | null
updated_by?: string | null
use_icon_as_answer_icon?: boolean | null
- workflow?: WorkflowPartial
+ workflow?: WorkflowPartial | null
}
export type AppImportPayload = {
@@ -79,7 +79,7 @@ export type WorkflowOnlineUsersResponse = {
export type AppDetailWithSite = {
access_mode?: string | null
api_base_url?: string | null
- app_model_config?: ModelConfig
+ app_model_config?: ModelConfig | null
bound_agent_id?: string | null
created_at?: number | null
created_by?: string | null
@@ -94,20 +94,20 @@ export type AppDetailWithSite = {
max_active_requests?: number | null
mode_compatible_with_agent: string
name: string
- site?: Site
+ site?: Site | null
tags?: Array
- tracing?: JsonValue
+ tracing?: JsonValue | null
updated_at?: number | null
updated_by?: string | null
use_icon_as_answer_icon?: boolean | null
- workflow?: WorkflowPartial
+ workflow?: WorkflowPartial | null
}
export type UpdateAppPayload = {
description?: string | null
icon?: string | null
icon_background?: string | null
- icon_type?: IconType
+ icon_type?: IconType | null
max_active_requests?: number | null
name: string
use_icon_as_answer_icon?: boolean | null
@@ -173,17 +173,17 @@ export type AgentAppComposerResponse = {
agent: AgentComposerAgentResponse
agent_soul: AgentSoulConfig
save_options: Array
- validation?: ComposerValidationFindingsResponse
- variant: string
+ validation?: ComposerValidationFindingsResponse | null
+ variant: 'agent_app'
}
export type ComposerSavePayload = {
- agent_soul?: AgentSoulConfig
- binding?: ComposerBindingPayload
+ agent_soul?: AgentSoulConfig | null
+ binding?: ComposerBindingPayload | null
client_revision_id?: string | null
idempotency_key?: string | null
new_agent_name?: string | null
- node_job?: WorkflowNodeJobConfig
+ node_job?: WorkflowNodeJobConfig | null
save_strategy: ComposerSaveStrategy
soul_lock?: ComposerSoulLockPayload
variant: ComposerVariant
@@ -201,18 +201,18 @@ export type AgentComposerCandidatesResponse = {
export type AgentComposerValidateResponse = {
errors?: Array
knowledge_retrieval_placeholder?: Array
- result: string
+ result: 'success'
warnings?: Array
}
export type AgentAppFeaturesPayload = {
opening_statement?: string | null
- retriever_resource?: AgentFeatureToggleConfig
- sensitive_word_avoidance?: AgentSensitiveWordAvoidanceFeatureConfig
- speech_to_text?: AgentFeatureToggleConfig
+ retriever_resource?: AgentFeatureToggleConfig | null
+ sensitive_word_avoidance?: AgentSensitiveWordAvoidanceFeatureConfig | null
+ speech_to_text?: AgentFeatureToggleConfig | null
suggested_questions?: Array | null
- suggested_questions_after_answer?: AgentSuggestedQuestionsAfterAnswerFeatureConfig
- text_to_speech?: AgentTextToSpeechFeatureConfig
+ suggested_questions_after_answer?: AgentSuggestedQuestionsAfterAnswerFeatureConfig | null
+ text_to_speech?: AgentTextToSpeechFeatureConfig | null
}
export type SimpleResultResponse = {
@@ -317,7 +317,7 @@ export type ConversationWithSummaryPagination = {
}
export type ConversationDetail = {
- admin_feedback_stats?: FeedbackStat
+ admin_feedback_stats?: FeedbackStat | null
annotated: boolean
created_at?: number | null
from_account_id?: string | null
@@ -326,10 +326,10 @@ export type ConversationDetail = {
id: string
introduction?: string | null
message_count: number
- model_config?: ModelConfig
+ model_config?: ModelConfig | null
status: string
updated_at?: number | null
- user_feedback_stats?: FeedbackStat
+ user_feedback_stats?: FeedbackStat | null
}
export type MessageInfiniteScrollPaginationResponse = {
@@ -352,12 +352,12 @@ export type ConversationPagination = {
export type ConversationMessageDetail = {
created_at?: number | null
- first_message?: MessageDetail
+ first_message?: MessageDetail | null
from_account_id?: string | null
from_end_user_id?: string | null
from_source: string
id: string
- model_config?: ModelConfig
+ model_config?: ModelConfig | null
status: string
}
@@ -397,7 +397,7 @@ export type CopyAppPayload = {
description?: string | null
icon?: string | null
icon_background?: string | null
- icon_type?: IconType
+ icon_type?: IconType | null
name?: string | null
}
@@ -414,13 +414,13 @@ export type MessageFeedbackPayload = {
export type AppIconPayload = {
icon?: string | null
icon_background?: string | null
- icon_type?: IconType
+ icon_type?: IconType | null
}
export type MessageDetailResponse = {
agent_thoughts?: Array
- annotation?: ConversationAnnotation
- annotation_hit_history?: ConversationAnnotationHitHistory
+ annotation?: ConversationAnnotation | null
+ annotation_hit_history?: ConversationAnnotationHitHistory | null
answer_tokens?: number | null
conversation_id: string
created_at?: number | null
@@ -434,9 +434,9 @@ export type MessageDetailResponse = {
inputs: {
[key: string]: JsonValue
}
- message?: JsonValue
+ message?: JsonValue | null
message_files?: Array
- message_metadata_dict?: JsonValue
+ message_metadata_dict?: JsonValue | null
message_tokens?: number | null
parent_message_id?: string | null
provider_response_latency?: number | null
@@ -490,7 +490,12 @@ export type AppMcpServerResponse = {
description: string
id: string
name: string
- parameters: unknown
+ parameters:
+ | {
+ [key: string]: unknown
+ }
+ | Array
+ | string
server_code: string
status: AppMcpServerStatus
updated_at?: number | null
@@ -597,6 +602,15 @@ export type WorkflowTriggerListResponse = {
data: Array
}
+export type WorkflowExecutionStatus
+ = | 'failed'
+ | 'partial-succeeded'
+ | 'paused'
+ | 'running'
+ | 'scheduled'
+ | 'stopped'
+ | 'succeeded'
+
export type WorkflowAppLogPaginationResponse = {
data: Array
has_more: boolean
@@ -621,8 +635,8 @@ export type WorkflowRunPaginationResponse = {
export type WorkflowRunDetailResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
- created_by_end_user?: SimpleEndUser
+ created_by_account?: SimpleAccount | null
+ created_by_end_user?: SimpleEndUser | null
created_by_role?: string | null
elapsed_time?: number | null
error?: string | null
@@ -677,7 +691,7 @@ export type WorkflowCommentDetail = {
content: string
created_at?: number | null
created_by: string
- created_by_account?: WorkflowCommentAccount
+ created_by_account?: WorkflowCommentAccount | null
id: string
mentions: Array
position_x: number
@@ -686,7 +700,7 @@ export type WorkflowCommentDetail = {
resolved: boolean
resolved_at?: number | null
resolved_by?: string | null
- resolved_by_account?: WorkflowCommentAccount
+ resolved_by_account?: WorkflowCommentAccount | null
updated_at?: number | null
}
@@ -734,7 +748,7 @@ export type WorkflowPaginationResponse = {
export type WorkflowResponse = {
conversation_variables: Array
created_at: number
- created_by?: SimpleAccount
+ created_by?: SimpleAccount | null
environment_variables: Array
features: {
[key: string]: unknown
@@ -749,7 +763,7 @@ export type WorkflowResponse = {
rag_pipeline_variables: Array
tool_published: boolean
updated_at: number
- updated_by?: SimpleAccount
+ updated_by?: SimpleAccount | null
version: string
}
@@ -805,19 +819,19 @@ export type HumanInputDeliveryTestPayload = {
}
export type WorkflowAgentComposerResponse = {
- active_config_snapshot?: AgentConfigSnapshotSummaryResponse
- agent?: AgentComposerAgentResponse
+ active_config_snapshot?: AgentConfigSnapshotSummaryResponse | null
+ agent?: AgentComposerAgentResponse | null
agent_soul: AgentSoulConfig
app_id?: string | null
- binding?: AgentComposerBindingResponse
+ binding?: AgentComposerBindingResponse | null
effective_declared_outputs?: Array
- impact_summary?: AgentComposerImpactResponse
+ impact_summary?: AgentComposerImpactResponse | null
node_id?: string | null
node_job: WorkflowNodeJobConfig
save_options: Array
soul_lock: AgentComposerSoulLockResponse
- validation?: ComposerValidationFindingsResponse
- variant: string
+ validation?: ComposerValidationFindingsResponse | null
+ variant: 'workflow'
workflow_id?: string | null
}
@@ -829,8 +843,8 @@ export type AgentComposerImpactResponse = {
export type WorkflowRunNodeExecutionResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
- created_by_end_user?: SimpleEndUser
+ created_by_account?: SimpleAccount | null
+ created_by_end_user?: SimpleEndUser | null
created_by_role?: string | null
elapsed_time?: number | null
error?: string | null
@@ -893,7 +907,7 @@ export type OutputPreviewView = {
node_id: string
output_name: string
status: NodeOutputStatus
- type?: DeclaredOutputType
+ type?: DeclaredOutputType | null
value?: unknown
}
@@ -932,7 +946,7 @@ export type WorkflowDraftVariable = {
export type WorkflowDraftVariableUpdatePayload = {
name?: string | null
- value?: unknown
+ value?: unknown | null
}
export type PublishWorkflowPayload = {
@@ -969,7 +983,7 @@ export type ApiKeyItem = {
export type AppPartial = {
access_mode?: string | null
- app_model_config?: ModelConfigPartial
+ app_model_config?: ModelConfigPartial | null
author_name?: string | null
create_user_name?: string | null
created_at?: number | null
@@ -987,7 +1001,7 @@ export type AppPartial = {
updated_at?: number | null
updated_by?: string | null
use_icon_as_answer_icon?: boolean | null
- workflow?: WorkflowPartial
+ workflow?: WorkflowPartial | null
}
export type IconType = 'emoji' | 'image' | 'link'
@@ -1022,7 +1036,7 @@ export type ImportStatus = 'completed' | 'completed-with-warnings' | 'failed' |
export type PluginDependency = {
current_identifier?: string | null
type: Type
- value: unknown
+ value: Github | Marketplace | Package
}
export type WorkflowOnlineUsersByApp = {
@@ -1051,7 +1065,7 @@ export type Site = {
description?: string | null
icon?: string | null
icon_background?: string | null
- icon_type?: unknown
+ icon_type?: string | IconType | null
privacy_policy?: string | null
prompt_public?: boolean | null
show_workflow_steps?: boolean | null
@@ -1064,7 +1078,7 @@ export type Site = {
export type AdvancedChatWorkflowRunForListResponse = {
conversation_id?: string | null
created_at?: number | null
- created_by_account?: SimpleAccount
+ created_by_account?: SimpleAccount | null
elapsed_time?: number | null
exceptions_count?: number | null
finished_at?: number | null
@@ -1104,7 +1118,7 @@ export type AgentSoulConfig = {
knowledge?: AgentSoulKnowledgeConfig
memory?: AgentSoulMemoryConfig
misc_legacy?: AgentSoulAppFeaturesConfig
- model?: AgentSoulModelConfig
+ model?: AgentSoulModelConfig | null
prompt?: AgentSoulPromptConfig
sandbox?: AgentSoulSandboxConfig
schema_version?: number
@@ -1158,7 +1172,14 @@ export type AgentComposerSoulCandidatesResponse = {
dify_tools?: Array
human_contacts?: Array
knowledge_datasets?: Array
- skills_files?: Array
+ skills_files?: Array<
+ | ({
+ kind: 'skill'
+ } & AgentComposerSkillCandidateResponse)
+ | ({
+ kind: 'file'
+ } & AgentComposerFileCandidateResponse)
+ >
}
export type ComposerCandidateCapabilities = {
@@ -1184,7 +1205,7 @@ export type AgentFeatureToggleConfig = {
}
export type AgentSensitiveWordAvoidanceFeatureConfig = {
- config?: AgentModerationProviderConfig
+ config?: AgentModerationProviderConfig | null
enabled?: boolean
type?: string | null
[key: string]: unknown
@@ -1192,7 +1213,7 @@ export type AgentSensitiveWordAvoidanceFeatureConfig = {
export type AgentSuggestedQuestionsAfterAnswerFeatureConfig = {
enabled?: boolean
- model?: AgentSoulModelConfig
+ model?: AgentSoulModelConfig | null
prompt?: string | null
[key: string]: unknown
}
@@ -1222,7 +1243,7 @@ export type SandboxFileEntryResponse = {
export type SandboxToolFileResponse = {
reference: string
- transfer_method?: string
+ transfer_method?: 'tool_file'
}
export type AnnotationHitHistory = {
@@ -1236,7 +1257,7 @@ export type AnnotationHitHistory = {
}
export type ConversationWithSummary = {
- admin_feedback_stats?: FeedbackStat
+ admin_feedback_stats?: FeedbackStat | null
annotated: boolean
created_at?: number | null
from_account_id?: string | null
@@ -1246,14 +1267,14 @@ export type ConversationWithSummary = {
from_source: string
id: string
message_count: number
- model_config?: SimpleModelConfig
+ model_config?: SimpleModelConfig | null
name: string
read_at?: number | null
status: string
- status_count?: StatusCount
+ status_count?: StatusCount | null
summary_or_query: string
updated_at?: number | null
- user_feedback_stats?: FeedbackStat
+ user_feedback_stats?: FeedbackStat | null
}
export type FeedbackStat = {
@@ -1262,27 +1283,27 @@ export type FeedbackStat = {
}
export type Conversation = {
- admin_feedback_stats?: FeedbackStat
- annotation?: ConversationAnnotation
+ admin_feedback_stats?: FeedbackStat | null
+ annotation?: ConversationAnnotation | null
created_at?: number | null
- first_message?: SimpleMessageDetail
+ first_message?: SimpleMessageDetail | null
from_account_id?: string | null
from_account_name?: string | null
from_end_user_id?: string | null
from_end_user_session_id?: string | null
from_source: string
id: string
- model_config?: SimpleModelConfig
+ model_config?: SimpleModelConfig | null
read_at?: number | null
status: string
updated_at?: number | null
- user_feedback_stats?: FeedbackStat
+ user_feedback_stats?: FeedbackStat | null
}
export type MessageDetail = {
agent_thoughts: Array
- annotation?: ConversationAnnotation
- annotation_hit_history?: ConversationAnnotationHitHistory
+ annotation?: ConversationAnnotation | null
+ annotation_hit_history?: ConversationAnnotationHitHistory | null
answer_tokens: number
conversation_id: string
created_at?: number | null
@@ -1333,7 +1354,7 @@ export type AgentThought = {
}
export type ConversationAnnotation = {
- account?: SimpleAccount
+ account?: SimpleAccount | null
content: string
created_at?: number | null
id: string
@@ -1341,14 +1362,14 @@ export type ConversationAnnotation = {
}
export type ConversationAnnotationHitHistory = {
- annotation_create_account?: SimpleAccount
+ annotation_create_account?: SimpleAccount | null
created_at?: number | null
id: string
}
export type HumanInputContent = {
- form_definition?: HumanInputFormDefinition
- form_submission_data?: HumanInputFormSubmissionData
+ form_definition?: HumanInputFormDefinition | null
+ form_submission_data?: HumanInputFormSubmissionData | null
submitted: boolean
type?: ExecutionContentType
workflow_run_id: string
@@ -1356,7 +1377,7 @@ export type HumanInputContent = {
export type Feedback = {
content?: string | null
- from_account?: SimpleAccount
+ from_account?: SimpleAccount | null
from_end_user_id?: string | null
from_source: string
rating: string
@@ -1378,27 +1399,27 @@ export type AppMcpServerStatus = 'active' | 'inactive' | 'normal'
export type WorkflowAppLogPartialResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
- created_by_end_user?: SimpleEndUser
+ created_by_account?: SimpleAccount | null
+ created_by_end_user?: SimpleEndUser | null
created_by_role?: string | null
created_from?: string | null
details?: unknown
id: string
- workflow_run?: WorkflowRunForLogResponse
+ workflow_run?: WorkflowRunForLogResponse | null
}
export type WorkflowArchivedLogPartialResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
- created_by_end_user?: SimpleEndUser
+ created_by_account?: SimpleAccount | null
+ created_by_end_user?: SimpleEndUser | null
id: string
trigger_metadata?: unknown
- workflow_run?: WorkflowRunForArchivedLogResponse
+ workflow_run?: WorkflowRunForArchivedLogResponse | null
}
export type WorkflowRunForListResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
+ created_by_account?: SimpleAccount | null
elapsed_time?: number | null
exceptions_count?: number | null
finished_at?: number | null
@@ -1427,7 +1448,7 @@ export type WorkflowCommentBasic = {
content: string
created_at?: number | null
created_by: string
- created_by_account?: WorkflowCommentAccount
+ created_by_account?: WorkflowCommentAccount | null
id: string
mention_count: number
participants: Array
@@ -1437,7 +1458,7 @@ export type WorkflowCommentBasic = {
resolved: boolean
resolved_at?: number | null
resolved_by?: string | null
- resolved_by_account?: WorkflowCommentAccount
+ resolved_by_account?: WorkflowCommentAccount | null
updated_at?: number | null
}
@@ -1461,7 +1482,7 @@ export type WorkflowCommentAccount = {
}
export type WorkflowCommentMention = {
- mentioned_user_account?: WorkflowCommentAccount
+ mentioned_user_account?: WorkflowCommentAccount | null
mentioned_user_id: string
reply_id?: string | null
}
@@ -1470,7 +1491,7 @@ export type WorkflowCommentReply = {
content: string
created_at?: number | null
created_by: string
- created_by_account?: WorkflowCommentAccount
+ created_by_account?: WorkflowCommentAccount | null
id: string
}
@@ -1523,11 +1544,11 @@ export type AgentComposerBindingResponse = {
}
export type DeclaredOutputConfig = {
- array_item?: DeclaredArrayItem
- check?: DeclaredOutputCheckConfig
+ array_item?: DeclaredArrayItem | null
+ check?: DeclaredOutputCheckConfig | null
description?: string | null
failure_strategy?: DeclaredOutputFailureStrategy
- file?: DeclaredOutputFileConfig
+ file?: DeclaredOutputFileConfig | null
id?: string | null
name: string
required?: boolean
@@ -1546,24 +1567,15 @@ export type AgentComposerImpactBindingResponse = {
workflow_id: string
}
-export type WorkflowExecutionStatus
- = | 'failed'
- | 'partial-succeeded'
- | 'paused'
- | 'running'
- | 'scheduled'
- | 'stopped'
- | 'succeeded'
-
export type NodeStatus = 'failed' | 'idle' | 'ready' | 'running'
export type NodeOutputView = {
name: string
- output_check?: CheckResultView
+ output_check?: CheckResultView | null
retried?: number
status: NodeOutputStatus
- type?: DeclaredOutputType
- type_check?: CheckResultView
+ type?: DeclaredOutputType | null
+ type_check?: CheckResultView | null
value_preview?: unknown
}
@@ -1593,7 +1605,7 @@ export type WorkflowDraftVariableWithoutValue = {
export type ModelConfigPartial = {
created_at?: number | null
created_by?: string | null
- model_dict?: JsonValue
+ model_dict?: JsonValue | null
pre_prompt?: string | null
updated_at?: number | null
updated_by?: string | null
@@ -1632,12 +1644,12 @@ export type AgentStatus = 'active' | 'archived'
export type AgentSoulAppFeaturesConfig = {
opening_statement?: string | null
- retriever_resource?: AgentFeatureToggleConfig
- sensitive_word_avoidance?: AgentSensitiveWordAvoidanceFeatureConfig
- speech_to_text?: AgentFeatureToggleConfig
+ retriever_resource?: AgentFeatureToggleConfig | null
+ sensitive_word_avoidance?: AgentSensitiveWordAvoidanceFeatureConfig | null
+ speech_to_text?: AgentFeatureToggleConfig | null
suggested_questions?: Array | null
- suggested_questions_after_answer?: AgentSuggestedQuestionsAfterAnswerFeatureConfig
- text_to_speech?: AgentTextToSpeechFeatureConfig
+ suggested_questions_after_answer?: AgentSuggestedQuestionsAfterAnswerFeatureConfig | null
+ text_to_speech?: AgentTextToSpeechFeatureConfig | null
[key: string]: unknown
}
@@ -1661,7 +1673,7 @@ export type AgentSoulHumanConfig = {
export type AgentSoulKnowledgeConfig = {
datasets?: Array
query_config?: AgentKnowledgeQueryConfig
- query_mode?: AgentKnowledgeQueryMode
+ query_mode?: AgentKnowledgeQueryMode | null
}
export type AgentSoulMemoryConfig = {
@@ -1671,7 +1683,7 @@ export type AgentSoulMemoryConfig = {
}
export type AgentSoulModelConfig = {
- credential_ref?: AgentSoulModelCredentialRef
+ credential_ref?: AgentSoulModelCredentialRef | null
model: string
model_provider: string
model_settings?: AgentSoulModelSettings
@@ -1724,16 +1736,16 @@ export type WorkflowPreviousNodeOutputRef = {
name?: string | null
node_id?: string | null
output?: string | null
- selector?: Array | null
- value_selector?: Array | null
+ selector?: Array | null
+ value_selector?: Array | null
variable?: string | null
- variable_selector?: Array | null
+ variable_selector?: Array | null
[key: string]: unknown
}
export type AgentCliToolConfig = {
approved?: boolean
- authorization_status?: AgentCliToolAuthorizationStatus
+ authorization_status?: AgentCliToolAuthorizationStatus | null
command?: string | null
dangerous?: boolean
dangerous_accepted?: boolean
@@ -1751,11 +1763,11 @@ export type AgentCliToolConfig = {
}
label?: string | null
name?: string | null
- permission?: AgentPermissionConfig
+ permission?: AgentPermissionConfig | null
pre_authorized?: boolean | null
requires_confirmation?: boolean
risk_accepted?: boolean
- risk_level?: AgentCliToolRiskLevel
+ risk_level?: AgentCliToolRiskLevel | null
setup_command?: string | null
tool_name?: string | null
[key: string]: unknown
@@ -1783,7 +1795,7 @@ export type AgentComposerSkillCandidateResponse = {
description?: string | null
file_id?: string | null
id?: string | null
- kind?: string
+ kind?: 'skill'
name?: string | null
path?: string | null
[key: string]: unknown
@@ -1792,7 +1804,7 @@ export type AgentComposerSkillCandidateResponse = {
export type AgentComposerFileCandidateResponse = {
file_id?: string | null
id?: string | null
- kind?: string
+ kind?: 'file'
name?: string | null
reference?: string | null
remote_url?: string | null
@@ -1806,14 +1818,14 @@ export type AgentComposerFileCandidateResponse = {
export type AgentModerationProviderConfig = {
api_based_extension_id?: string | null
- inputs_config?: AgentModerationIoConfig
+ inputs_config?: AgentModerationIoConfig | null
keywords?: string | null
- outputs_config?: AgentModerationIoConfig
+ outputs_config?: AgentModerationIoConfig | null
[key: string]: unknown
}
export type SimpleModelConfig = {
- model_dict?: JsonValue
+ model_dict?: JsonValue | null
pre_prompt?: string | null
}
@@ -1891,9 +1903,9 @@ export type DeclaredArrayItem = {
}
export type DeclaredOutputCheckConfig = {
- benchmark_file_ref?: AgentFileRefConfig
+ benchmark_file_ref?: AgentFileRefConfig | null
enabled?: boolean
- model_ref?: AgentSoulModelConfig
+ model_ref?: AgentSoulModelConfig | null
prompt?: string | null
}
@@ -1919,7 +1931,7 @@ export type AgentSecretRefConfig = {
id?: string | null
key?: string | null
name?: string | null
- permission?: AgentPermissionConfig
+ permission?: AgentPermissionConfig | null
permission_status?: string | null
provider?: string | null
provider_credential_id?: string | null
@@ -1930,13 +1942,31 @@ export type AgentSecretRefConfig = {
}
export type AgentEnvVariableConfig = {
- default?: unknown
+ default?:
+ | string
+ | number
+ | number
+ | boolean
+ | Array
+ | Array
+ | Array
+ | Array
+ | null
env_name?: string | null
key?: string | null
name?: string | null
required?: boolean
type?: string | null
- value?: unknown
+ value?:
+ | string
+ | number
+ | number
+ | boolean
+ | Array
+ | Array
+ | Array
+ | Array
+ | null
variable?: string | null
[key: string]: unknown
}
@@ -1976,7 +2006,7 @@ export type AgentSoulModelSettings = {
frequency_penalty?: number | null
max_tokens?: number | null
presence_penalty?: number | null
- response_format?: AgentModelResponseFormatConfig
+ response_format?: AgentModelResponseFormatConfig | null
stop?: Array | null
temperature?: number | null
top_p?: number | null
@@ -2014,7 +2044,7 @@ export type AgentSkillRefConfig = {
}
export type AgentSoulDifyToolConfig = {
- credential_ref?: AgentSoulDifyToolCredentialRef
+ credential_ref?: AgentSoulDifyToolCredentialRef | null
credential_type?: 'api-key' | 'oauth2' | 'unauthorized'
description?: string | null
enabled?: boolean
@@ -2024,7 +2054,16 @@ export type AgentSoulDifyToolConfig = {
provider_id?: string | null
provider_type?: string
runtime_parameters?: {
- [key: string]: unknown
+ [key: string]:
+ | string
+ | number
+ | number
+ | boolean
+ | Array
+ | Array
+ | Array
+ | Array
+ | null
}
tool_name?: string | null
}
@@ -2064,7 +2103,19 @@ export type UserActionConfig = {
title: string
}
-export type FormInputConfig = unknown
+export type FormInputConfig
+ = | ({
+ type: 'paragraph'
+ } & ParagraphInputConfig)
+ | ({
+ type: 'select'
+ } & SelectInputConfig)
+ | ({
+ type: 'file'
+ } & FileInputConfig)
+ | ({
+ type: 'file-list'
+ } & FileListInputConfig)
export type JsonValue2 = unknown
@@ -2090,15 +2141,15 @@ export type AgentSoulDifyToolCredentialRef = {
export type ButtonStyle = 'accent' | 'default' | 'ghost' | 'primary'
export type ParagraphInputConfig = {
- default?: StringSource
+ default?: StringSource | null
output_variable_name: string
- type?: string
+ type?: 'paragraph'
}
export type SelectInputConfig = {
option_source: StringListSource
output_variable_name: string
- type?: string
+ type?: 'select'
}
export type FileInputConfig = {
@@ -2106,7 +2157,7 @@ export type FileInputConfig = {
allowed_file_types?: Array
allowed_file_upload_methods?: Array
output_variable_name: string
- type?: string
+ type?: 'file'
}
export type FileListInputConfig = {
@@ -2115,7 +2166,7 @@ export type FileListInputConfig = {
allowed_file_upload_methods?: Array
number_limits?: number
output_variable_name: string
- type?: string
+ type?: 'file-list'
}
export type StringSource = {
@@ -2144,7 +2195,7 @@ export type WorkflowCommentDetailWritable = {
content: string
created_at?: number | null
created_by: string
- created_by_account?: WorkflowCommentAccountWritable
+ created_by_account?: WorkflowCommentAccountWritable | null
id: string
mentions: Array
position_x: number
@@ -2153,7 +2204,7 @@ export type WorkflowCommentDetailWritable = {
resolved: boolean
resolved_at?: number | null
resolved_by?: string | null
- resolved_by_account?: WorkflowCommentAccountWritable
+ resolved_by_account?: WorkflowCommentAccountWritable | null
updated_at?: number | null
}
@@ -2161,7 +2212,7 @@ export type WorkflowCommentBasicWritable = {
content: string
created_at?: number | null
created_by: string
- created_by_account?: WorkflowCommentAccountWritable
+ created_by_account?: WorkflowCommentAccountWritable | null
id: string
mention_count: number
participants: Array
@@ -2171,7 +2222,7 @@ export type WorkflowCommentBasicWritable = {
resolved: boolean
resolved_at?: number | null
resolved_by?: string | null
- resolved_by_account?: WorkflowCommentAccountWritable
+ resolved_by_account?: WorkflowCommentAccountWritable | null
updated_at?: number | null
}
@@ -2182,7 +2233,7 @@ export type WorkflowCommentAccountWritable = {
}
export type WorkflowCommentMentionWritable = {
- mentioned_user_account?: WorkflowCommentAccountWritable
+ mentioned_user_account?: WorkflowCommentAccountWritable | null
mentioned_user_id: string
reply_id?: string | null
}
@@ -2191,7 +2242,7 @@ export type WorkflowCommentReplyWritable = {
content: string
created_at?: number | null
created_by: string
- created_by_account?: WorkflowCommentAccountWritable
+ created_by_account?: WorkflowCommentAccountWritable | null
id: string
}
@@ -2339,9 +2390,7 @@ export type DeleteAppsByAppIdErrors = {
export type DeleteAppsByAppIdError = DeleteAppsByAppIdErrors[keyof DeleteAppsByAppIdErrors]
export type DeleteAppsByAppIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByAppIdResponse = DeleteAppsByAppIdResponses[keyof DeleteAppsByAppIdResponses]
@@ -3144,9 +3193,7 @@ export type PostAppsByAppIdAnnotationsByAnnotationIdError
export type PostAppsByAppIdAnnotationsByAnnotationIdResponses = {
200: Annotation
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PostAppsByAppIdAnnotationsByAnnotationIdResponse
@@ -3290,9 +3337,7 @@ export type DeleteAppsByAppIdChatConversationsByConversationIdError
= DeleteAppsByAppIdChatConversationsByConversationIdErrors[keyof DeleteAppsByAppIdChatConversationsByConversationIdErrors]
export type DeleteAppsByAppIdChatConversationsByConversationIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByAppIdChatConversationsByConversationIdResponse
@@ -3454,9 +3499,7 @@ export type DeleteAppsByAppIdCompletionConversationsByConversationIdError
= DeleteAppsByAppIdCompletionConversationsByConversationIdErrors[keyof DeleteAppsByAppIdCompletionConversationsByConversationIdErrors]
export type DeleteAppsByAppIdCompletionConversationsByConversationIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByAppIdCompletionConversationsByConversationIdResponse
@@ -4247,9 +4290,7 @@ export type DeleteAppsByAppIdTraceConfigError
= DeleteAppsByAppIdTraceConfigErrors[keyof DeleteAppsByAppIdTraceConfigErrors]
export type DeleteAppsByAppIdTraceConfigResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByAppIdTraceConfigResponse
@@ -4384,7 +4425,7 @@ export type GetAppsByAppIdWorkflowAppLogsData = {
keyword?: string | null
limit?: number
page?: number
- status?: string | null
+ status?: WorkflowExecutionStatus | null
}
url: '/apps/{app_id}/workflow-app-logs'
}
@@ -4410,7 +4451,7 @@ export type GetAppsByAppIdWorkflowArchivedLogsData = {
keyword?: string | null
limit?: number
page?: number
- status?: string | null
+ status?: WorkflowExecutionStatus | null
}
url: '/apps/{app_id}/workflow-archived-logs'
}
@@ -4681,9 +4722,7 @@ export type DeleteAppsByAppIdWorkflowCommentsByCommentIdData = {
}
export type DeleteAppsByAppIdWorkflowCommentsByCommentIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByAppIdWorkflowCommentsByCommentIdResponse
@@ -4752,9 +4791,7 @@ export type DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdData = {
}
export type DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse
@@ -5426,9 +5463,7 @@ export type DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesData = {
}
export type DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse
@@ -5674,9 +5709,7 @@ export type DeleteAppsByAppIdWorkflowsDraftVariablesData = {
}
export type DeleteAppsByAppIdWorkflowsDraftVariablesResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByAppIdWorkflowsDraftVariablesResponse
@@ -5688,8 +5721,8 @@ export type GetAppsByAppIdWorkflowsDraftVariablesData = {
app_id: string
}
query?: {
- limit?: number
- page?: number
+ limit?: string
+ page?: string
}
url: '/apps/{app_id}/workflows/draft/variables'
}
@@ -5721,9 +5754,7 @@ export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdError
= DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors[keyof DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors]
export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse
@@ -5802,9 +5833,7 @@ export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetError
export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponses = {
200: WorkflowDraftVariable
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse
@@ -5964,7 +5993,9 @@ export type GetAppsByAppIdWorkflowsTriggersWebhookData = {
query: {
credential_id?: string | null
datasource_type: string
- inputs: string
+ inputs: {
+ [key: string]: unknown
+ }
}
url: '/apps/{app_id}/workflows/triggers/webhook'
}
@@ -6107,9 +6138,7 @@ export type DeleteAppsByResourceIdApiKeysByApiKeyIdData = {
}
export type DeleteAppsByResourceIdApiKeysByApiKeyIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsByResourceIdApiKeysByApiKeyIdResponse
diff --git a/packages/contracts/generated/api/console/apps/zod.gen.ts b/packages/contracts/generated/api/console/apps/zod.gen.ts
index 6f16228b794..14a8d50f4e0 100644
--- a/packages/contracts/generated/api/console/apps/zod.gen.ts
+++ b/packages/contracts/generated/api/console/apps/zod.gen.ts
@@ -394,6 +394,19 @@ export const zWorkflowTriggerListResponse = z.object({
data: z.array(zWorkflowTriggerResponse),
})
+/**
+ * WorkflowExecutionStatus
+ */
+export const zWorkflowExecutionStatus = z.enum([
+ 'failed',
+ 'partial-succeeded',
+ 'paused',
+ 'running',
+ 'scheduled',
+ 'stopped',
+ 'succeeded',
+])
+
/**
* WorkflowRunExportResponse
*/
@@ -580,7 +593,7 @@ export const zWorkflowDraftVariableList = z.object({
*/
export const zWorkflowDraftVariableUpdatePayload = z.object({
name: z.string().nullish(),
- value: z.unknown().optional(),
+ value: z.unknown().nullish(),
})
/**
@@ -642,7 +655,7 @@ export const zCreateAppPayload = z.object({
description: z.string().max(400).nullish(),
icon: z.string().nullish(),
icon_background: z.string().nullish(),
- icon_type: zIconType.optional(),
+ icon_type: zIconType.nullish(),
mode: z.enum(['advanced-chat', 'agent', 'agent-chat', 'chat', 'completion', 'workflow']),
name: z.string().min(1),
})
@@ -654,7 +667,7 @@ export const zUpdateAppPayload = z.object({
description: z.string().max(400).nullish(),
icon: z.string().nullish(),
icon_background: z.string().nullish(),
- icon_type: zIconType.optional(),
+ icon_type: zIconType.nullish(),
max_active_requests: z.int().nullish(),
name: z.string().min(1),
use_icon_as_answer_icon: z.boolean().nullish(),
@@ -667,7 +680,7 @@ export const zCopyAppPayload = z.object({
description: z.string().max(400).nullish(),
icon: z.string().nullish(),
icon_background: z.string().nullish(),
- icon_type: zIconType.optional(),
+ icon_type: zIconType.nullish(),
name: z.string().nullish(),
})
@@ -677,7 +690,7 @@ export const zCopyAppPayload = z.object({
export const zAppIconPayload = z.object({
icon: z.string().nullish(),
icon_background: z.string().nullish(),
- icon_type: zIconType.optional(),
+ icon_type: zIconType.nullish(),
})
/**
@@ -747,7 +760,7 @@ export const zSite = z.object({
description: z.string().nullish(),
icon: z.string().nullish(),
icon_background: z.string().nullish(),
- icon_type: z.unknown().optional(),
+ icon_type: z.union([z.string(), zIconType]).nullish(),
privacy_policy: z.string().nullish(),
prompt_public: z.boolean().nullish(),
show_workflow_steps: z.boolean().nullish(),
@@ -835,7 +848,7 @@ export const zComposerValidationWarningResponse = z.object({
export const zAgentComposerValidateResponse = z.object({
errors: z.array(z.string()).optional(),
knowledge_retrieval_placeholder: z.array(zComposerKnowledgePlaceholderResponse).optional(),
- result: z.string(),
+ result: z.literal('success'),
warnings: z.array(zComposerValidationWarningResponse).optional(),
})
@@ -906,7 +919,7 @@ export const zSandboxListResponse = z.object({
*/
export const zSandboxToolFileResponse = z.object({
reference: z.string(),
- transfer_method: z.string().optional().default('tool_file'),
+ transfer_method: z.literal('tool_file').optional().default('tool_file'),
})
/**
@@ -1021,7 +1034,7 @@ export const zAppMcpServerResponse = z.object({
description: z.string(),
id: z.string(),
name: z.string(),
- parameters: z.unknown(),
+ parameters: z.union([z.record(z.string(), z.unknown()), z.array(z.unknown()), z.string()]),
server_code: z.string(),
status: zAppMcpServerStatus,
updated_at: z.int().nullish(),
@@ -1042,7 +1055,7 @@ export const zSimpleAccount = z.object({
export const zAdvancedChatWorkflowRunForListResponse = z.object({
conversation_id: z.string().nullish(),
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
+ created_by_account: zSimpleAccount.nullish(),
elapsed_time: z.number().nullish(),
exceptions_count: z.int().nullish(),
finished_at: z.int().nullish(),
@@ -1068,7 +1081,7 @@ export const zAdvancedChatWorkflowRunPaginationResponse = z.object({
* ConversationAnnotation
*/
export const zConversationAnnotation = z.object({
- account: zSimpleAccount.optional(),
+ account: zSimpleAccount.nullish(),
content: z.string(),
created_at: z.int().nullish(),
id: z.string(),
@@ -1079,7 +1092,7 @@ export const zConversationAnnotation = z.object({
* ConversationAnnotationHitHistory
*/
export const zConversationAnnotationHitHistory = z.object({
- annotation_create_account: zSimpleAccount.optional(),
+ annotation_create_account: zSimpleAccount.nullish(),
created_at: z.int().nullish(),
id: z.string(),
})
@@ -1089,7 +1102,7 @@ export const zConversationAnnotationHitHistory = z.object({
*/
export const zFeedback = z.object({
content: z.string().nullish(),
- from_account: zSimpleAccount.optional(),
+ from_account: zSimpleAccount.nullish(),
from_end_user_id: z.string().nullish(),
from_source: z.string(),
rating: z.string(),
@@ -1100,8 +1113,8 @@ export const zFeedback = z.object({
*/
export const zMessageDetail = z.object({
agent_thoughts: z.array(zAgentThought),
- annotation: zConversationAnnotation.optional(),
- annotation_hit_history: zConversationAnnotationHitHistory.optional(),
+ annotation: zConversationAnnotation.nullish(),
+ annotation_hit_history: zConversationAnnotationHitHistory.nullish(),
answer_tokens: z.int(),
conversation_id: z.string(),
created_at: z.int().nullish(),
@@ -1129,7 +1142,7 @@ export const zMessageDetail = z.object({
*/
export const zWorkflowRunForListResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
+ created_by_account: zSimpleAccount.nullish(),
elapsed_time: z.number().nullish(),
exceptions_count: z.int().nullish(),
finished_at: z.int().nullish(),
@@ -1165,8 +1178,8 @@ export const zSimpleEndUser = z.object({
*/
export const zWorkflowRunDetailResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
- created_by_end_user: zSimpleEndUser.optional(),
+ created_by_account: zSimpleAccount.nullish(),
+ created_by_end_user: zSimpleEndUser.nullish(),
created_by_role: z.string().nullish(),
elapsed_time: z.number().nullish(),
error: z.string().nullish(),
@@ -1187,8 +1200,8 @@ export const zWorkflowRunDetailResponse = z.object({
*/
export const zWorkflowRunNodeExecutionResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
- created_by_end_user: zSimpleEndUser.optional(),
+ created_by_account: zSimpleAccount.nullish(),
+ created_by_end_user: zSimpleEndUser.nullish(),
created_by_role: z.string().nullish(),
elapsed_time: z.number().nullish(),
error: z.string().nullish(),
@@ -1243,7 +1256,7 @@ export const zWorkflowCommentMentionUsersPayload = z.object({
* WorkflowCommentAccount
*/
export const zWorkflowCommentAccount = z.object({
- avatar_url: z.string().readonly().nullable(),
+ avatar_url: z.string().nullable(),
email: z.string(),
id: z.string(),
name: z.string(),
@@ -1256,7 +1269,7 @@ export const zWorkflowCommentBasic = z.object({
content: z.string(),
created_at: z.int().nullish(),
created_by: z.string(),
- created_by_account: zWorkflowCommentAccount.optional(),
+ created_by_account: zWorkflowCommentAccount.nullish(),
id: z.string(),
mention_count: z.int(),
participants: z.array(zWorkflowCommentAccount),
@@ -1266,7 +1279,7 @@ export const zWorkflowCommentBasic = z.object({
resolved: z.boolean(),
resolved_at: z.int().nullish(),
resolved_by: z.string().nullish(),
- resolved_by_account: zWorkflowCommentAccount.optional(),
+ resolved_by_account: zWorkflowCommentAccount.nullish(),
updated_at: z.int().nullish(),
})
@@ -1281,7 +1294,7 @@ export const zWorkflowCommentBasicList = z.object({
* WorkflowCommentMention
*/
export const zWorkflowCommentMention = z.object({
- mentioned_user_account: zWorkflowCommentAccount.optional(),
+ mentioned_user_account: zWorkflowCommentAccount.nullish(),
mentioned_user_id: z.string(),
reply_id: z.string().nullish(),
})
@@ -1293,7 +1306,7 @@ export const zWorkflowCommentReply = z.object({
content: z.string(),
created_at: z.int().nullish(),
created_by: z.string(),
- created_by_account: zWorkflowCommentAccount.optional(),
+ created_by_account: zWorkflowCommentAccount.nullish(),
id: z.string(),
})
@@ -1304,7 +1317,7 @@ export const zWorkflowCommentDetail = z.object({
content: z.string(),
created_at: z.int().nullish(),
created_by: z.string(),
- created_by_account: zWorkflowCommentAccount.optional(),
+ created_by_account: zWorkflowCommentAccount.nullish(),
id: z.string(),
mentions: z.array(zWorkflowCommentMention),
position_x: z.number(),
@@ -1313,7 +1326,7 @@ export const zWorkflowCommentDetail = z.object({
resolved: z.boolean(),
resolved_at: z.int().nullish(),
resolved_by: z.string().nullish(),
- resolved_by_account: zWorkflowCommentAccount.optional(),
+ resolved_by_account: zWorkflowCommentAccount.nullish(),
updated_at: z.int().nullish(),
})
@@ -1365,7 +1378,7 @@ export const zPipelineVariableResponse = z.object({
export const zWorkflowResponse = z.object({
conversation_variables: z.array(zWorkflowConversationVariableResponse),
created_at: z.int(),
- created_by: zSimpleAccount.optional(),
+ created_by: zSimpleAccount.nullish(),
environment_variables: z.array(zWorkflowEnvironmentVariableResponse),
features: z.record(z.string(), z.unknown()),
graph: z.record(z.string(), z.unknown()),
@@ -1376,7 +1389,7 @@ export const zWorkflowResponse = z.object({
rag_pipeline_variables: z.array(zPipelineVariableResponse),
tool_published: z.boolean(),
updated_at: z.int(),
- updated_by: zSimpleAccount.optional(),
+ updated_by: zSimpleAccount.nullish(),
version: z.string(),
})
@@ -1417,19 +1430,6 @@ export const zAgentComposerImpactResponse = z.object({
workflow_node_count: z.int(),
})
-/**
- * WorkflowExecutionStatus
- */
-export const zWorkflowExecutionStatus = z.enum([
- 'failed',
- 'partial-succeeded',
- 'paused',
- 'running',
- 'scheduled',
- 'stopped',
- 'succeeded',
-])
-
/**
* NodeStatus
*
@@ -1471,7 +1471,7 @@ export const zOutputPreviewView = z.object({
node_id: z.string(),
output_name: z.string(),
status: zNodeOutputStatus,
- type: zDeclaredOutputType.optional(),
+ type: zDeclaredOutputType.nullish(),
value: z.unknown().optional(),
})
@@ -1498,7 +1498,7 @@ export const zWorkflowDraftVariableListWithoutValue = z.object({
export const zModelConfigPartial = z.object({
created_at: z.int().nullish(),
created_by: z.string().nullish(),
- model_dict: zJsonValue.optional(),
+ model_dict: zJsonValue.nullish(),
pre_prompt: z.string().nullish(),
updated_at: z.int().nullish(),
updated_by: z.string().nullish(),
@@ -1509,7 +1509,7 @@ export const zModelConfigPartial = z.object({
*/
export const zAppPartial = z.object({
access_mode: z.string().nullish(),
- app_model_config: zModelConfigPartial.optional(),
+ app_model_config: zModelConfigPartial.nullish(),
author_name: z.string().nullish(),
create_user_name: z.string().nullish(),
created_at: z.int().nullish(),
@@ -1527,7 +1527,7 @@ export const zAppPartial = z.object({
updated_at: z.int().nullish(),
updated_by: z.string().nullish(),
use_icon_as_answer_icon: z.boolean().nullish(),
- workflow: zWorkflowPartial.optional(),
+ workflow: zWorkflowPartial.nullish(),
})
/**
@@ -1563,7 +1563,7 @@ export const zModelConfig = z.object({
*/
export const zAppDetail = z.object({
access_mode: z.string().nullish(),
- app_model_config: zModelConfig.optional(),
+ app_model_config: zModelConfig.nullish(),
created_at: z.int().nullish(),
created_by: z.string().nullish(),
description: z.string().nullish(),
@@ -1575,11 +1575,11 @@ export const zAppDetail = z.object({
mode_compatible_with_agent: z.string(),
name: z.string(),
tags: z.array(zTag).optional(),
- tracing: zJsonValue.optional(),
+ tracing: zJsonValue.nullish(),
updated_at: z.int().nullish(),
updated_by: z.string().nullish(),
use_icon_as_answer_icon: z.boolean().nullish(),
- workflow: zWorkflowPartial.optional(),
+ workflow: zWorkflowPartial.nullish(),
})
/**
@@ -1588,7 +1588,7 @@ export const zAppDetail = z.object({
export const zAppDetailWithSite = z.object({
access_mode: z.string().nullish(),
api_base_url: z.string().nullish(),
- app_model_config: zModelConfig.optional(),
+ app_model_config: zModelConfig.nullish(),
bound_agent_id: z.string().nullish(),
created_at: z.int().nullish(),
created_by: z.string().nullish(),
@@ -1603,20 +1603,20 @@ export const zAppDetailWithSite = z.object({
max_active_requests: z.int().nullish(),
mode_compatible_with_agent: z.string(),
name: z.string(),
- site: zSite.optional(),
+ site: zSite.nullish(),
tags: z.array(zTag).optional(),
- tracing: zJsonValue.optional(),
+ tracing: zJsonValue.nullish(),
updated_at: z.int().nullish(),
updated_by: z.string().nullish(),
use_icon_as_answer_icon: z.boolean().nullish(),
- workflow: zWorkflowPartial.optional(),
+ workflow: zWorkflowPartial.nullish(),
})
/**
* ConversationDetail
*/
export const zConversationDetail = z.object({
- admin_feedback_stats: zFeedbackStat.optional(),
+ admin_feedback_stats: zFeedbackStat.nullish(),
annotated: z.boolean(),
created_at: z.int().nullish(),
from_account_id: z.string().nullish(),
@@ -1625,10 +1625,10 @@ export const zConversationDetail = z.object({
id: z.string(),
introduction: z.string().nullish(),
message_count: z.int(),
- model_config: zModelConfig.optional(),
+ model_config: zModelConfig.nullish(),
status: z.string(),
updated_at: z.int().nullish(),
- user_feedback_stats: zFeedbackStat.optional(),
+ user_feedback_stats: zFeedbackStat.nullish(),
})
/**
@@ -1636,12 +1636,12 @@ export const zConversationDetail = z.object({
*/
export const zConversationMessageDetail = z.object({
created_at: z.int().nullish(),
- first_message: zMessageDetail.optional(),
+ first_message: zMessageDetail.nullish(),
from_account_id: z.string().nullish(),
from_end_user_id: z.string().nullish(),
from_source: z.string(),
id: z.string(),
- model_config: zModelConfig.optional(),
+ model_config: zModelConfig.nullish(),
status: z.string(),
})
@@ -1650,22 +1650,6 @@ export const zConversationMessageDetail = z.object({
*/
export const zType = z.enum(['github', 'marketplace', 'package'])
-/**
- * PluginDependency
- */
-export const zPluginDependency = z.object({
- current_identifier: z.string().nullish(),
- type: zType,
- value: z.unknown(),
-})
-
-/**
- * CheckDependenciesResult
- */
-export const zCheckDependenciesResult = z.object({
- leaked_dependencies: z.array(zPluginDependency).optional(),
-})
-
/**
* Github
*/
@@ -1692,6 +1676,22 @@ export const zPackage = z.object({
version: z.string().nullish(),
})
+/**
+ * PluginDependency
+ */
+export const zPluginDependency = z.object({
+ current_identifier: z.string().nullish(),
+ type: zType,
+ value: z.union([zGithub, zMarketplace, zPackage]),
+})
+
+/**
+ * CheckDependenciesResult
+ */
+export const zCheckDependenciesResult = z.object({
+ leaked_dependencies: z.array(zPluginDependency).optional(),
+})
+
/**
* WorkflowOnlineUser
*/
@@ -1787,10 +1787,14 @@ export const zWorkflowPreviousNodeOutputRef = z.object({
name: z.string().max(255).nullish(),
node_id: z.string().max(255).nullish(),
output: z.string().max(255).nullish(),
- selector: z.array(z.unknown()).nullish(),
- value_selector: z.array(z.unknown()).nullish(),
+ selector: z.array(z.union([z.string(), z.int(), z.number(), z.boolean(), z.null()])).nullish(),
+ value_selector: z
+ .array(z.union([z.string(), z.int(), z.number(), z.boolean(), z.null()]))
+ .nullish(),
variable: z.string().max(255).nullish(),
- variable_selector: z.array(z.unknown()).nullish(),
+ variable_selector: z
+ .array(z.union([z.string(), z.int(), z.number(), z.boolean(), z.null()]))
+ .nullish(),
})
/**
@@ -1832,7 +1836,7 @@ export const zAgentComposerSkillCandidateResponse = z.object({
description: z.string().nullish(),
file_id: z.string().max(255).nullish(),
id: z.string().max(255).nullish(),
- kind: z.string().optional().default('skill'),
+ kind: z.literal('skill').optional().default('skill'),
name: z.string().max(255).nullish(),
path: z.string().nullish(),
})
@@ -1843,7 +1847,7 @@ export const zAgentComposerSkillCandidateResponse = z.object({
export const zAgentComposerFileCandidateResponse = z.object({
file_id: z.string().max(255).nullish(),
id: z.string().max(255).nullish(),
- kind: z.string().optional().default('file'),
+ kind: z.literal('file').optional().default('file'),
name: z.string().max(255).nullish(),
reference: z.string().max(255).nullish(),
remote_url: z.string().nullish(),
@@ -1858,7 +1862,7 @@ export const zAgentComposerFileCandidateResponse = z.object({
* SimpleModelConfig
*/
export const zSimpleModelConfig = z.object({
- model_dict: zJsonValue.optional(),
+ model_dict: zJsonValue.nullish(),
pre_prompt: z.string().nullish(),
})
@@ -1876,7 +1880,7 @@ export const zStatusCount = z.object({
* ConversationWithSummary
*/
export const zConversationWithSummary = z.object({
- admin_feedback_stats: zFeedbackStat.optional(),
+ admin_feedback_stats: zFeedbackStat.nullish(),
annotated: z.boolean(),
created_at: z.int().nullish(),
from_account_id: z.string().nullish(),
@@ -1886,14 +1890,14 @@ export const zConversationWithSummary = z.object({
from_source: z.string(),
id: z.string(),
message_count: z.int(),
- model_config: zSimpleModelConfig.optional(),
+ model_config: zSimpleModelConfig.nullish(),
name: z.string(),
read_at: z.int().nullish(),
status: z.string(),
- status_count: zStatusCount.optional(),
+ status_count: zStatusCount.nullish(),
summary_or_query: z.string(),
updated_at: z.int().nullish(),
- user_feedback_stats: zFeedbackStat.optional(),
+ user_feedback_stats: zFeedbackStat.nullish(),
})
/**
@@ -1921,21 +1925,21 @@ export const zSimpleMessageDetail = z.object({
* Conversation
*/
export const zConversation = z.object({
- admin_feedback_stats: zFeedbackStat.optional(),
- annotation: zConversationAnnotation.optional(),
+ admin_feedback_stats: zFeedbackStat.nullish(),
+ annotation: zConversationAnnotation.nullish(),
created_at: z.int().nullish(),
- first_message: zSimpleMessageDetail.optional(),
+ first_message: zSimpleMessageDetail.nullish(),
from_account_id: z.string().nullish(),
from_account_name: z.string().nullish(),
from_end_user_id: z.string().nullish(),
from_end_user_session_id: z.string().nullish(),
from_source: z.string(),
id: z.string(),
- model_config: zSimpleModelConfig.optional(),
+ model_config: zSimpleModelConfig.nullish(),
read_at: z.int().nullish(),
status: z.string(),
updated_at: z.int().nullish(),
- user_feedback_stats: zFeedbackStat.optional(),
+ user_feedback_stats: zFeedbackStat.nullish(),
})
/**
@@ -1976,13 +1980,13 @@ export const zWorkflowRunForLogResponse = z.object({
*/
export const zWorkflowAppLogPartialResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
- created_by_end_user: zSimpleEndUser.optional(),
+ created_by_account: zSimpleAccount.nullish(),
+ created_by_end_user: zSimpleEndUser.nullish(),
created_by_role: z.string().nullish(),
created_from: z.string().nullish(),
details: z.unknown().optional(),
id: z.string(),
- workflow_run: zWorkflowRunForLogResponse.optional(),
+ workflow_run: zWorkflowRunForLogResponse.nullish(),
})
/**
@@ -2012,11 +2016,11 @@ export const zWorkflowRunForArchivedLogResponse = z.object({
*/
export const zWorkflowArchivedLogPartialResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
- created_by_end_user: zSimpleEndUser.optional(),
+ created_by_account: zSimpleAccount.nullish(),
+ created_by_end_user: zSimpleEndUser.nullish(),
id: z.string(),
trigger_metadata: z.unknown().optional(),
- workflow_run: zWorkflowRunForArchivedLogResponse.optional(),
+ workflow_run: zWorkflowRunForArchivedLogResponse.nullish(),
})
/**
@@ -2088,11 +2092,11 @@ export const zCheckResultView = z.object({
*/
export const zNodeOutputView = z.object({
name: z.string(),
- output_check: zCheckResultView.optional(),
+ output_check: zCheckResultView.nullish(),
retried: z.int().optional().default(0),
status: zNodeOutputStatus,
- type: zDeclaredOutputType.optional(),
- type_check: zCheckResultView.optional(),
+ type: zDeclaredOutputType.nullish(),
+ type_check: zCheckResultView.nullish(),
value_preview: z.unknown().optional(),
})
@@ -2122,13 +2126,35 @@ export const zWorkflowRunSnapshotView = z.object({
* AgentEnvVariableConfig
*/
export const zAgentEnvVariableConfig = z.object({
- default: z.unknown().optional(),
+ default: z
+ .union([
+ z.string(),
+ z.int(),
+ z.number(),
+ z.boolean(),
+ z.array(z.string()),
+ z.array(z.int()),
+ z.array(z.number()),
+ z.array(z.boolean()),
+ ])
+ .nullish(),
env_name: z.string().max(255).nullish(),
key: z.string().max(255).nullish(),
name: z.string().max(255).nullish(),
required: z.boolean().optional().default(false),
type: z.string().max(64).nullish(),
- value: z.unknown().optional(),
+ value: z
+ .union([
+ z.string(),
+ z.int(),
+ z.number(),
+ z.boolean(),
+ z.array(z.string()),
+ z.array(z.int()),
+ z.array(z.number()),
+ z.array(z.boolean()),
+ ])
+ .nullish(),
variable: z.string().max(255).nullish(),
})
@@ -2170,7 +2196,7 @@ export const zAgentKnowledgeQueryMode = z.enum(['generated_query', 'user_query']
export const zAgentSoulKnowledgeConfig = z.object({
datasets: z.array(zAgentKnowledgeDatasetConfig).optional(),
query_config: zAgentKnowledgeQueryConfig.optional(),
- query_mode: zAgentKnowledgeQueryMode.optional(),
+ query_mode: zAgentKnowledgeQueryMode.nullish(),
})
/**
@@ -2302,7 +2328,7 @@ export const zAgentSecretRefConfig = z.object({
id: z.string().max(255).nullish(),
key: z.string().max(255).nullish(),
name: z.string().max(255).nullish(),
- permission: zAgentPermissionConfig.optional(),
+ permission: zAgentPermissionConfig.nullish(),
permission_status: z.string().max(64).nullish(),
provider: z.string().max(255).nullish(),
provider_credential_id: z.string().max(255).nullish(),
@@ -2339,7 +2365,7 @@ export const zAgentCliToolRiskLevel = z.enum(['dangerous', 'safe', 'unknown'])
*/
export const zAgentCliToolConfig = z.object({
approved: z.boolean().optional().default(false),
- authorization_status: zAgentCliToolAuthorizationStatus.optional(),
+ authorization_status: zAgentCliToolAuthorizationStatus.nullish(),
command: z.string().nullish(),
dangerous: z.boolean().optional().default(false),
dangerous_accepted: z.boolean().optional().default(false),
@@ -2355,11 +2381,11 @@ export const zAgentCliToolConfig = z.object({
invoke_metadata: z.record(z.string(), z.unknown()).optional(),
label: z.string().max(255).nullish(),
name: z.string().max(255).nullish(),
- permission: zAgentPermissionConfig.optional(),
+ permission: zAgentPermissionConfig.nullish(),
pre_authorized: z.boolean().nullish(),
requires_confirmation: z.boolean().optional().default(false),
risk_accepted: z.boolean().optional().default(false),
- risk_level: zAgentCliToolRiskLevel.optional(),
+ risk_level: zAgentCliToolRiskLevel.nullish(),
setup_command: z.string().nullish(),
tool_name: z.string().max(255).nullish(),
})
@@ -2372,7 +2398,22 @@ export const zAgentComposerSoulCandidatesResponse = z.object({
dify_tools: z.array(zAgentComposerDifyToolCandidateResponse).optional(),
human_contacts: z.array(zAgentHumanContactConfig).optional(),
knowledge_datasets: z.array(zAgentKnowledgeDatasetConfig).optional(),
- skills_files: z.array(z.unknown()).optional(),
+ skills_files: z
+ .array(
+ z.union([
+ z
+ .object({
+ kind: z.literal('skill'),
+ })
+ .and(zAgentComposerSkillCandidateResponse),
+ z
+ .object({
+ kind: z.literal('file'),
+ })
+ .and(zAgentComposerFileCandidateResponse),
+ ]),
+ )
+ .optional(),
})
/**
@@ -2399,22 +2440,20 @@ export const zAgentModerationIoConfig = z.object({
*/
export const zAgentModerationProviderConfig = z.object({
api_based_extension_id: z.string().nullish(),
- inputs_config: zAgentModerationIoConfig.optional(),
+ inputs_config: zAgentModerationIoConfig.nullish(),
keywords: z.string().nullish(),
- outputs_config: zAgentModerationIoConfig.optional(),
+ outputs_config: zAgentModerationIoConfig.nullish(),
})
/**
* AgentSensitiveWordAvoidanceFeatureConfig
*/
export const zAgentSensitiveWordAvoidanceFeatureConfig = z.object({
- config: zAgentModerationProviderConfig.optional(),
+ config: zAgentModerationProviderConfig.nullish(),
enabled: z.boolean().optional().default(false),
type: z.string().nullish(),
})
-export const zFormInputConfig = z.unknown()
-
export const zJsonValue2 = z.unknown()
/**
@@ -2461,7 +2500,7 @@ export const zDeclaredOutputRetryConfig = z.object({
*/
export const zDeclaredOutputFailureStrategy = z.object({
default_value: z.unknown().optional(),
- on_failure: zOutputErrorStrategy.optional(),
+ on_failure: zOutputErrorStrategy.optional().default('stop'),
retry: zDeclaredOutputRetryConfig.optional(),
})
@@ -2479,7 +2518,7 @@ export const zAgentSoulModelSettings = z.object({
frequency_penalty: z.number().nullish(),
max_tokens: z.int().nullish(),
presence_penalty: z.number().nullish(),
- response_format: zAgentModelResponseFormatConfig.optional(),
+ response_format: zAgentModelResponseFormatConfig.nullish(),
stop: z.array(z.string()).nullish(),
temperature: z.number().nullish(),
top_p: z.number().nullish(),
@@ -2491,7 +2530,7 @@ export const zAgentSoulModelSettings = z.object({
* Stable model selection for Agent runtime without storing secret values.
*/
export const zAgentSoulModelConfig = z.object({
- credential_ref: zAgentSoulModelCredentialRef.optional(),
+ credential_ref: zAgentSoulModelCredentialRef.nullish(),
model: z.string().min(1).max(255),
model_provider: z.string().min(1).max(255),
model_settings: zAgentSoulModelSettings.optional(),
@@ -2503,7 +2542,7 @@ export const zAgentSoulModelConfig = z.object({
*/
export const zAgentSuggestedQuestionsAfterAnswerFeatureConfig = z.object({
enabled: z.boolean().optional().default(false),
- model: zAgentSoulModelConfig.optional(),
+ model: zAgentSoulModelConfig.nullish(),
prompt: z.string().nullish(),
})
@@ -2517,12 +2556,12 @@ export const zAgentSuggestedQuestionsAfterAnswerFeatureConfig = z.object({
*/
export const zAgentAppFeaturesPayload = z.object({
opening_statement: z.string().nullish(),
- retriever_resource: zAgentFeatureToggleConfig.optional(),
- sensitive_word_avoidance: zAgentSensitiveWordAvoidanceFeatureConfig.optional(),
- speech_to_text: zAgentFeatureToggleConfig.optional(),
+ retriever_resource: zAgentFeatureToggleConfig.nullish(),
+ sensitive_word_avoidance: zAgentSensitiveWordAvoidanceFeatureConfig.nullish(),
+ speech_to_text: zAgentFeatureToggleConfig.nullish(),
suggested_questions: z.array(z.string()).nullish(),
- suggested_questions_after_answer: zAgentSuggestedQuestionsAfterAnswerFeatureConfig.optional(),
- text_to_speech: zAgentTextToSpeechFeatureConfig.optional(),
+ suggested_questions_after_answer: zAgentSuggestedQuestionsAfterAnswerFeatureConfig.nullish(),
+ text_to_speech: zAgentTextToSpeechFeatureConfig.nullish(),
})
/**
@@ -2530,12 +2569,12 @@ export const zAgentAppFeaturesPayload = z.object({
*/
export const zAgentSoulAppFeaturesConfig = z.object({
opening_statement: z.string().nullish(),
- retriever_resource: zAgentFeatureToggleConfig.optional(),
- sensitive_word_avoidance: zAgentSensitiveWordAvoidanceFeatureConfig.optional(),
- speech_to_text: zAgentFeatureToggleConfig.optional(),
+ retriever_resource: zAgentFeatureToggleConfig.nullish(),
+ sensitive_word_avoidance: zAgentSensitiveWordAvoidanceFeatureConfig.nullish(),
+ speech_to_text: zAgentFeatureToggleConfig.nullish(),
suggested_questions: z.array(z.string()).nullish(),
- suggested_questions_after_answer: zAgentSuggestedQuestionsAfterAnswerFeatureConfig.optional(),
- text_to_speech: zAgentTextToSpeechFeatureConfig.optional(),
+ suggested_questions_after_answer: zAgentSuggestedQuestionsAfterAnswerFeatureConfig.nullish(),
+ text_to_speech: zAgentTextToSpeechFeatureConfig.nullish(),
})
/**
@@ -2546,9 +2585,9 @@ export const zAgentSoulAppFeaturesConfig = z.object({
* Per PRD §OUTPUT 配置框, output check is **file-only** and optional. Stage 4 §4.3.
*/
export const zDeclaredOutputCheckConfig = z.object({
- benchmark_file_ref: zAgentFileRefConfig.optional(),
+ benchmark_file_ref: zAgentFileRefConfig.nullish(),
enabled: z.boolean().optional().default(false),
- model_ref: zAgentSoulModelConfig.optional(),
+ model_ref: zAgentSoulModelConfig.nullish(),
prompt: z.string().nullish(),
})
@@ -2562,11 +2601,11 @@ export const zDeclaredOutputCheckConfig = z.object({
* code can call ``output.failure_strategy.on_failure`` without None-guards.
*/
export const zDeclaredOutputConfig = z.object({
- array_item: zDeclaredArrayItem.optional(),
- check: zDeclaredOutputCheckConfig.optional(),
+ array_item: zDeclaredArrayItem.nullish(),
+ check: zDeclaredOutputCheckConfig.nullish(),
description: z.string().nullish(),
failure_strategy: zDeclaredOutputFailureStrategy.optional(),
- file: zDeclaredOutputFileConfig.optional(),
+ file: zDeclaredOutputFileConfig.nullish(),
id: z.string().nullish(),
name: z.string().min(1).max(255),
required: z.boolean().optional().default(true),
@@ -2580,7 +2619,7 @@ export const zWorkflowNodeJobConfig = z.object({
declared_outputs: z.array(zDeclaredOutputConfig).optional(),
human_contacts: z.array(zAgentHumanContactConfig).optional(),
metadata: zWorkflowNodeJobMetadata.optional(),
- mode: zWorkflowNodeJobMode.optional(),
+ mode: zWorkflowNodeJobMode.optional().default('tell_agent_what_to_do'),
previous_node_output_refs: z.array(zWorkflowPreviousNodeOutputRef).optional(),
schema_version: z.int().optional().default(1),
workflow_prompt: z.string().optional().default(''),
@@ -2612,7 +2651,7 @@ export const zAgentSoulDifyToolCredentialRef = z.object({
* new callers should send ``plugin_id`` + ``provider`` when available.
*/
export const zAgentSoulDifyToolConfig = z.object({
- credential_ref: zAgentSoulDifyToolCredentialRef.optional(),
+ credential_ref: zAgentSoulDifyToolCredentialRef.nullish(),
credential_type: z.enum(['api-key', 'oauth2', 'unauthorized']).optional().default('api-key'),
description: z.string().nullish(),
enabled: z.boolean().optional().default(true),
@@ -2621,7 +2660,23 @@ export const zAgentSoulDifyToolConfig = z.object({
provider: z.string().max(255).nullish(),
provider_id: z.string().max(255).nullish(),
provider_type: z.string().optional().default('plugin'),
- runtime_parameters: z.record(z.string(), z.unknown()).optional(),
+ runtime_parameters: z
+ .record(
+ z.string(),
+ z
+ .union([
+ z.string(),
+ z.int(),
+ z.number(),
+ z.boolean(),
+ z.array(z.string()),
+ z.array(z.int()),
+ z.array(z.number()),
+ z.array(z.boolean()),
+ ])
+ .nullable(),
+ )
+ .optional(),
tool_name: z.string().min(1).max(255).nullish(),
})
@@ -2644,7 +2699,7 @@ export const zAgentSoulConfig = z.object({
knowledge: zAgentSoulKnowledgeConfig.optional(),
memory: zAgentSoulMemoryConfig.optional(),
misc_legacy: zAgentSoulAppFeaturesConfig.optional(),
- model: zAgentSoulModelConfig.optional(),
+ model: zAgentSoulModelConfig.nullish(),
prompt: zAgentSoulPromptConfig.optional(),
sandbox: zAgentSoulSandboxConfig.optional(),
schema_version: z.int().optional().default(1),
@@ -2660,20 +2715,20 @@ export const zAgentAppComposerResponse = z.object({
agent: zAgentComposerAgentResponse,
agent_soul: zAgentSoulConfig,
save_options: z.array(zComposerSaveStrategy),
- validation: zComposerValidationFindingsResponse.optional(),
- variant: z.string(),
+ validation: zComposerValidationFindingsResponse.nullish(),
+ variant: z.literal('agent_app'),
})
/**
* ComposerSavePayload
*/
export const zComposerSavePayload = z.object({
- agent_soul: zAgentSoulConfig.optional(),
- binding: zComposerBindingPayload.optional(),
+ agent_soul: zAgentSoulConfig.nullish(),
+ binding: zComposerBindingPayload.nullish(),
client_revision_id: z.string().nullish(),
idempotency_key: z.string().nullish(),
new_agent_name: z.string().min(1).max(255).nullish(),
- node_job: zWorkflowNodeJobConfig.optional(),
+ node_job: zWorkflowNodeJobConfig.nullish(),
save_strategy: zComposerSaveStrategy,
soul_lock: zComposerSoulLockPayload.optional(),
variant: zComposerVariant,
@@ -2684,19 +2739,19 @@ export const zComposerSavePayload = z.object({
* WorkflowAgentComposerResponse
*/
export const zWorkflowAgentComposerResponse = z.object({
- active_config_snapshot: zAgentConfigSnapshotSummaryResponse.optional(),
- agent: zAgentComposerAgentResponse.optional(),
+ active_config_snapshot: zAgentConfigSnapshotSummaryResponse.nullish(),
+ agent: zAgentComposerAgentResponse.nullish(),
agent_soul: zAgentSoulConfig,
app_id: z.string().nullish(),
- binding: zAgentComposerBindingResponse.optional(),
+ binding: zAgentComposerBindingResponse.nullish(),
effective_declared_outputs: z.array(zDeclaredOutputConfig).optional(),
- impact_summary: zAgentComposerImpactResponse.optional(),
+ impact_summary: zAgentComposerImpactResponse.nullish(),
node_id: z.string().nullish(),
node_job: zWorkflowNodeJobConfig,
save_options: z.array(zComposerSaveStrategy),
soul_lock: zAgentComposerSoulLockResponse,
- validation: zComposerValidationFindingsResponse.optional(),
- variant: z.string(),
+ validation: zComposerValidationFindingsResponse.nullish(),
+ variant: z.literal('workflow'),
workflow_id: z.string().nullish(),
})
@@ -2713,77 +2768,11 @@ export const zButtonStyle = z.enum(['accent', 'default', 'ghost', 'primary'])
* User action configuration.
*/
export const zUserActionConfig = z.object({
- button_style: zButtonStyle.optional(),
+ button_style: zButtonStyle.optional().default('default'),
id: z.string().max(20),
title: z.string().max(100),
})
-/**
- * HumanInputFormDefinition
- */
-export const zHumanInputFormDefinition = z.object({
- actions: z.array(zUserActionConfig).optional(),
- display_in_ui: z.boolean().optional().default(false),
- expiration_time: z.int(),
- form_content: z.string(),
- form_id: z.string(),
- form_token: z.string().nullish(),
- inputs: z.array(zFormInputConfig).optional(),
- node_id: z.string(),
- node_title: z.string(),
- resolved_default_values: z.record(z.string(), z.unknown()).optional(),
-})
-
-/**
- * HumanInputContent
- */
-export const zHumanInputContent = z.object({
- form_definition: zHumanInputFormDefinition.optional(),
- form_submission_data: zHumanInputFormSubmissionData.optional(),
- submitted: z.boolean(),
- type: zExecutionContentType.optional(),
- workflow_run_id: z.string(),
-})
-
-/**
- * MessageDetailResponse
- */
-export const zMessageDetailResponse = z.object({
- agent_thoughts: z.array(zAgentThought).optional(),
- annotation: zConversationAnnotation.optional(),
- annotation_hit_history: zConversationAnnotationHitHistory.optional(),
- answer_tokens: z.int().nullish(),
- conversation_id: z.string(),
- created_at: z.int().nullish(),
- error: z.string().nullish(),
- extra_contents: z.array(zHumanInputContent).optional(),
- feedbacks: z.array(zFeedback).optional(),
- from_account_id: z.string().nullish(),
- from_end_user_id: z.string().nullish(),
- from_source: z.string(),
- id: z.string(),
- inputs: z.record(z.string(), zJsonValue),
- message: zJsonValue.optional(),
- message_files: z.array(zMessageFile).optional(),
- message_metadata_dict: zJsonValue.optional(),
- message_tokens: z.int().nullish(),
- parent_message_id: z.string().nullish(),
- provider_response_latency: z.number().nullish(),
- query: z.string(),
- re_sign_file_url_answer: z.string(),
- status: z.string(),
- workflow_run_id: z.string().nullish(),
-})
-
-/**
- * MessageInfiniteScrollPaginationResponse
- */
-export const zMessageInfiniteScrollPaginationResponse = z.object({
- data: z.array(zMessageDetailResponse),
- has_more: z.boolean(),
- limit: z.int(),
-})
-
/**
* FileType
*/
@@ -2807,7 +2796,7 @@ export const zFileInputConfig = z.object({
allowed_file_types: z.array(zFileType).optional(),
allowed_file_upload_methods: z.array(zFileTransferMethod).optional(),
output_variable_name: z.string(),
- type: z.string().optional().default('file'),
+ type: z.literal('file').optional().default('file'),
})
/**
@@ -2819,7 +2808,7 @@ export const zFileListInputConfig = z.object({
allowed_file_upload_methods: z.array(zFileTransferMethod).optional(),
number_limits: z.int().gte(0).optional().default(0),
output_variable_name: z.string(),
- type: z.string().optional().default('file-list'),
+ type: z.literal('file-list').optional().default('file-list'),
})
/**
@@ -2847,9 +2836,9 @@ export const zStringSource = z.object({
* Form input definition.
*/
export const zParagraphInputConfig = z.object({
- default: zStringSource.optional(),
+ default: zStringSource.nullish(),
output_variable_name: z.string(),
- type: z.string().optional().default('paragraph'),
+ type: z.literal('paragraph').optional().default('paragraph'),
})
/**
@@ -2867,7 +2856,80 @@ export const zStringListSource = z.object({
export const zSelectInputConfig = z.object({
option_source: zStringListSource,
output_variable_name: z.string(),
- type: z.string().optional().default('select'),
+ type: z.literal('select').optional().default('select'),
+})
+
+export const zFormInputConfig = z.discriminatedUnion('type', [
+ zParagraphInputConfig.extend({ type: z.literal('paragraph') }),
+ zSelectInputConfig.extend({ type: z.literal('select') }),
+ zFileInputConfig.extend({ type: z.literal('file') }),
+ zFileListInputConfig.extend({ type: z.literal('file-list') }),
+])
+
+/**
+ * HumanInputFormDefinition
+ */
+export const zHumanInputFormDefinition = z.object({
+ actions: z.array(zUserActionConfig).optional(),
+ display_in_ui: z.boolean().optional().default(false),
+ expiration_time: z.int(),
+ form_content: z.string(),
+ form_id: z.string(),
+ form_token: z.string().nullish(),
+ inputs: z.array(zFormInputConfig).optional(),
+ node_id: z.string(),
+ node_title: z.string(),
+ resolved_default_values: z.record(z.string(), z.unknown()).optional(),
+})
+
+/**
+ * HumanInputContent
+ */
+export const zHumanInputContent = z.object({
+ form_definition: zHumanInputFormDefinition.nullish(),
+ form_submission_data: zHumanInputFormSubmissionData.nullish(),
+ submitted: z.boolean(),
+ type: zExecutionContentType.optional().default('human_input'),
+ workflow_run_id: z.string(),
+})
+
+/**
+ * MessageDetailResponse
+ */
+export const zMessageDetailResponse = z.object({
+ agent_thoughts: z.array(zAgentThought).optional(),
+ annotation: zConversationAnnotation.nullish(),
+ annotation_hit_history: zConversationAnnotationHitHistory.nullish(),
+ answer_tokens: z.int().nullish(),
+ conversation_id: z.string(),
+ created_at: z.int().nullish(),
+ error: z.string().nullish(),
+ extra_contents: z.array(zHumanInputContent).optional(),
+ feedbacks: z.array(zFeedback).optional(),
+ from_account_id: z.string().nullish(),
+ from_end_user_id: z.string().nullish(),
+ from_source: z.string(),
+ id: z.string(),
+ inputs: z.record(z.string(), zJsonValue),
+ message: zJsonValue.nullish(),
+ message_files: z.array(zMessageFile).optional(),
+ message_metadata_dict: zJsonValue.nullish(),
+ message_tokens: z.int().nullish(),
+ parent_message_id: z.string().nullish(),
+ provider_response_latency: z.number().nullish(),
+ query: z.string(),
+ re_sign_file_url_answer: z.string(),
+ status: z.string(),
+ workflow_run_id: z.string().nullish(),
+})
+
+/**
+ * MessageInfiniteScrollPaginationResponse
+ */
+export const zMessageInfiniteScrollPaginationResponse = z.object({
+ data: z.array(zMessageDetailResponse),
+ has_more: z.boolean(),
+ limit: z.int(),
})
/**
@@ -2886,7 +2948,7 @@ export const zWorkflowCommentBasicWritable = z.object({
content: z.string(),
created_at: z.int().nullish(),
created_by: z.string(),
- created_by_account: zWorkflowCommentAccountWritable.optional(),
+ created_by_account: zWorkflowCommentAccountWritable.nullish(),
id: z.string(),
mention_count: z.int(),
participants: z.array(zWorkflowCommentAccountWritable),
@@ -2896,7 +2958,7 @@ export const zWorkflowCommentBasicWritable = z.object({
resolved: z.boolean(),
resolved_at: z.int().nullish(),
resolved_by: z.string().nullish(),
- resolved_by_account: zWorkflowCommentAccountWritable.optional(),
+ resolved_by_account: zWorkflowCommentAccountWritable.nullish(),
updated_at: z.int().nullish(),
})
@@ -2911,7 +2973,7 @@ export const zWorkflowCommentBasicListWritable = z.object({
* WorkflowCommentMention
*/
export const zWorkflowCommentMentionWritable = z.object({
- mentioned_user_account: zWorkflowCommentAccountWritable.optional(),
+ mentioned_user_account: zWorkflowCommentAccountWritable.nullish(),
mentioned_user_id: z.string(),
reply_id: z.string().nullish(),
})
@@ -2923,7 +2985,7 @@ export const zWorkflowCommentReplyWritable = z.object({
content: z.string(),
created_at: z.int().nullish(),
created_by: z.string(),
- created_by_account: zWorkflowCommentAccountWritable.optional(),
+ created_by_account: zWorkflowCommentAccountWritable.nullish(),
id: z.string(),
})
@@ -2934,7 +2996,7 @@ export const zWorkflowCommentDetailWritable = z.object({
content: z.string(),
created_at: z.int().nullish(),
created_by: z.string(),
- created_by_account: zWorkflowCommentAccountWritable.optional(),
+ created_by_account: zWorkflowCommentAccountWritable.nullish(),
id: z.string(),
mentions: z.array(zWorkflowCommentMentionWritable),
position_x: z.number(),
@@ -2943,7 +3005,7 @@ export const zWorkflowCommentDetailWritable = z.object({
resolved: z.boolean(),
resolved_at: z.int().nullish(),
resolved_by: z.string().nullish(),
- resolved_by_account: zWorkflowCommentAccountWritable.optional(),
+ resolved_by_account: zWorkflowCommentAccountWritable.nullish(),
updated_at: z.int().nullish(),
})
@@ -3020,7 +3082,7 @@ export const zDeleteAppsByAppIdPath = z.object({
/**
* App deleted successfully
*/
-export const zDeleteAppsByAppIdResponse = z.record(z.string(), z.never())
+export const zDeleteAppsByAppIdResponse = z.void()
export const zGetAppsByAppIdPath = z.object({
app_id: z.string(),
@@ -3424,10 +3486,7 @@ export const zPostAppsByAppIdAnnotationsByAnnotationIdPath = z.object({
app_id: z.string(),
})
-export const zPostAppsByAppIdAnnotationsByAnnotationIdResponse = z.union([
- zAnnotation,
- z.record(z.string(), z.never()),
-])
+export const zPostAppsByAppIdAnnotationsByAnnotationIdResponse = z.union([zAnnotation, z.void()])
export const zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesPath = z.object({
annotation_id: z.string(),
@@ -3495,10 +3554,7 @@ export const zDeleteAppsByAppIdChatConversationsByConversationIdPath = z.object(
/**
* Conversation deleted successfully
*/
-export const zDeleteAppsByAppIdChatConversationsByConversationIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteAppsByAppIdChatConversationsByConversationIdResponse = z.void()
export const zGetAppsByAppIdChatConversationsByConversationIdPath = z.object({
app_id: z.string(),
@@ -3572,10 +3628,7 @@ export const zDeleteAppsByAppIdCompletionConversationsByConversationIdPath = z.o
/**
* Conversation deleted successfully
*/
-export const zDeleteAppsByAppIdCompletionConversationsByConversationIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteAppsByAppIdCompletionConversationsByConversationIdResponse = z.void()
export const zGetAppsByAppIdCompletionConversationsByConversationIdPath = z.object({
app_id: z.string(),
@@ -3982,7 +4035,7 @@ export const zDeleteAppsByAppIdTraceConfigPath = z.object({
/**
* Tracing configuration deleted successfully
*/
-export const zDeleteAppsByAppIdTraceConfigResponse = z.record(z.string(), z.never())
+export const zDeleteAppsByAppIdTraceConfigResponse = z.void()
export const zGetAppsByAppIdTraceConfigPath = z.object({
app_id: z.string(),
@@ -4052,7 +4105,7 @@ export const zGetAppsByAppIdWorkflowAppLogsQuery = z.object({
keyword: z.string().nullish(),
limit: z.int().gte(1).lte(100).optional().default(20),
page: z.int().gte(1).lte(99999).optional().default(1),
- status: z.string().nullish(),
+ status: zWorkflowExecutionStatus.nullish(),
})
/**
@@ -4073,7 +4126,7 @@ export const zGetAppsByAppIdWorkflowArchivedLogsQuery = z.object({
keyword: z.string().nullish(),
limit: z.int().gte(1).lte(100).optional().default(20),
page: z.int().gte(1).lte(99999).optional().default(1),
- status: z.string().nullish(),
+ status: zWorkflowExecutionStatus.nullish(),
})
/**
@@ -4245,7 +4298,7 @@ export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdPath = z.object({
/**
* Comment deleted successfully
*/
-export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdResponse = z.record(z.string(), z.never())
+export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdResponse = z.void()
export const zGetAppsByAppIdWorkflowCommentsByCommentIdPath = z.object({
app_id: z.string(),
@@ -4291,10 +4344,7 @@ export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath =
/**
* Reply deleted successfully
*/
-export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse = z.void()
export const zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdBody
= zWorkflowCommentReplyPayload
@@ -4713,10 +4763,7 @@ export const zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath = z.obje
/**
* Node variables deleted successfully
*/
-export const zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse = z.void()
export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({
app_id: z.string(),
@@ -4826,15 +4873,15 @@ export const zDeleteAppsByAppIdWorkflowsDraftVariablesPath = z.object({
/**
* Workflow variables deleted successfully
*/
-export const zDeleteAppsByAppIdWorkflowsDraftVariablesResponse = z.record(z.string(), z.never())
+export const zDeleteAppsByAppIdWorkflowsDraftVariablesResponse = z.void()
export const zGetAppsByAppIdWorkflowsDraftVariablesPath = z.object({
app_id: z.string(),
})
export const zGetAppsByAppIdWorkflowsDraftVariablesQuery = z.object({
- limit: z.int().gte(1).lte(100).optional().default(20),
- page: z.int().gte(1).lte(100000).optional().default(1),
+ limit: z.string().optional(),
+ page: z.string().optional(),
})
/**
@@ -4850,10 +4897,7 @@ export const zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdPath = z.objec
/**
* Variable deleted successfully
*/
-export const zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse = z.void()
export const zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdPath = z.object({
app_id: z.string(),
@@ -4885,7 +4929,7 @@ export const zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetPath = z.obj
export const zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse = z.union([
zWorkflowDraftVariable,
- z.record(z.string(), z.never()),
+ z.void(),
])
export const zGetAppsByAppIdWorkflowsPublishPath = z.object({
@@ -4965,7 +5009,7 @@ export const zGetAppsByAppIdWorkflowsTriggersWebhookPath = z.object({
export const zGetAppsByAppIdWorkflowsTriggersWebhookQuery = z.object({
credential_id: z.string().nullish(),
datasource_type: z.string(),
- inputs: z.string(),
+ inputs: z.record(z.string(), z.unknown()),
})
/**
@@ -5034,7 +5078,7 @@ export const zDeleteAppsByResourceIdApiKeysByApiKeyIdPath = z.object({
/**
* API key deleted successfully
*/
-export const zDeleteAppsByResourceIdApiKeysByApiKeyIdResponse = z.record(z.string(), z.never())
+export const zDeleteAppsByResourceIdApiKeysByApiKeyIdResponse = z.void()
export const zGetAppsByServerIdServerRefreshPath = z.object({
server_id: z.string(),
diff --git a/packages/contracts/generated/api/console/data-source/types.gen.ts b/packages/contracts/generated/api/console/data-source/types.gen.ts
index 6c2ef8db583..a065af49001 100644
--- a/packages/contracts/generated/api/console/data-source/types.gen.ts
+++ b/packages/contracts/generated/api/console/data-source/types.gen.ts
@@ -19,7 +19,7 @@ export type DataSourceIntegrateResponse = {
is_bound: boolean
link: string
provider: string
- source_info: DataSourceIntegrateWorkspaceResponse
+ source_info: DataSourceIntegrateWorkspaceResponse | null
}
export type DataSourceIntegrateWorkspaceResponse = {
@@ -31,7 +31,7 @@ export type DataSourceIntegrateWorkspaceResponse = {
}
export type DataSourceIntegratePageResponse = {
- page_icon: DataSourceIntegrateIconResponse
+ page_icon: DataSourceIntegrateIconResponse | null
page_id: string
page_name: string
parent_id: string
diff --git a/packages/contracts/generated/api/console/data-source/zod.gen.ts b/packages/contracts/generated/api/console/data-source/zod.gen.ts
index 1511f3de868..e5cf1735c3f 100644
--- a/packages/contracts/generated/api/console/data-source/zod.gen.ts
+++ b/packages/contracts/generated/api/console/data-source/zod.gen.ts
@@ -22,7 +22,7 @@ export const zDataSourceIntegrateIconResponse = z.object({
* DataSourceIntegratePageResponse
*/
export const zDataSourceIntegratePageResponse = z.object({
- page_icon: zDataSourceIntegrateIconResponse,
+ page_icon: zDataSourceIntegrateIconResponse.nullable(),
page_id: z.string(),
page_name: z.string(),
parent_id: z.string(),
@@ -50,7 +50,7 @@ export const zDataSourceIntegrateResponse = z.object({
is_bound: z.boolean(),
link: z.string(),
provider: z.string(),
- source_info: zDataSourceIntegrateWorkspaceResponse,
+ source_info: zDataSourceIntegrateWorkspaceResponse.nullable(),
})
/**
diff --git a/packages/contracts/generated/api/console/datasets/types.gen.ts b/packages/contracts/generated/api/console/datasets/types.gen.ts
index a9170dd2619..748bbac760d 100644
--- a/packages/contracts/generated/api/console/datasets/types.gen.ts
+++ b/packages/contracts/generated/api/console/datasets/types.gen.ts
@@ -18,7 +18,7 @@ export type DatasetCreatePayload = {
external_knowledge_id?: string | null
indexing_technique?: string | null
name: string
- permission?: PermissionEnum
+ permission?: PermissionEnum | null
provider?: string
}
@@ -39,7 +39,7 @@ export type DatasetDetailResponse = {
embedding_model_provider: string | null
enable_api: boolean
external_knowledge_info?: DatasetExternalKnowledgeInfoResponse
- external_retrieval_model: DatasetExternalRetrievalModelResponse
+ external_retrieval_model: DatasetExternalRetrievalModelResponse | null
icon_info?: DatasetIconInfoResponse
id: string
indexing_technique: string | null
@@ -169,7 +169,7 @@ export type IndexingEstimateResponse = {
}
export type KnowledgeConfig = {
- data_source?: DataSource
+ data_source?: DataSource | null
doc_form?: string
doc_language?: string
duplicate?: boolean
@@ -179,8 +179,8 @@ export type KnowledgeConfig = {
is_multimodal?: boolean
name?: string | null
original_document_id?: string | null
- process_rule?: ProcessRule
- retrieval_model?: RetrievalModel
+ process_rule?: ProcessRule | null
+ retrieval_model?: RetrievalModel | null
summary_index_setting?: {
[key: string]: unknown
} | null
@@ -234,7 +234,7 @@ export type DatasetDetailWithPartialMembersResponse = {
embedding_model_provider: string | null
enable_api: boolean
external_knowledge_info?: DatasetExternalKnowledgeInfoResponse
- external_retrieval_model: DatasetExternalRetrievalModelResponse
+ external_retrieval_model: DatasetExternalRetrievalModelResponse | null
icon_info?: DatasetIconInfoResponse
id: string
indexing_technique: string | null
@@ -274,7 +274,7 @@ export type DatasetUpdatePayload = {
partial_member_list?: Array<{
[key: string]: string
}> | null
- permission?: PermissionEnum
+ permission?: PermissionEnum | null
retrieval_model?: {
[key: string]: unknown
} | null
@@ -454,7 +454,7 @@ export type HitTestingPayload = {
[key: string]: unknown
} | null
query: string
- retrieval_model?: RetrievalModel
+ retrieval_model?: RetrievalModel | null
}
export type HitTestingResponse = {
@@ -524,7 +524,7 @@ export type DatasetListItemResponse = {
embedding_model_provider: string | null
enable_api: boolean
external_knowledge_info?: DatasetExternalKnowledgeInfoResponse
- external_retrieval_model: DatasetExternalRetrievalModelResponse
+ external_retrieval_model: DatasetExternalRetrievalModelResponse | null
icon_info?: DatasetIconInfoResponse
id: string
indexing_technique: string | null
@@ -582,7 +582,7 @@ export type DatasetRetrievalModelResponse = {
score_threshold_enabled: boolean
search_method: string
top_k: number
- weights?: DatasetWeightedScoreResponse
+ weights?: DatasetWeightedScoreResponse | null
}
export type DatasetSummaryIndexSettingResponse = {
@@ -665,19 +665,19 @@ export type DataSource = {
export type ProcessRule = {
mode: ProcessRuleMode
- rules?: Rule
+ rules?: Rule | null
}
export type RetrievalModel = {
- metadata_filtering_conditions?: MetadataFilteringCondition
+ metadata_filtering_conditions?: MetadataFilteringCondition | null
reranking_enable: boolean
reranking_mode?: string | null
- reranking_model?: RerankingModel
+ reranking_model?: RerankingModel | null
score_threshold?: number | null
score_threshold_enabled: boolean
search_method: RetrievalMethod
top_k: number
- weights?: WeightModel
+ weights?: WeightModel | null
}
export type DatasetResponse = {
@@ -747,7 +747,7 @@ export type DocumentMetadataResponse = {
id: string
name: string
type: string
- value?: unknown
+ value?: string | number | number | boolean | null
}
export type SegmentResponse = {
@@ -806,7 +806,7 @@ export type HitTestingRecord = {
score: number | null
segment: HitTestingSegment
summary: string | null
- tsne_position: unknown
+ tsne_position: unknown | null
}
export type DatasetMetadataListItemResponse = {
@@ -861,9 +861,9 @@ export type DatasetWeightedScore = {
export type InfoList = {
data_source_type: 'notion_import' | 'upload_file' | 'website_crawl'
- file_info_list?: FileInfo
+ file_info_list?: FileInfo | null
notion_info_list?: Array | null
- website_info_list?: WebsiteInfo
+ website_info_list?: WebsiteInfo | null
}
export type ProcessRuleMode = 'automatic' | 'custom' | 'hierarchical'
@@ -871,8 +871,8 @@ export type ProcessRuleMode = 'automatic' | 'custom' | 'hierarchical'
export type Rule = {
parent_mode?: 'full-doc' | 'paragraph' | null
pre_processing_rules?: Array | null
- segmentation?: Segmentation
- subchunk_segmentation?: Segmentation
+ segmentation?: Segmentation | null
+ subchunk_segmentation?: Segmentation | null
}
export type MetadataFilteringCondition = {
@@ -892,15 +892,15 @@ export type RetrievalMethod
| 'semantic_search'
export type WeightModel = {
- keyword_setting?: WeightKeywordSetting
- vector_setting?: WeightVectorSetting
+ keyword_setting?: WeightKeywordSetting | null
+ vector_setting?: WeightVectorSetting | null
weight_type?: 'customized' | 'keyword_first' | 'semantic_first' | null
}
export type MetadataDetail = {
id: string
name: string
- value?: unknown
+ value?: string | number | number | null
}
export type SegmentAttachmentResponse = {
@@ -957,7 +957,7 @@ export type HitTestingSegment = {
export type DatasetQueryContentResponse = {
content: string
content_type: string
- file_info?: DatasetQueryFileInfoResponse
+ file_info?: DatasetQueryFileInfoResponse | null
}
export type DatasetKeywordSettingResponse = {
@@ -1029,7 +1029,7 @@ export type Condition = {
| '≤'
| '≥'
name: string
- value?: unknown
+ value?: string | Array | number | number | null
}
export type WeightKeywordSetting = {
@@ -1044,7 +1044,7 @@ export type WeightVectorSetting = {
export type HitTestingDocument = {
data_source_type: string
- doc_metadata: unknown
+ doc_metadata: unknown | null
doc_type: string | null
id: string
name: string
@@ -1060,7 +1060,7 @@ export type DatasetQueryFileInfoResponse = {
}
export type NotionPage = {
- page_icon?: NotionIcon
+ page_icon?: NotionIcon | null
page_id: string
page_name: string
type: string
@@ -1173,9 +1173,7 @@ export type DeleteDatasetsApiKeysByApiKeyIdData = {
}
export type DeleteDatasetsApiKeysByApiKeyIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsApiKeysByApiKeyIdResponse
@@ -1284,9 +1282,7 @@ export type DeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdData = {
}
export type DeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse
@@ -1474,9 +1470,7 @@ export type DeleteDatasetsByDatasetIdData = {
}
export type DeleteDatasetsByDatasetIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdResponse
@@ -1626,9 +1620,7 @@ export type DeleteDatasetsByDatasetIdDocumentsData = {
}
export type DeleteDatasetsByDatasetIdDocumentsResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdDocumentsResponse
@@ -1732,9 +1724,7 @@ export type PostDatasetsByDatasetIdDocumentsMetadataData = {
}
export type PostDatasetsByDatasetIdDocumentsMetadataResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PostDatasetsByDatasetIdDocumentsMetadataResponse
@@ -1768,9 +1758,7 @@ export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdData = {
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse
@@ -1956,9 +1944,7 @@ export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseData = {
}
export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponse
@@ -1975,9 +1961,7 @@ export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeData =
}
export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponse
@@ -2080,9 +2064,7 @@ export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsData = {
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse
@@ -2158,9 +2140,7 @@ export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdDat
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
@@ -2257,9 +2237,7 @@ export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChi
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses
= {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
@@ -2473,9 +2451,7 @@ export type PostDatasetsByDatasetIdMetadataBuiltInByActionData = {
}
export type PostDatasetsByDatasetIdMetadataBuiltInByActionResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PostDatasetsByDatasetIdMetadataBuiltInByActionResponse
@@ -2492,9 +2468,7 @@ export type DeleteDatasetsByDatasetIdMetadataByMetadataIdData = {
}
export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponse
@@ -2603,9 +2577,7 @@ export type PostDatasetsByDatasetIdRetryData = {
}
export type PostDatasetsByDatasetIdRetryResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PostDatasetsByDatasetIdRetryResponse
@@ -2679,9 +2651,7 @@ export type DeleteDatasetsByResourceIdApiKeysByApiKeyIdData = {
}
export type DeleteDatasetsByResourceIdApiKeysByApiKeyIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByResourceIdApiKeysByApiKeyIdResponse
diff --git a/packages/contracts/generated/api/console/datasets/zod.gen.ts b/packages/contracts/generated/api/console/datasets/zod.gen.ts
index 44b491d01a5..3cc933a5686 100644
--- a/packages/contracts/generated/api/console/datasets/zod.gen.ts
+++ b/packages/contracts/generated/api/console/datasets/zod.gen.ts
@@ -298,7 +298,7 @@ export const zDatasetCreatePayload = z.object({
external_knowledge_id: z.string().nullish(),
indexing_technique: z.string().nullish(),
name: z.string().min(1).max(40),
- permission: zPermissionEnum.optional(),
+ permission: zPermissionEnum.nullish().default('only_me'),
provider: z.string().optional().default('vendor'),
})
@@ -317,7 +317,7 @@ export const zDatasetUpdatePayload = z.object({
is_multimodal: z.boolean().nullish().default(false),
name: z.string().min(1).max(40).nullish(),
partial_member_list: z.array(z.record(z.string(), z.string())).nullish(),
- permission: zPermissionEnum.optional(),
+ permission: zPermissionEnum.nullish(),
retrieval_model: z.record(z.string(), z.unknown()).nullish(),
summary_index_setting: z.record(z.string(), z.unknown()).nullish(),
})
@@ -509,7 +509,7 @@ export const zDocumentMetadataResponse = z.object({
id: z.string(),
name: z.string(),
type: z.string(),
- value: z.unknown().optional(),
+ value: z.union([z.string(), z.int(), z.number(), z.boolean()]).nullish(),
})
/**
@@ -740,7 +740,7 @@ export const zRetrievalMethod = z.enum([
export const zMetadataDetail = z.object({
id: z.string(),
name: z.string(),
- value: z.unknown().optional(),
+ value: z.union([z.string(), z.int(), z.number()]).nullish(),
})
/**
@@ -883,7 +883,7 @@ export const zDatasetRetrievalModelResponse = z.object({
score_threshold_enabled: z.boolean(),
search_method: z.string(),
top_k: z.int(),
- weights: zDatasetWeightedScoreResponse.optional(),
+ weights: zDatasetWeightedScoreResponse.nullish(),
})
/**
@@ -906,7 +906,7 @@ export const zDatasetDetailResponse = z.object({
embedding_model_provider: z.string().nullable(),
enable_api: z.boolean(),
external_knowledge_info: zDatasetExternalKnowledgeInfoResponse.optional(),
- external_retrieval_model: zDatasetExternalRetrievalModelResponse,
+ external_retrieval_model: zDatasetExternalRetrievalModelResponse.nullable(),
icon_info: zDatasetIconInfoResponse.optional(),
id: z.string(),
indexing_technique: z.string().nullable(),
@@ -947,7 +947,7 @@ export const zDatasetDetailWithPartialMembersResponse = z.object({
embedding_model_provider: z.string().nullable(),
enable_api: z.boolean(),
external_knowledge_info: zDatasetExternalKnowledgeInfoResponse.optional(),
- external_retrieval_model: zDatasetExternalRetrievalModelResponse,
+ external_retrieval_model: zDatasetExternalRetrievalModelResponse.nullable(),
icon_info: zDatasetIconInfoResponse.optional(),
id: z.string(),
indexing_technique: z.string().nullable(),
@@ -989,7 +989,7 @@ export const zDatasetListItemResponse = z.object({
embedding_model_provider: z.string().nullable(),
enable_api: z.boolean(),
external_knowledge_info: zDatasetExternalKnowledgeInfoResponse.optional(),
- external_retrieval_model: zDatasetExternalRetrievalModelResponse,
+ external_retrieval_model: zDatasetExternalRetrievalModelResponse.nullable(),
icon_info: zDatasetIconInfoResponse.optional(),
id: z.string(),
indexing_technique: z.string().nullable(),
@@ -1127,8 +1127,8 @@ export const zSegmentation = z.object({
export const zRule = z.object({
parent_mode: z.enum(['full-doc', 'paragraph']).nullish(),
pre_processing_rules: z.array(zPreProcessingRule).nullish(),
- segmentation: zSegmentation.optional(),
- subchunk_segmentation: zSegmentation.optional(),
+ segmentation: zSegmentation.nullish(),
+ subchunk_segmentation: zSegmentation.nullish(),
})
/**
@@ -1136,7 +1136,7 @@ export const zRule = z.object({
*/
export const zProcessRule = z.object({
mode: zProcessRuleMode,
- rules: zRule.optional(),
+ rules: zRule.nullish(),
})
/**
@@ -1166,7 +1166,7 @@ export const zCondition = z.object({
'≥',
]),
name: z.string(),
- value: z.unknown().optional(),
+ value: z.union([z.string(), z.array(z.string()), z.int(), z.number()]).nullish(),
})
/**
@@ -1199,8 +1199,8 @@ export const zWeightVectorSetting = z.object({
* WeightModel
*/
export const zWeightModel = z.object({
- keyword_setting: zWeightKeywordSetting.optional(),
- vector_setting: zWeightVectorSetting.optional(),
+ keyword_setting: zWeightKeywordSetting.nullish(),
+ vector_setting: zWeightVectorSetting.nullish(),
weight_type: z.enum(['customized', 'keyword_first', 'semantic_first']).nullish(),
})
@@ -1208,15 +1208,15 @@ export const zWeightModel = z.object({
* RetrievalModel
*/
export const zRetrievalModel = z.object({
- metadata_filtering_conditions: zMetadataFilteringCondition.optional(),
+ metadata_filtering_conditions: zMetadataFilteringCondition.nullish(),
reranking_enable: z.boolean(),
reranking_mode: z.string().nullish(),
- reranking_model: zRerankingModel.optional(),
+ reranking_model: zRerankingModel.nullish(),
score_threshold: z.number().nullish(),
score_threshold_enabled: z.boolean(),
search_method: zRetrievalMethod,
top_k: z.int(),
- weights: zWeightModel.optional(),
+ weights: zWeightModel.nullish(),
})
/**
@@ -1226,7 +1226,7 @@ export const zHitTestingPayload = z.object({
attachment_ids: z.array(z.string()).nullish(),
external_retrieval_model: z.record(z.string(), z.unknown()).nullish(),
query: z.string().max(250),
- retrieval_model: zRetrievalModel.optional(),
+ retrieval_model: zRetrievalModel.nullish(),
})
/**
@@ -1234,7 +1234,7 @@ export const zHitTestingPayload = z.object({
*/
export const zHitTestingDocument = z.object({
data_source_type: z.string(),
- doc_metadata: z.unknown(),
+ doc_metadata: z.unknown().nullable(),
doc_type: z.string().nullable(),
id: z.string(),
name: z.string(),
@@ -1278,7 +1278,7 @@ export const zHitTestingRecord = z.object({
score: z.number().nullable(),
segment: zHitTestingSegment,
summary: z.string().nullable(),
- tsne_position: z.unknown(),
+ tsne_position: z.unknown().nullable(),
})
/**
@@ -1307,7 +1307,7 @@ export const zDatasetQueryFileInfoResponse = z.object({
export const zDatasetQueryContentResponse = z.object({
content: z.string(),
content_type: z.string(),
- file_info: zDatasetQueryFileInfoResponse.optional(),
+ file_info: zDatasetQueryFileInfoResponse.nullish(),
})
/**
@@ -1347,7 +1347,7 @@ export const zNotionIcon = z.object({
* NotionPage
*/
export const zNotionPage = z.object({
- page_icon: zNotionIcon.optional(),
+ page_icon: zNotionIcon.nullish(),
page_id: z.string(),
page_name: z.string(),
type: z.string(),
@@ -1367,9 +1367,9 @@ export const zNotionInfo = z.object({
*/
export const zInfoList = z.object({
data_source_type: z.enum(['notion_import', 'upload_file', 'website_crawl']),
- file_info_list: zFileInfo.optional(),
+ file_info_list: zFileInfo.nullish(),
notion_info_list: z.array(zNotionInfo).nullish(),
- website_info_list: zWebsiteInfo.optional(),
+ website_info_list: zWebsiteInfo.nullish(),
})
/**
@@ -1383,7 +1383,7 @@ export const zDataSource = z.object({
* KnowledgeConfig
*/
export const zKnowledgeConfig = z.object({
- data_source: zDataSource.optional(),
+ data_source: zDataSource.nullish(),
doc_form: z.string().optional().default('text_model'),
doc_language: z.string().optional().default('English'),
duplicate: z.boolean().optional().default(true),
@@ -1393,8 +1393,8 @@ export const zKnowledgeConfig = z.object({
is_multimodal: z.boolean().optional().default(false),
name: z.string().nullish(),
original_document_id: z.string().nullish(),
- process_rule: zProcessRule.optional(),
- retrieval_model: zRetrievalModel.optional(),
+ process_rule: zProcessRule.nullish(),
+ retrieval_model: zRetrievalModel.nullish(),
summary_index_setting: z.record(z.string(), z.unknown()).nullish(),
})
@@ -1441,7 +1441,7 @@ export const zDeleteDatasetsApiKeysByApiKeyIdPath = z.object({
/**
* API key deleted successfully
*/
-export const zDeleteDatasetsApiKeysByApiKeyIdResponse = z.record(z.string(), z.never())
+export const zDeleteDatasetsApiKeysByApiKeyIdResponse = z.void()
export const zGetDatasetsBatchImportStatusByJobIdPath = z.object({
job_id: z.string(),
@@ -1495,10 +1495,7 @@ export const zDeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath = z
/**
* External knowledge API deleted successfully
*/
-export const zDeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse = z.void()
export const zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath = z.object({
external_knowledge_api_id: z.string(),
@@ -1593,7 +1590,7 @@ export const zDeleteDatasetsByDatasetIdPath = z.object({
/**
* Dataset deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdResponse = z.record(z.string(), z.never())
+export const zDeleteDatasetsByDatasetIdResponse = z.void()
export const zGetDatasetsByDatasetIdPath = z.object({
dataset_id: z.string(),
@@ -1664,7 +1661,7 @@ export const zDeleteDatasetsByDatasetIdDocumentsPath = z.object({
/**
* Documents deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdDocumentsResponse = z.record(z.string(), z.never())
+export const zDeleteDatasetsByDatasetIdDocumentsResponse = z.void()
export const zGetDatasetsByDatasetIdDocumentsPath = z.object({
dataset_id: z.string(),
@@ -1729,7 +1726,7 @@ export const zPostDatasetsByDatasetIdDocumentsMetadataPath = z.object({
/**
* Documents metadata updated successfully
*/
-export const zPostDatasetsByDatasetIdDocumentsMetadataResponse = z.record(z.string(), z.never())
+export const zPostDatasetsByDatasetIdDocumentsMetadataResponse = z.void()
export const zPatchDatasetsByDatasetIdDocumentsStatusByActionBatchPath = z.object({
action: z.string(),
@@ -1749,10 +1746,7 @@ export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdPath = z.object({
/**
* Document deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse = z.void()
export const zGetDatasetsByDatasetIdDocumentsByDocumentIdPath = z.object({
dataset_id: z.string(),
@@ -1850,10 +1844,7 @@ export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPausePath =
/**
* Document paused successfully
*/
-export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponse = z.void()
export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumePath = z.object({
dataset_id: z.string(),
@@ -1863,10 +1854,7 @@ export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumePath
/**
* Document resumed successfully
*/
-export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponse = z.void()
export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionPath = z.object({
action: z.string(),
@@ -1932,10 +1920,7 @@ export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsQuery = z.ob
/**
* Segments deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse = z.void()
export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath = z.object({
dataset_id: z.string(),
@@ -1991,10 +1976,7 @@ export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdP
/**
* Segment deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse = z.void()
export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdBody
= zSegmentUpdatePayload
@@ -2075,7 +2057,7 @@ export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdC
* Child chunk deleted successfully
*/
export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
- = z.record(z.string(), z.never())
+ = z.void()
export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdBody
= zChildChunkUpdatePayload
@@ -2185,10 +2167,7 @@ export const zPostDatasetsByDatasetIdMetadataBuiltInByActionPath = z.object({
/**
* Action completed successfully
*/
-export const zPostDatasetsByDatasetIdMetadataBuiltInByActionResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zPostDatasetsByDatasetIdMetadataBuiltInByActionResponse = z.void()
export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdPath = z.object({
dataset_id: z.string(),
@@ -2198,10 +2177,7 @@ export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdPath = z.object({
/**
* Metadata deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse = z.void()
export const zPatchDatasetsByDatasetIdMetadataByMetadataIdBody = zMetadataUpdatePayload
@@ -2260,7 +2236,7 @@ export const zPostDatasetsByDatasetIdRetryPath = z.object({
/**
* Documents retry started successfully
*/
-export const zPostDatasetsByDatasetIdRetryResponse = z.record(z.string(), z.never())
+export const zPostDatasetsByDatasetIdRetryResponse = z.void()
export const zGetDatasetsByDatasetIdUseCheckPath = z.object({
dataset_id: z.string(),
@@ -2297,4 +2273,4 @@ export const zDeleteDatasetsByResourceIdApiKeysByApiKeyIdPath = z.object({
/**
* API key deleted successfully
*/
-export const zDeleteDatasetsByResourceIdApiKeysByApiKeyIdResponse = z.record(z.string(), z.never())
+export const zDeleteDatasetsByResourceIdApiKeysByApiKeyIdResponse = z.void()
diff --git a/packages/contracts/generated/api/console/explore/types.gen.ts b/packages/contracts/generated/api/console/explore/types.gen.ts
index 329c1f7722c..2e468e062d6 100644
--- a/packages/contracts/generated/api/console/explore/types.gen.ts
+++ b/packages/contracts/generated/api/console/explore/types.gen.ts
@@ -10,7 +10,7 @@ export type RecommendedAppListResponse = {
}
export type RecommendedAppResponse = {
- app?: RecommendedAppInfoResponse
+ app?: RecommendedAppInfoResponse | null
app_id: string
can_trial?: boolean | null
categories?: Array
diff --git a/packages/contracts/generated/api/console/explore/zod.gen.ts b/packages/contracts/generated/api/console/explore/zod.gen.ts
index c65c47be918..dcbb95e20b5 100644
--- a/packages/contracts/generated/api/console/explore/zod.gen.ts
+++ b/packages/contracts/generated/api/console/explore/zod.gen.ts
@@ -18,7 +18,7 @@ export const zRecommendedAppInfoResponse = z.object({
* RecommendedAppResponse
*/
export const zRecommendedAppResponse = z.object({
- app: zRecommendedAppInfoResponse.optional(),
+ app: zRecommendedAppInfoResponse.nullish(),
app_id: z.string(),
can_trial: z.boolean().nullish(),
categories: z.array(z.string()).optional(),
diff --git a/packages/contracts/generated/api/console/features/types.gen.ts b/packages/contracts/generated/api/console/features/types.gen.ts
index 68b2dc0d9eb..da4dac47c24 100644
--- a/packages/contracts/generated/api/console/features/types.gen.ts
+++ b/packages/contracts/generated/api/console/features/types.gen.ts
@@ -22,7 +22,7 @@ export type FeatureModel = {
model_load_balancing_enabled: boolean
next_credit_reset_date: number
trigger_event: Quota
- vector_space: LimitationModel
+ vector_space: LimitationModel | null
webapp_copyright_enabled: boolean
workspace_members: LicenseLimitationModel
}
diff --git a/packages/contracts/generated/api/console/features/zod.gen.ts b/packages/contracts/generated/api/console/features/zod.gen.ts
index 0e26f296b60..a5a66a25782 100644
--- a/packages/contracts/generated/api/console/features/zod.gen.ts
+++ b/packages/contracts/generated/api/console/features/zod.gen.ts
@@ -60,33 +60,48 @@ export const zSubscriptionModel = z.object({
*/
export const zBillingModel = z.object({
enabled: z.boolean().default(false),
- subscription: zSubscriptionModel,
+ subscription: zSubscriptionModel.default({ interval: '', plan: 'sandbox' }),
})
/**
* FeatureModel
*/
export const zFeatureModel = z.object({
- annotation_quota_limit: zLimitationModel,
- api_rate_limit: zQuota,
- apps: zLimitationModel,
- billing: zBillingModel,
+ annotation_quota_limit: zLimitationModel.default({ limit: 10, size: 0 }),
+ api_rate_limit: zQuota.default({
+ limit: 5000,
+ reset_date: 0,
+ usage: 0,
+ }),
+ apps: zLimitationModel.default({ limit: 10, size: 0 }),
+ billing: zBillingModel.default({
+ enabled: false,
+ subscription: { interval: '', plan: 'sandbox' },
+ }),
can_replace_logo: z.boolean().default(false),
dataset_operator_enabled: z.boolean().default(false),
docs_processing: z.string().default('standard'),
- documents_upload_quota: zLimitationModel,
- education: zEducationModel,
+ documents_upload_quota: zLimitationModel.default({ limit: 50, size: 0 }),
+ education: zEducationModel.default({ activated: false, enabled: false }),
human_input_email_delivery_enabled: z.boolean().default(false),
is_allow_transfer_workspace: z.boolean().default(true),
- knowledge_pipeline: zKnowledgePipeline,
+ knowledge_pipeline: zKnowledgePipeline.default({ publish_enabled: false }),
knowledge_rate_limit: z.int().default(10),
- members: zLimitationModel,
+ members: zLimitationModel.default({ limit: 1, size: 0 }),
model_load_balancing_enabled: z.boolean().default(false),
next_credit_reset_date: z.int().default(0),
- trigger_event: zQuota,
- vector_space: zLimitationModel,
+ trigger_event: zQuota.default({
+ limit: 3000,
+ reset_date: 0,
+ usage: 0,
+ }),
+ vector_space: zLimitationModel.nullable().default({ limit: 5, size: 0 }),
webapp_copyright_enabled: z.boolean().default(false),
- workspace_members: zLicenseLimitationModel,
+ workspace_members: zLicenseLimitationModel.default({
+ enabled: false,
+ limit: 0,
+ size: 0,
+ }),
})
/**
diff --git a/packages/contracts/generated/api/console/info/types.gen.ts b/packages/contracts/generated/api/console/info/types.gen.ts
index 88ee9fd59d2..ceeaeeadaae 100644
--- a/packages/contracts/generated/api/console/info/types.gen.ts
+++ b/packages/contracts/generated/api/console/info/types.gen.ts
@@ -6,7 +6,7 @@ export type ClientOptions = {
export type TenantInfoResponse = {
created_at?: number | null
- custom_config?: WorkspaceCustomConfigResponse
+ custom_config?: WorkspaceCustomConfigResponse | null
id: string
in_trial?: boolean | null
name?: string | null
diff --git a/packages/contracts/generated/api/console/info/zod.gen.ts b/packages/contracts/generated/api/console/info/zod.gen.ts
index f903e9307d9..b3c4d966cec 100644
--- a/packages/contracts/generated/api/console/info/zod.gen.ts
+++ b/packages/contracts/generated/api/console/info/zod.gen.ts
@@ -15,7 +15,7 @@ export const zWorkspaceCustomConfigResponse = z.object({
*/
export const zTenantInfoResponse = z.object({
created_at: z.int().nullish(),
- custom_config: zWorkspaceCustomConfigResponse.optional(),
+ custom_config: zWorkspaceCustomConfigResponse.nullish(),
id: z.string(),
in_trial: z.boolean().nullish(),
name: z.string().nullish(),
diff --git a/packages/contracts/generated/api/console/installed-apps/types.gen.ts b/packages/contracts/generated/api/console/installed-apps/types.gen.ts
index b1b08934c84..355b24eeb6f 100644
--- a/packages/contracts/generated/api/console/installed-apps/types.gen.ts
+++ b/packages/contracts/generated/api/console/installed-apps/types.gen.ts
@@ -143,9 +143,7 @@ export type DeleteInstalledAppsByInstalledAppIdData = {
}
export type DeleteInstalledAppsByInstalledAppIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteInstalledAppsByInstalledAppIdResponse
@@ -288,9 +286,7 @@ export type DeleteInstalledAppsByInstalledAppIdConversationsByCIdData = {
}
export type DeleteInstalledAppsByInstalledAppIdConversationsByCIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteInstalledAppsByInstalledAppIdConversationsByCIdResponse
@@ -510,9 +506,7 @@ export type DeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdData = {
}
export type DeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponse
diff --git a/packages/contracts/generated/api/console/installed-apps/zod.gen.ts b/packages/contracts/generated/api/console/installed-apps/zod.gen.ts
index 6fd4856c933..bfa75c9d997 100644
--- a/packages/contracts/generated/api/console/installed-apps/zod.gen.ts
+++ b/packages/contracts/generated/api/console/installed-apps/zod.gen.ts
@@ -155,7 +155,7 @@ export const zDeleteInstalledAppsByInstalledAppIdPath = z.object({
/**
* App uninstalled successfully
*/
-export const zDeleteInstalledAppsByInstalledAppIdResponse = z.record(z.string(), z.never())
+export const zDeleteInstalledAppsByInstalledAppIdResponse = z.void()
export const zPatchInstalledAppsByInstalledAppIdPath = z.object({
installed_app_id: z.string(),
@@ -255,10 +255,7 @@ export const zDeleteInstalledAppsByInstalledAppIdConversationsByCIdPath = z.obje
/**
* Conversation deleted successfully
*/
-export const zDeleteInstalledAppsByInstalledAppIdConversationsByCIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteInstalledAppsByInstalledAppIdConversationsByCIdResponse = z.void()
export const zPostInstalledAppsByInstalledAppIdConversationsByCIdNameBody
= zConversationRenamePayload
@@ -407,10 +404,7 @@ export const zDeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdPath =
/**
* Saved message deleted successfully
*/
-export const zDeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponse = z.void()
export const zPostInstalledAppsByInstalledAppIdTextToAudioBody = zTextToAudioPayload
diff --git a/packages/contracts/generated/api/console/notion/types.gen.ts b/packages/contracts/generated/api/console/notion/types.gen.ts
index ac0431b2d31..92b26116c9e 100644
--- a/packages/contracts/generated/api/console/notion/types.gen.ts
+++ b/packages/contracts/generated/api/console/notion/types.gen.ts
@@ -21,7 +21,7 @@ export type NotionIntegrateWorkspaceResponse = {
export type NotionIntegratePageResponse = {
is_bound: boolean
- page_icon: DataSourceIntegrateIconResponse
+ page_icon: DataSourceIntegrateIconResponse | null
page_id: string
page_name: string
parent_id: string | null
diff --git a/packages/contracts/generated/api/console/notion/zod.gen.ts b/packages/contracts/generated/api/console/notion/zod.gen.ts
index 6e371766b9b..633ae90be35 100644
--- a/packages/contracts/generated/api/console/notion/zod.gen.ts
+++ b/packages/contracts/generated/api/console/notion/zod.gen.ts
@@ -23,7 +23,7 @@ export const zDataSourceIntegrateIconResponse = z.object({
*/
export const zNotionIntegratePageResponse = z.object({
is_bound: z.boolean(),
- page_icon: zDataSourceIntegrateIconResponse,
+ page_icon: zDataSourceIntegrateIconResponse.nullable(),
page_id: z.string(),
page_name: z.string(),
parent_id: z.string().nullable(),
diff --git a/packages/contracts/generated/api/console/rag/types.gen.ts b/packages/contracts/generated/api/console/rag/types.gen.ts
index ad46a4b2765..00d9fe00132 100644
--- a/packages/contracts/generated/api/console/rag/types.gen.ts
+++ b/packages/contracts/generated/api/console/rag/types.gen.ts
@@ -47,7 +47,7 @@ export type DatasetDetailResponse = {
embedding_model_provider: string | null
enable_api: boolean
external_knowledge_info?: DatasetExternalKnowledgeInfoResponse
- external_retrieval_model: DatasetExternalRetrievalModelResponse
+ external_retrieval_model: DatasetExternalRetrievalModelResponse | null
icon_info?: DatasetIconInfoResponse
id: string
indexing_technique: string | null
@@ -115,8 +115,8 @@ export type SimpleResultResponse = {
export type WorkflowRunDetailResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
- created_by_end_user?: SimpleEndUser
+ created_by_account?: SimpleAccount | null
+ created_by_end_user?: SimpleEndUser | null
created_by_role?: string | null
elapsed_time?: number | null
error?: string | null
@@ -146,7 +146,7 @@ export type WorkflowPaginationResponse = {
export type WorkflowResponse = {
conversation_variables: Array
created_at: number
- created_by?: SimpleAccount
+ created_by?: SimpleAccount | null
environment_variables: Array
features: {
[key: string]: unknown
@@ -161,7 +161,7 @@ export type WorkflowResponse = {
rag_pipeline_variables: Array
tool_published: boolean
updated_at: number
- updated_by?: SimpleAccount
+ updated_by?: SimpleAccount | null
version: string
}
@@ -190,8 +190,8 @@ export type DatasourceVariablesPayload = {
export type WorkflowRunNodeExecutionResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
- created_by_end_user?: SimpleEndUser
+ created_by_account?: SimpleAccount | null
+ created_by_end_user?: SimpleEndUser | null
created_by_role?: string | null
elapsed_time?: number | null
error?: string | null
@@ -238,7 +238,7 @@ export type DraftWorkflowRunPayload = {
export type WorkflowDraftVariablePatchPayload = {
name?: string | null
- value?: unknown
+ value?: unknown | null
}
export type RagPipelineWorkflowPublishResponse = {
@@ -304,7 +304,7 @@ export type DatasetRetrievalModelResponse = {
score_threshold_enabled: boolean
search_method: string
top_k: number
- weights?: DatasetWeightedScoreResponse
+ weights?: DatasetWeightedScoreResponse | null
}
export type DatasetSummaryIndexSettingResponse = {
@@ -336,12 +336,12 @@ export type PipelineTemplateItemResponse = {
export type PluginDependency = {
current_identifier?: string | null
type: Type
- value: unknown
+ value: Github | Marketplace | Package
}
export type WorkflowRunForListResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
+ created_by_account?: SimpleAccount | null
elapsed_time?: number | null
exceptions_count?: number | null
finished_at?: number | null
@@ -455,9 +455,7 @@ export type DeleteRagPipelineCustomizedTemplatesByTemplateIdData = {
}
export type DeleteRagPipelineCustomizedTemplatesByTemplateIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteRagPipelineCustomizedTemplatesByTemplateIdResponse
@@ -473,9 +471,7 @@ export type PatchRagPipelineCustomizedTemplatesByTemplateIdData = {
}
export type PatchRagPipelineCustomizedTemplatesByTemplateIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PatchRagPipelineCustomizedTemplatesByTemplateIdResponse
@@ -681,9 +677,7 @@ export type PostRagPipelinesByPipelineIdCustomizedPublishData = {
}
export type PostRagPipelinesByPipelineIdCustomizedPublishResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PostRagPipelinesByPipelineIdCustomizedPublishResponse
@@ -1360,9 +1354,7 @@ export type DeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdData = {
}
export type DeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse
diff --git a/packages/contracts/generated/api/console/rag/zod.gen.ts b/packages/contracts/generated/api/console/rag/zod.gen.ts
index 9c0c586bc6b..7506d274fec 100644
--- a/packages/contracts/generated/api/console/rag/zod.gen.ts
+++ b/packages/contracts/generated/api/console/rag/zod.gen.ts
@@ -118,7 +118,7 @@ export const zDraftWorkflowRunPayload = z.object({
*/
export const zWorkflowDraftVariablePatchPayload = z.object({
name: z.string().nullish(),
- value: z.unknown().optional(),
+ value: z.unknown().nullish(),
})
/**
@@ -261,7 +261,7 @@ export const zSimpleAccount = z.object({
*/
export const zWorkflowRunForListResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
+ created_by_account: zSimpleAccount.nullish(),
elapsed_time: z.number().nullish(),
exceptions_count: z.int().nullish(),
finished_at: z.int().nullish(),
@@ -297,8 +297,8 @@ export const zSimpleEndUser = z.object({
*/
export const zWorkflowRunDetailResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
- created_by_end_user: zSimpleEndUser.optional(),
+ created_by_account: zSimpleAccount.nullish(),
+ created_by_end_user: zSimpleEndUser.nullish(),
created_by_role: z.string().nullish(),
elapsed_time: z.number().nullish(),
error: z.string().nullish(),
@@ -319,8 +319,8 @@ export const zWorkflowRunDetailResponse = z.object({
*/
export const zWorkflowRunNodeExecutionResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
- created_by_end_user: zSimpleEndUser.optional(),
+ created_by_account: zSimpleAccount.nullish(),
+ created_by_end_user: zSimpleEndUser.nullish(),
created_by_role: z.string().nullish(),
elapsed_time: z.number().nullish(),
error: z.string().nullish(),
@@ -397,7 +397,7 @@ export const zPipelineVariableResponse = z.object({
export const zWorkflowResponse = z.object({
conversation_variables: z.array(zWorkflowConversationVariableResponse),
created_at: z.int(),
- created_by: zSimpleAccount.optional(),
+ created_by: zSimpleAccount.nullish(),
environment_variables: z.array(zWorkflowEnvironmentVariableResponse),
features: z.record(z.string(), z.unknown()),
graph: z.record(z.string(), z.unknown()),
@@ -408,7 +408,7 @@ export const zWorkflowResponse = z.object({
rag_pipeline_variables: z.array(zPipelineVariableResponse),
tool_published: z.boolean(),
updated_at: z.int(),
- updated_by: zSimpleAccount.optional(),
+ updated_by: zSimpleAccount.nullish(),
version: z.string(),
})
@@ -435,22 +435,6 @@ export const zDatasetRerankingModelResponse = z.object({
*/
export const zType = z.enum(['github', 'marketplace', 'package'])
-/**
- * PluginDependency
- */
-export const zPluginDependency = z.object({
- current_identifier: z.string().nullish(),
- type: zType,
- value: z.unknown(),
-})
-
-/**
- * RagPipelineImportCheckDependenciesResponse
- */
-export const zRagPipelineImportCheckDependenciesResponse = z.object({
- leaked_dependencies: z.array(zPluginDependency).optional(),
-})
-
/**
* Github
*/
@@ -477,6 +461,22 @@ export const zPackage = z.object({
version: z.string().nullish(),
})
+/**
+ * PluginDependency
+ */
+export const zPluginDependency = z.object({
+ current_identifier: z.string().nullish(),
+ type: zType,
+ value: z.union([zGithub, zMarketplace, zPackage]),
+})
+
+/**
+ * RagPipelineImportCheckDependenciesResponse
+ */
+export const zRagPipelineImportCheckDependenciesResponse = z.object({
+ leaked_dependencies: z.array(zPluginDependency).optional(),
+})
+
/**
* DatasetKeywordSettingResponse
*/
@@ -513,7 +513,7 @@ export const zDatasetRetrievalModelResponse = z.object({
score_threshold_enabled: z.boolean(),
search_method: z.string(),
top_k: z.int(),
- weights: zDatasetWeightedScoreResponse.optional(),
+ weights: zDatasetWeightedScoreResponse.nullish(),
})
/**
@@ -536,7 +536,7 @@ export const zDatasetDetailResponse = z.object({
embedding_model_provider: z.string().nullable(),
enable_api: z.boolean(),
external_knowledge_info: zDatasetExternalKnowledgeInfoResponse.optional(),
- external_retrieval_model: zDatasetExternalRetrievalModelResponse,
+ external_retrieval_model: zDatasetExternalRetrievalModelResponse.nullable(),
icon_info: zDatasetIconInfoResponse.optional(),
id: z.string(),
indexing_technique: z.string().nullable(),
@@ -564,10 +564,7 @@ export const zDeleteRagPipelineCustomizedTemplatesByTemplateIdPath = z.object({
/**
* Pipeline template deleted
*/
-export const zDeleteRagPipelineCustomizedTemplatesByTemplateIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteRagPipelineCustomizedTemplatesByTemplateIdResponse = z.void()
export const zPatchRagPipelineCustomizedTemplatesByTemplateIdBody
= zCustomizedPipelineTemplatePayload
@@ -579,10 +576,7 @@ export const zPatchRagPipelineCustomizedTemplatesByTemplateIdPath = z.object({
/**
* Pipeline template updated
*/
-export const zPatchRagPipelineCustomizedTemplatesByTemplateIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zPatchRagPipelineCustomizedTemplatesByTemplateIdResponse = z.void()
export const zPostRagPipelineCustomizedTemplatesByTemplateIdPath = z.object({
template_id: z.string(),
@@ -685,10 +679,7 @@ export const zPostRagPipelinesByPipelineIdCustomizedPublishPath = z.object({
/**
* Pipeline template published
*/
-export const zPostRagPipelinesByPipelineIdCustomizedPublishResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zPostRagPipelinesByPipelineIdCustomizedPublishResponse = z.void()
export const zGetRagPipelinesByPipelineIdExportsPath = z.object({
pipeline_id: z.string(),
@@ -1134,10 +1125,7 @@ export const zDeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdPath = z.object
/**
* Workflow deleted successfully
*/
-export const zDeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse = z.void()
export const zPatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdPath = z.object({
pipeline_id: z.string(),
diff --git a/packages/contracts/generated/api/console/snippets/types.gen.ts b/packages/contracts/generated/api/console/snippets/types.gen.ts
index ae46ee98134..f12b39725db 100644
--- a/packages/contracts/generated/api/console/snippets/types.gen.ts
+++ b/packages/contracts/generated/api/console/snippets/types.gen.ts
@@ -12,8 +12,8 @@ export type WorkflowRunPaginationResponse = {
export type WorkflowRunDetailResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
- created_by_end_user?: SimpleEndUser
+ created_by_account?: SimpleAccount | null
+ created_by_end_user?: SimpleEndUser | null
created_by_role?: string | null
elapsed_time?: number | null
error?: string | null
@@ -43,7 +43,7 @@ export type WorkflowPaginationResponse = {
export type SnippetWorkflowResponse = {
conversation_variables: Array
created_at: number
- created_by?: SimpleAccount
+ created_by?: SimpleAccount | null
environment_variables: Array
features: {
[key: string]: unknown
@@ -61,7 +61,7 @@ export type SnippetWorkflowResponse = {
rag_pipeline_variables: Array
tool_published: boolean
updated_at: number
- updated_by?: SimpleAccount
+ updated_by?: SimpleAccount | null
version: string
}
@@ -96,8 +96,8 @@ export type SnippetLoopNodeRunPayload = {
export type WorkflowRunNodeExecutionResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
- created_by_end_user?: SimpleEndUser
+ created_by_account?: SimpleAccount | null
+ created_by_end_user?: SimpleEndUser | null
created_by_role?: string | null
elapsed_time?: number | null
error?: string | null
@@ -165,7 +165,7 @@ export type WorkflowDraftVariable = {
export type WorkflowDraftVariableUpdatePayload = {
name?: string | null
- value?: unknown
+ value?: unknown | null
}
export type PublishWorkflowPayload = {
@@ -176,7 +176,7 @@ export type PublishWorkflowPayload = {
export type WorkflowRunForListResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
+ created_by_account?: SimpleAccount | null
elapsed_time?: number | null
exceptions_count?: number | null
finished_at?: number | null
@@ -204,7 +204,7 @@ export type SimpleEndUser = {
export type WorkflowResponse = {
conversation_variables: Array
created_at: number
- created_by?: SimpleAccount
+ created_by?: SimpleAccount | null
environment_variables: Array
features: {
[key: string]: unknown
@@ -219,7 +219,7 @@ export type WorkflowResponse = {
rag_pipeline_variables: Array
tool_published: boolean
updated_at: number
- updated_by?: SimpleAccount
+ updated_by?: SimpleAccount | null
version: string
}
@@ -630,9 +630,7 @@ export type DeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesData =
}
export type DeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse
@@ -708,9 +706,7 @@ export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesData = {
}
export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponse
@@ -755,9 +751,7 @@ export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdError
= DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors[keyof DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors]
export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse
@@ -836,9 +830,7 @@ export type PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetError
export type PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponses = {
200: WorkflowDraftVariable
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponse
diff --git a/packages/contracts/generated/api/console/snippets/zod.gen.ts b/packages/contracts/generated/api/console/snippets/zod.gen.ts
index 20b932592a6..85a1f63d45e 100644
--- a/packages/contracts/generated/api/console/snippets/zod.gen.ts
+++ b/packages/contracts/generated/api/console/snippets/zod.gen.ts
@@ -76,7 +76,7 @@ export const zWorkflowDraftVariableList = z.object({
*/
export const zWorkflowDraftVariableUpdatePayload = z.object({
name: z.string().nullish(),
- value: z.unknown().optional(),
+ value: z.unknown().nullish(),
})
/**
@@ -102,7 +102,7 @@ export const zSimpleAccount = z.object({
*/
export const zWorkflowRunForListResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
+ created_by_account: zSimpleAccount.nullish(),
elapsed_time: z.number().nullish(),
exceptions_count: z.int().nullish(),
finished_at: z.int().nullish(),
@@ -138,8 +138,8 @@ export const zSimpleEndUser = z.object({
*/
export const zWorkflowRunDetailResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
- created_by_end_user: zSimpleEndUser.optional(),
+ created_by_account: zSimpleAccount.nullish(),
+ created_by_end_user: zSimpleEndUser.nullish(),
created_by_role: z.string().nullish(),
elapsed_time: z.number().nullish(),
error: z.string().nullish(),
@@ -160,8 +160,8 @@ export const zWorkflowRunDetailResponse = z.object({
*/
export const zWorkflowRunNodeExecutionResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
- created_by_end_user: zSimpleEndUser.optional(),
+ created_by_account: zSimpleAccount.nullish(),
+ created_by_end_user: zSimpleEndUser.nullish(),
created_by_role: z.string().nullish(),
elapsed_time: z.number().nullish(),
error: z.string().nullish(),
@@ -238,7 +238,7 @@ export const zPipelineVariableResponse = z.object({
export const zSnippetWorkflowResponse = z.object({
conversation_variables: z.array(zWorkflowConversationVariableResponse),
created_at: z.int(),
- created_by: zSimpleAccount.optional(),
+ created_by: zSimpleAccount.nullish(),
environment_variables: z.array(zWorkflowEnvironmentVariableResponse),
features: z.record(z.string(), z.unknown()),
graph: z.record(z.string(), z.unknown()),
@@ -250,7 +250,7 @@ export const zSnippetWorkflowResponse = z.object({
rag_pipeline_variables: z.array(zPipelineVariableResponse),
tool_published: z.boolean(),
updated_at: z.int(),
- updated_by: zSimpleAccount.optional(),
+ updated_by: zSimpleAccount.nullish(),
version: z.string(),
})
@@ -260,7 +260,7 @@ export const zSnippetWorkflowResponse = z.object({
export const zWorkflowResponse = z.object({
conversation_variables: z.array(zWorkflowConversationVariableResponse),
created_at: z.int(),
- created_by: zSimpleAccount.optional(),
+ created_by: zSimpleAccount.nullish(),
environment_variables: z.array(zWorkflowEnvironmentVariableResponse),
features: z.record(z.string(), z.unknown()),
graph: z.record(z.string(), z.unknown()),
@@ -271,7 +271,7 @@ export const zWorkflowResponse = z.object({
rag_pipeline_variables: z.array(zPipelineVariableResponse),
tool_published: z.boolean(),
updated_at: z.int(),
- updated_by: zSimpleAccount.optional(),
+ updated_by: zSimpleAccount.nullish(),
version: z.string(),
})
@@ -487,10 +487,7 @@ export const zDeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesPath
/**
* Node variables deleted successfully
*/
-export const zDeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse = z.void()
export const zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({
node_id: z.string(),
@@ -531,10 +528,7 @@ export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesPath = z.object({
/**
* Workflow variables deleted successfully
*/
-export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponse = z.void()
export const zGetSnippetsBySnippetIdWorkflowsDraftVariablesPath = z.object({
snippet_id: z.string(),
@@ -559,10 +553,7 @@ export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath =
/**
* Variable deleted successfully
*/
-export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse = z.void()
export const zGetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath = z.object({
snippet_id: z.string(),
@@ -596,7 +587,7 @@ export const zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetPath
export const zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponse = z.union([
zWorkflowDraftVariable,
- z.record(z.string(), z.never()),
+ z.void(),
])
export const zGetSnippetsBySnippetIdWorkflowsPublishPath = z.object({
diff --git a/packages/contracts/generated/api/console/system-features/zod.gen.ts b/packages/contracts/generated/api/console/system-features/zod.gen.ts
index bbd08821186..7464057a391 100644
--- a/packages/contracts/generated/api/console/system-features/zod.gen.ts
+++ b/packages/contracts/generated/api/console/system-features/zod.gen.ts
@@ -43,8 +43,12 @@ export const zLicenseLimitationModel = z.object({
*/
export const zLicenseModel = z.object({
expired_at: z.string().default(''),
- status: zLicenseStatus,
- workspaces: zLicenseLimitationModel,
+ status: zLicenseStatus.default('none'),
+ workspaces: zLicenseLimitationModel.default({
+ enabled: false,
+ limit: 0,
+ size: 0,
+ }),
})
/**
@@ -61,7 +65,7 @@ export const zPluginInstallationScope = z.enum([
* PluginInstallationPermissionModel
*/
export const zPluginInstallationPermissionModel = z.object({
- plugin_installation_scope: zPluginInstallationScope,
+ plugin_installation_scope: zPluginInstallationScope.default('all'),
restrict_to_marketplace_only: z.boolean().default(false),
})
@@ -80,14 +84,20 @@ export const zWebAppAuthModel = z.object({
allow_email_password_login: z.boolean().default(false),
allow_sso: z.boolean().default(false),
enabled: z.boolean().default(false),
- sso_config: zWebAppAuthSsoModel,
+ sso_config: zWebAppAuthSsoModel.default({ protocol: '' }),
})
/**
* SystemFeatureModel
*/
export const zSystemFeatureModel = z.object({
- branding: zBrandingModel,
+ branding: zBrandingModel.default({
+ application_title: '',
+ enabled: false,
+ favicon: '',
+ login_page_logo: '',
+ workspace_logo: '',
+ }),
enable_change_email: z.boolean().default(true),
enable_collaboration_mode: z.boolean().default(true),
enable_creators_platform: z.boolean().default(false),
@@ -100,13 +110,30 @@ export const zSystemFeatureModel = z.object({
is_allow_create_workspace: z.boolean().default(false),
is_allow_register: z.boolean().default(false),
is_email_setup: z.boolean().default(false),
- license: zLicenseModel,
+ license: zLicenseModel.default({
+ expired_at: '',
+ status: 'none',
+ workspaces: {
+ enabled: false,
+ limit: 0,
+ size: 0,
+ },
+ }),
max_plugin_package_size: z.int().default(15728640),
- plugin_installation_permission: zPluginInstallationPermissionModel,
- plugin_manager: zPluginManagerModel,
+ plugin_installation_permission: zPluginInstallationPermissionModel.default({
+ plugin_installation_scope: 'all',
+ restrict_to_marketplace_only: false,
+ }),
+ plugin_manager: zPluginManagerModel.default({ enabled: false }),
sso_enforced_for_signin: z.boolean().default(false),
sso_enforced_for_signin_protocol: z.string().default(''),
- webapp_auth: zWebAppAuthModel,
+ webapp_auth: zWebAppAuthModel.default({
+ allow_email_code_login: false,
+ allow_email_password_login: false,
+ allow_sso: false,
+ enabled: false,
+ sso_config: { protocol: '' },
+ }),
})
/**
diff --git a/packages/contracts/generated/api/console/tags/types.gen.ts b/packages/contracts/generated/api/console/tags/types.gen.ts
index 8ecf1a55e75..2f80bf565f0 100644
--- a/packages/contracts/generated/api/console/tags/types.gen.ts
+++ b/packages/contracts/generated/api/console/tags/types.gen.ts
@@ -61,9 +61,7 @@ export type DeleteTagsByTagIdData = {
}
export type DeleteTagsByTagIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteTagsByTagIdResponse = DeleteTagsByTagIdResponses[keyof DeleteTagsByTagIdResponses]
diff --git a/packages/contracts/generated/api/console/tags/zod.gen.ts b/packages/contracts/generated/api/console/tags/zod.gen.ts
index b0479b09508..2c83bb29ac5 100644
--- a/packages/contracts/generated/api/console/tags/zod.gen.ts
+++ b/packages/contracts/generated/api/console/tags/zod.gen.ts
@@ -58,7 +58,7 @@ export const zDeleteTagsByTagIdPath = z.object({
/**
* Tag deleted successfully
*/
-export const zDeleteTagsByTagIdResponse = z.record(z.string(), z.never())
+export const zDeleteTagsByTagIdResponse = z.void()
export const zPatchTagsByTagIdBody = zTagUpdateRequestPayload
diff --git a/packages/contracts/generated/api/console/website/orpc.gen.ts b/packages/contracts/generated/api/console/website/orpc.gen.ts
index 5ed1fcd8abf..3632d32121a 100644
--- a/packages/contracts/generated/api/console/website/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/website/orpc.gen.ts
@@ -32,7 +32,7 @@ export const get = oc
.input(
z.object({
params: zGetWebsiteCrawlStatusByJobIdPath,
- query: zGetWebsiteCrawlStatusByJobIdQuery,
+ query: zGetWebsiteCrawlStatusByJobIdQuery.optional(),
}),
)
.output(zGetWebsiteCrawlStatusByJobIdResponse)
diff --git a/packages/contracts/generated/api/console/website/types.gen.ts b/packages/contracts/generated/api/console/website/types.gen.ts
index c8ea0de7b65..8dba2c1370c 100644
--- a/packages/contracts/generated/api/console/website/types.gen.ts
+++ b/packages/contracts/generated/api/console/website/types.gen.ts
@@ -40,8 +40,8 @@ export type GetWebsiteCrawlStatusByJobIdData = {
path: {
job_id: string
}
- query: {
- provider: 'firecrawl' | 'jinareader' | 'watercrawl'
+ query?: {
+ provider?: string
}
url: '/website/crawl/status/{job_id}'
}
diff --git a/packages/contracts/generated/api/console/website/zod.gen.ts b/packages/contracts/generated/api/console/website/zod.gen.ts
index 88f1d4a7c81..13038ac0b1a 100644
--- a/packages/contracts/generated/api/console/website/zod.gen.ts
+++ b/packages/contracts/generated/api/console/website/zod.gen.ts
@@ -23,7 +23,7 @@ export const zGetWebsiteCrawlStatusByJobIdPath = z.object({
})
export const zGetWebsiteCrawlStatusByJobIdQuery = z.object({
- provider: z.enum(['firecrawl', 'jinareader', 'watercrawl']),
+ provider: z.string().optional(),
})
/**
diff --git a/packages/contracts/generated/api/console/workflow/types.gen.ts b/packages/contracts/generated/api/console/workflow/types.gen.ts
index cf794515d40..e8a205378a3 100644
--- a/packages/contracts/generated/api/console/workflow/types.gen.ts
+++ b/packages/contracts/generated/api/console/workflow/types.gen.ts
@@ -18,7 +18,7 @@ export type PausedNodeResponse = {
export type HumanInputPauseTypeResponse = {
backstage_input_url?: string | null
form_id: string
- type: string
+ type: 'human_input'
}
export type GetWorkflowByWorkflowRunIdEventsData = {
diff --git a/packages/contracts/generated/api/console/workflow/zod.gen.ts b/packages/contracts/generated/api/console/workflow/zod.gen.ts
index 6a737a683f8..2a834f2ec3a 100644
--- a/packages/contracts/generated/api/console/workflow/zod.gen.ts
+++ b/packages/contracts/generated/api/console/workflow/zod.gen.ts
@@ -8,7 +8,7 @@ import * as z from 'zod'
export const zHumanInputPauseTypeResponse = z.object({
backstage_input_url: z.string().nullish(),
form_id: z.string(),
- type: z.string(),
+ type: z.literal('human_input'),
})
/**
diff --git a/packages/contracts/generated/api/console/workspaces/types.gen.ts b/packages/contracts/generated/api/console/workspaces/types.gen.ts
index 696620bbe5e..335634279a5 100644
--- a/packages/contracts/generated/api/console/workspaces/types.gen.ts
+++ b/packages/contracts/generated/api/console/workspaces/types.gen.ts
@@ -6,7 +6,7 @@ export type ClientOptions = {
export type TenantInfoResponse = {
created_at?: number | null
- custom_config?: WorkspaceCustomConfigResponse
+ custom_config?: WorkspaceCustomConfigResponse | null
id: string
in_trial?: boolean | null
name?: string | null
@@ -32,7 +32,7 @@ export type CreateSnippetPayload = {
graph?: {
[key: string]: unknown
} | null
- icon_info?: IconInfo
+ icon_info?: IconInfo | null
input_fields?: Array | null
name: string
type?: 'group' | 'node'
@@ -77,7 +77,7 @@ export type SnippetImportPayload = {
export type UpdateSnippetPayload = {
description?: string | null
- icon_info?: IconInfo
+ icon_info?: IconInfo | null
name?: string | null
}
@@ -85,6 +85,8 @@ export type AccountWithRoleList = {
accounts: Array
}
+export type ModelType = 'llm' | 'moderation' | 'rerank' | 'speech2text' | 'text-embedding' | 'tts'
+
export type ParserPostDefault = {
model_settings: Array
}
@@ -223,7 +225,7 @@ export type ParserDeleteModels = {
export type ParserPostModels = {
config_from?: string | null
credential_id?: string | null
- load_balancing?: LoadBalancingPayload
+ load_balancing?: LoadBalancingPayload | null
model: string
model_type: ModelType
}
@@ -459,7 +461,7 @@ export type McpProviderCreatePayload = {
icon: string
icon_background?: string
icon_type: string
- identity_mode?: IdentityMode
+ identity_mode?: IdentityMode | null
name: string
server_identifier: string
server_url: string
@@ -478,7 +480,7 @@ export type McpProviderUpdatePayload = {
icon: string
icon_background?: string
icon_type: string
- identity_mode?: IdentityMode
+ identity_mode?: IdentityMode | null
name: string
provider_id: string
server_identifier: string
@@ -641,8 +643,6 @@ export type Inner = {
export type TenantAccountRole = 'admin' | 'dataset_operator' | 'editor' | 'normal' | 'owner'
-export type ModelType = 'llm' | 'moderation' | 'rerank' | 'speech2text' | 'text-embedding' | 'tts'
-
export type LoadBalancingPayload = {
configs?: Array<{
[key: string]: unknown
@@ -866,9 +866,7 @@ export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdError
= DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors[keyof DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors]
export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse
@@ -1026,7 +1024,7 @@ export type GetWorkspacesCurrentDefaultModelData = {
body?: never
path?: never
query: {
- model_type: string
+ model_type: ModelType
}
url: '/workspaces/current/default-model'
}
@@ -1393,7 +1391,7 @@ export type GetWorkspacesCurrentModelProvidersData = {
body?: never
path?: never
query?: {
- model_type?: string | null
+ model_type?: ModelType | null
}
url: '/workspaces/current/model-providers'
}
@@ -1435,9 +1433,7 @@ export type DeleteWorkspacesCurrentModelProvidersByProviderCredentialsData = {
}
export type DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse
@@ -1543,9 +1539,7 @@ export type DeleteWorkspacesCurrentModelProvidersByProviderModelsData = {
}
export type DeleteWorkspacesCurrentModelProvidersByProviderModelsResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteWorkspacesCurrentModelProvidersByProviderModelsResponse
@@ -1597,9 +1591,7 @@ export type DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsData
}
export type DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse
@@ -1614,7 +1606,7 @@ export type GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsData =
config_from?: string | null
credential_id?: string | null
model: string
- model_type: string
+ model_type: ModelType
}
url: '/workspaces/current/model-providers/{provider}/models/credentials'
}
diff --git a/packages/contracts/generated/api/console/workspaces/zod.gen.ts b/packages/contracts/generated/api/console/workspaces/zod.gen.ts
index 7818191daba..e1eab1a76c3 100644
--- a/packages/contracts/generated/api/console/workspaces/zod.gen.ts
+++ b/packages/contracts/generated/api/console/workspaces/zod.gen.ts
@@ -16,6 +16,20 @@ export const zSnippetImportPayload = z.object({
yaml_url: z.string().nullish(),
})
+/**
+ * ModelType
+ *
+ * Enum class for model type.
+ */
+export const zModelType = z.enum([
+ 'llm',
+ 'moderation',
+ 'rerank',
+ 'speech2text',
+ 'text-embedding',
+ 'tts',
+])
+
/**
* SimpleResultResponse
*/
@@ -189,6 +203,71 @@ export const zParserCredentialValidate = z.object({
credentials: z.record(z.string(), z.unknown()),
})
+/**
+ * ParserDeleteModels
+ */
+export const zParserDeleteModels = z.object({
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * ParserDeleteCredential
+ */
+export const zParserDeleteCredential = z.object({
+ credential_id: z.string(),
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * ParserCreateCredential
+ */
+export const zParserCreateCredential = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ model: z.string(),
+ model_type: zModelType,
+ name: z.string().max(30).nullish(),
+})
+
+/**
+ * ParserUpdateCredential
+ */
+export const zParserUpdateCredential = z.object({
+ credential_id: z.string(),
+ credentials: z.record(z.string(), z.unknown()),
+ model: z.string(),
+ model_type: zModelType,
+ name: z.string().max(30).nullish(),
+})
+
+/**
+ * ParserSwitch
+ */
+export const zParserSwitch = z.object({
+ credential_id: z.string(),
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * ParserValidate
+ */
+export const zParserValidate = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * LoadBalancingCredentialPayload
+ */
+export const zLoadBalancingCredentialPayload = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ model: z.string(),
+ model_type: zModelType,
+})
+
/**
* ParserPreferredProviderType
*/
@@ -433,7 +512,7 @@ export const zWorkspaceCustomConfigResponse = z.object({
*/
export const zTenantInfoResponse = z.object({
created_at: z.int().nullish(),
- custom_config: zWorkspaceCustomConfigResponse.optional(),
+ custom_config: zWorkspaceCustomConfigResponse.nullish(),
id: z.string(),
in_trial: z.boolean().nullish(),
name: z.string().nullish(),
@@ -465,7 +544,7 @@ export const zIconInfo = z.object({
*/
export const zUpdateSnippetPayload = z.object({
description: z.string().max(2000).nullish(),
- icon_info: zIconInfo.optional(),
+ icon_info: zIconInfo.nullish(),
name: z.string().min(1).max(255).nullish(),
})
@@ -493,7 +572,7 @@ export const zInputFieldDefinition = z.object({
export const zCreateSnippetPayload = z.object({
description: z.string().max(2000).nullish(),
graph: z.record(z.string(), z.unknown()).nullish(),
- icon_info: zIconInfo.optional(),
+ icon_info: zIconInfo.nullish(),
input_fields: z.array(zInputFieldDefinition).nullish(),
name: z.string().min(1).max(255),
type: z.enum(['group', 'node']).optional().default('node'),
@@ -576,99 +655,6 @@ export const zAccountWithRoleList = z.object({
accounts: z.array(zAccountWithRole),
})
-/**
- * TenantAccountRole
- */
-export const zTenantAccountRole = z.enum(['admin', 'dataset_operator', 'editor', 'normal', 'owner'])
-
-/**
- * MemberInvitePayload
- */
-export const zMemberInvitePayload = z.object({
- emails: z.array(z.string()).optional(),
- language: z.string().nullish(),
- role: zTenantAccountRole,
-})
-
-/**
- * ModelType
- *
- * Enum class for model type.
- */
-export const zModelType = z.enum([
- 'llm',
- 'moderation',
- 'rerank',
- 'speech2text',
- 'text-embedding',
- 'tts',
-])
-
-/**
- * ParserDeleteModels
- */
-export const zParserDeleteModels = z.object({
- model: z.string(),
- model_type: zModelType,
-})
-
-/**
- * ParserDeleteCredential
- */
-export const zParserDeleteCredential = z.object({
- credential_id: z.string(),
- model: z.string(),
- model_type: zModelType,
-})
-
-/**
- * ParserCreateCredential
- */
-export const zParserCreateCredential = z.object({
- credentials: z.record(z.string(), z.unknown()),
- model: z.string(),
- model_type: zModelType,
- name: z.string().max(30).nullish(),
-})
-
-/**
- * ParserUpdateCredential
- */
-export const zParserUpdateCredential = z.object({
- credential_id: z.string(),
- credentials: z.record(z.string(), z.unknown()),
- model: z.string(),
- model_type: zModelType,
- name: z.string().max(30).nullish(),
-})
-
-/**
- * ParserSwitch
- */
-export const zParserSwitch = z.object({
- credential_id: z.string(),
- model: z.string(),
- model_type: zModelType,
-})
-
-/**
- * ParserValidate
- */
-export const zParserValidate = z.object({
- credentials: z.record(z.string(), z.unknown()),
- model: z.string(),
- model_type: zModelType,
-})
-
-/**
- * LoadBalancingCredentialPayload
- */
-export const zLoadBalancingCredentialPayload = z.object({
- credentials: z.record(z.string(), z.unknown()),
- model: z.string(),
- model_type: zModelType,
-})
-
/**
* Inner
*/
@@ -685,6 +671,20 @@ export const zParserPostDefault = z.object({
model_settings: z.array(zInner),
})
+/**
+ * TenantAccountRole
+ */
+export const zTenantAccountRole = z.enum(['admin', 'dataset_operator', 'editor', 'normal', 'owner'])
+
+/**
+ * MemberInvitePayload
+ */
+export const zMemberInvitePayload = z.object({
+ emails: z.array(z.string()).optional(),
+ language: z.string().nullish(),
+ role: zTenantAccountRole,
+})
+
/**
* LoadBalancingPayload
*/
@@ -699,7 +699,7 @@ export const zLoadBalancingPayload = z.object({
export const zParserPostModels = z.object({
config_from: z.string().nullish(),
credential_id: z.string().nullish(),
- load_balancing: zLoadBalancingPayload.optional(),
+ load_balancing: zLoadBalancingPayload.nullish(),
model: z.string(),
model_type: zModelType,
})
@@ -726,8 +726,8 @@ export const zParserPermissionChange = z.object({
* PluginPermissionSettingsPayload
*/
export const zPluginPermissionSettingsPayload = z.object({
- debug_permission: zDebugPermission.optional(),
- install_permission: zInstallPermission.optional(),
+ debug_permission: zDebugPermission.optional().default('everyone'),
+ install_permission: zInstallPermission.optional().default('everyone'),
})
/**
@@ -815,7 +815,7 @@ export const zMcpProviderCreatePayload = z.object({
icon: z.string(),
icon_background: z.string().optional().default(''),
icon_type: z.string(),
- identity_mode: zIdentityMode.optional(),
+ identity_mode: zIdentityMode.nullish(),
name: z.string(),
server_identifier: z.string(),
server_url: z.string(),
@@ -831,7 +831,7 @@ export const zMcpProviderUpdatePayload = z.object({
icon: z.string(),
icon_background: z.string().optional().default(''),
icon_type: z.string(),
- identity_mode: zIdentityMode.optional(),
+ identity_mode: zIdentityMode.nullish(),
name: z.string(),
provider_id: z.string(),
server_identifier: z.string(),
@@ -854,8 +854,8 @@ export const zUpgradeMode = z.enum(['all', 'exclude', 'partial'])
export const zPluginAutoUpgradeSettingsPayload = z.object({
exclude_plugins: z.array(z.string()).optional(),
include_plugins: z.array(z.string()).optional(),
- strategy_setting: zStrategySetting.optional(),
- upgrade_mode: zUpgradeMode.optional(),
+ strategy_setting: zStrategySetting.optional().default('fix_only'),
+ upgrade_mode: zUpgradeMode.optional().default('exclude'),
upgrade_time_of_day: z.int().optional().default(0),
})
@@ -987,10 +987,7 @@ export const zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdPath = z.objec
/**
* Snippet deleted successfully
*/
-export const zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse = z.void()
export const zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdPath = z.object({
snippet_id: z.string(),
@@ -1052,7 +1049,7 @@ export const zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncremen
export const zGetWorkspacesCurrentDatasetOperatorsResponse = zAccountWithRoleList
export const zGetWorkspacesCurrentDefaultModelQuery = z.object({
- model_type: z.string(),
+ model_type: zModelType,
})
/**
@@ -1104,7 +1101,7 @@ export const zPostWorkspacesCurrentEndpointsEnableResponse = zEndpointEnableResp
export const zGetWorkspacesCurrentEndpointsListQuery = z.object({
page: z.int().gte(1),
- page_size: z.int(),
+ page_size: z.int().gt(0),
})
/**
@@ -1114,7 +1111,7 @@ export const zGetWorkspacesCurrentEndpointsListResponse = zEndpointListResponse
export const zGetWorkspacesCurrentEndpointsListPluginQuery = z.object({
page: z.int().gte(1),
- page_size: z.int(),
+ page_size: z.int().gt(0),
plugin_id: z.string(),
})
@@ -1216,7 +1213,7 @@ export const zPutWorkspacesCurrentMembersByMemberIdUpdateRoleResponse = z.record
)
export const zGetWorkspacesCurrentModelProvidersQuery = z.object({
- model_type: z.string().nullish(),
+ model_type: zModelType.nullish(),
})
/**
@@ -1246,10 +1243,7 @@ export const zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsPath = z
/**
* Credential deleted successfully
*/
-export const zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse = z.void()
export const zGetWorkspacesCurrentModelProvidersByProviderCredentialsPath = z.object({
provider: z.string(),
@@ -1332,10 +1326,7 @@ export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsPath = z.obje
/**
* Model deleted successfully
*/
-export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsResponse = z.void()
export const zGetWorkspacesCurrentModelProvidersByProviderModelsPath = z.object({
provider: z.string(),
@@ -1373,10 +1364,7 @@ export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsPa
/**
* Credential deleted successfully
*/
-export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse = z.void()
export const zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath = z.object({
provider: z.string(),
@@ -1386,7 +1374,7 @@ export const zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsQuery
config_from: z.string().nullish(),
credential_id: z.string().nullish(),
model: z.string(),
- model_type: z.string(),
+ model_type: zModelType,
})
/**
diff --git a/packages/contracts/generated/api/openapi/types.gen.ts b/packages/contracts/generated/api/openapi/types.gen.ts
index 619eef42d2a..6d630639592 100644
--- a/packages/contracts/generated/api/openapi/types.gen.ts
+++ b/packages/contracts/generated/api/openapi/types.gen.ts
@@ -11,7 +11,7 @@ export type AccountPayload = {
}
export type AccountResponse = {
- account?: AccountPayload
+ account?: AccountPayload | null
default_workspace_id?: string | null
subject_email?: string | null
subject_issuer?: string | null
@@ -36,7 +36,7 @@ export type AppDescribeQuery = {
}
export type AppDescribeResponse = {
- info?: AppDescribeInfo
+ info?: AppDescribeInfo | null
input_schema?: {
[key: string]: unknown
} | null
@@ -77,7 +77,7 @@ export type AppInfoResponse = {
export type AppListQuery = {
limit?: number
- mode?: AppMode
+ mode?: AppMode | null
name?: string | null
page?: number
tag?: string | null
@@ -177,7 +177,7 @@ export type ErrorBody = {
}
export type ErrorDetail = {
- loc?: Array
+ loc?: Array
msg: string
type: string
}
@@ -242,7 +242,7 @@ export type Marketplace = {
}
export type MemberActionResponse = {
- result?: string
+ result?: 'success'
}
export type MemberInvitePayload = {
@@ -254,7 +254,7 @@ export type MemberInviteResponse = {
email: string
invite_url: string
member_id: string
- result?: string
+ result?: 'success'
role: string
tenant_id: string
}
@@ -289,7 +289,7 @@ export type MessageMetadata = {
retriever_resources?: Array<{
[key: string]: unknown
}>
- usage?: UsageInfo
+ usage?: UsageInfo | null
}
export type OpenApiErrorCode
@@ -330,7 +330,7 @@ export type Package = {
export type PermittedExternalAppsListQuery = {
limit?: number
- mode?: AppMode
+ mode?: AppMode | null
name?: string | null
page?: number
}
@@ -346,7 +346,7 @@ export type PermittedExternalAppsListResponse = {
export type PluginDependency = {
current_identifier?: string | null
type: Type
- value: unknown
+ value: Github | Marketplace | Package
}
export type RevokeResponse = {
@@ -386,7 +386,7 @@ export type TagItem = {
}
export type TaskStopResponse = {
- result: string
+ result: 'success'
}
export type Type = 'github' | 'marketplace' | 'package'
diff --git a/packages/contracts/generated/api/openapi/zod.gen.ts b/packages/contracts/generated/api/openapi/zod.gen.ts
index 3c815ad2b6c..6379ffc62e2 100644
--- a/packages/contracts/generated/api/openapi/zod.gen.ts
+++ b/packages/contracts/generated/api/openapi/zod.gen.ts
@@ -79,7 +79,7 @@ export const zAppMode = z.enum([
*/
export const zAppListQuery = z.object({
limit: z.int().gte(1).lte(200).optional().default(20),
- mode: zAppMode.optional(),
+ mode: zAppMode.nullish(),
name: z.string().max(200).nullish(),
page: z.int().gte(1).optional().default(1),
tag: z.string().max(100).nullish(),
@@ -160,7 +160,10 @@ export const zDevicePollRequest = z.object({
* ErrorDetail
*/
export const zErrorDetail = z.object({
- loc: z.array(z.unknown()).optional().default([]),
+ loc: z
+ .array(z.union([z.string(), z.int()]))
+ .optional()
+ .default([]),
msg: z.string(),
type: z.string(),
})
@@ -269,7 +272,7 @@ export const zMarketplace = z.object({
* MemberActionResponse
*/
export const zMemberActionResponse = z.object({
- result: z.string().optional().default('success'),
+ result: z.literal('success').optional().default('success'),
})
/**
@@ -287,7 +290,7 @@ export const zMemberInviteResponse = z.object({
email: z.string(),
invite_url: z.string(),
member_id: z.string(),
- result: z.string().optional().default('success'),
+ result: z.literal('success').optional().default('success'),
role: z.string(),
tenant_id: z.string(),
})
@@ -382,7 +385,7 @@ export const zPackage = z.object({
*/
export const zPermittedExternalAppsListQuery = z.object({
limit: z.int().gte(1).lte(200).optional().default(20),
- mode: zAppMode.optional(),
+ mode: zAppMode.nullish(),
name: z.string().max(200).nullish(),
page: z.int().gte(1).optional().default(1),
})
@@ -464,7 +467,7 @@ export const zAppDescribeInfo = z.object({
* AppDescribeResponse
*/
export const zAppDescribeResponse = z.object({
- info: zAppDescribeInfo.optional(),
+ info: zAppDescribeInfo.nullish(),
input_schema: z.record(z.string(), z.unknown()).nullish(),
parameters: z.record(z.string(), z.unknown()).nullish(),
})
@@ -526,7 +529,7 @@ export const zPermittedExternalAppsListResponse = z.object({
* types it as a required `'success'` rather than an optional field.
*/
export const zTaskStopResponse = z.object({
- result: z.string(),
+ result: z.literal('success'),
})
/**
@@ -540,7 +543,7 @@ export const zType = z.enum(['github', 'marketplace', 'package'])
export const zPluginDependency = z.object({
current_identifier: z.string().nullish(),
type: zType,
- value: z.unknown(),
+ value: z.union([zGithub, zMarketplace, zPackage]),
})
/**
@@ -564,7 +567,7 @@ export const zUsageInfo = z.object({
*/
export const zMessageMetadata = z.object({
retriever_resources: z.array(z.record(z.string(), z.unknown())).optional().default([]),
- usage: zUsageInfo.optional(),
+ usage: zUsageInfo.nullish(),
})
/**
@@ -608,7 +611,7 @@ export const zWorkspacePayload = z.object({
* AccountResponse
*/
export const zAccountResponse = z.object({
- account: zAccountPayload.optional(),
+ account: zAccountPayload.nullish(),
default_workspace_id: z.string().nullish(),
subject_email: z.string().nullish(),
subject_issuer: z.string().nullish(),
diff --git a/packages/contracts/generated/api/service/types.gen.ts b/packages/contracts/generated/api/service/types.gen.ts
index a702afe5498..f57d90bcfb7 100644
--- a/packages/contracts/generated/api/service/types.gen.ts
+++ b/packages/contracts/generated/api/service/types.gen.ts
@@ -132,7 +132,7 @@ export type Condition = {
| '≤'
| '≥'
name: string
- value?: unknown
+ value?: string | Array | number | number | null
}
export type ConversationListQuery = {
@@ -190,9 +190,9 @@ export type DatasetCreatePayload = {
external_knowledge_id?: string | null
indexing_technique?: 'economy' | 'high_quality' | null
name: string
- permission?: PermissionEnum
+ permission?: PermissionEnum | null
provider?: string
- retrieval_model?: RetrievalModel
+ retrieval_model?: RetrievalModel | null
summary_index_setting?: {
[key: string]: unknown
} | null
@@ -215,7 +215,7 @@ export type DatasetDetailResponse = {
embedding_model_provider: string | null
enable_api: boolean
external_knowledge_info?: DatasetExternalKnowledgeInfoResponse
- external_retrieval_model: DatasetExternalRetrievalModelResponse
+ external_retrieval_model: DatasetExternalRetrievalModelResponse | null
icon_info?: DatasetIconInfoResponse
id: string
indexing_technique: string | null
@@ -253,7 +253,7 @@ export type DatasetDetailWithPartialMembersResponse = {
embedding_model_provider: string | null
enable_api: boolean
external_knowledge_info?: DatasetExternalKnowledgeInfoResponse
- external_retrieval_model: DatasetExternalRetrievalModelResponse
+ external_retrieval_model: DatasetExternalRetrievalModelResponse | null
icon_info?: DatasetIconInfoResponse
id: string
indexing_technique: string | null
@@ -365,7 +365,7 @@ export type DatasetRetrievalModelResponse = {
score_threshold_enabled: boolean
search_method: string
top_k: number
- weights?: DatasetWeightedScoreResponse
+ weights?: DatasetWeightedScoreResponse | null
}
export type DatasetSummaryIndexSettingResponse = {
@@ -395,8 +395,8 @@ export type DatasetUpdatePayload = {
partial_member_list?: Array<{
[key: string]: string
}> | null
- permission?: PermissionEnum
- retrieval_model?: RetrievalModel
+ permission?: PermissionEnum | null
+ retrieval_model?: RetrievalModel | null
}
export type DatasetVectorSettingResponse = {
@@ -454,7 +454,7 @@ export type DocumentMetadataResponse = {
id: string
name: string
type: string
- value?: unknown
+ value?: string | number | number | boolean | null
}
export type DocumentResponse = {
@@ -511,8 +511,8 @@ export type DocumentTextCreatePayload = {
indexing_technique?: string | null
name: string
original_document_id?: string | null
- process_rule?: ProcessRule
- retrieval_model?: RetrievalModel
+ process_rule?: ProcessRule | null
+ retrieval_model?: RetrievalModel | null
text: string
}
@@ -520,8 +520,8 @@ export type DocumentTextUpdate = {
doc_form?: string
doc_language?: string
name?: string | null
- process_rule?: ProcessRule
- retrieval_model?: RetrievalModel
+ process_rule?: ProcessRule | null
+ retrieval_model?: RetrievalModel | null
text?: string | null
}
@@ -574,7 +574,7 @@ export type HitTestingChildChunk = {
export type HitTestingDocument = {
data_source_type: string
- doc_metadata: unknown
+ doc_metadata: unknown | null
doc_type: string | null
id: string
name: string
@@ -595,7 +595,7 @@ export type HitTestingPayload = {
[key: string]: unknown
} | null
query: string
- retrieval_model?: RetrievalModel
+ retrieval_model?: RetrievalModel | null
}
export type HitTestingQuery = {
@@ -608,7 +608,7 @@ export type HitTestingRecord = {
score: number | null
segment: HitTestingSegment
summary: string | null
- tsne_position: unknown
+ tsne_position: unknown | null
}
export type HitTestingResponse = {
@@ -685,7 +685,7 @@ export type MetadataArgs = {
export type MetadataDetail = {
id: string
name: string
- value?: unknown
+ value?: string | number | number | null
}
export type MetadataFilteringCondition = {
@@ -723,7 +723,7 @@ export type PreProcessingRule = {
export type ProcessRule = {
mode: ProcessRuleMode
- rules?: Rule
+ rules?: Rule | null
}
export type ProcessRuleMode = 'automatic' | 'custom' | 'hierarchical'
@@ -744,22 +744,22 @@ export type RetrievalMethod
| 'semantic_search'
export type RetrievalModel = {
- metadata_filtering_conditions?: MetadataFilteringCondition
+ metadata_filtering_conditions?: MetadataFilteringCondition | null
reranking_enable: boolean
reranking_mode?: string | null
- reranking_model?: RerankingModel
+ reranking_model?: RerankingModel | null
score_threshold?: number | null
score_threshold_enabled: boolean
search_method: RetrievalMethod
top_k: number
- weights?: WeightModel
+ weights?: WeightModel | null
}
export type Rule = {
parent_mode?: 'full-doc' | 'paragraph' | null
pre_processing_rules?: Array | null
- segmentation?: Segmentation
- subchunk_segmentation?: Segmentation
+ segmentation?: Segmentation | null
+ subchunk_segmentation?: Segmentation | null
}
export type SegmentAttachmentResponse = {
@@ -937,8 +937,8 @@ export type WeightKeywordSetting = {
}
export type WeightModel = {
- keyword_setting?: WeightKeywordSetting
- vector_setting?: WeightVectorSetting
+ keyword_setting?: WeightKeywordSetting | null
+ vector_setting?: WeightVectorSetting | null
weight_type?: 'customized' | 'keyword_first' | 'semantic_first' | null
}
@@ -958,13 +958,22 @@ export type WorkflowAppLogPaginationResponse = {
export type WorkflowAppLogPartialResponse = {
created_at?: number | null
- created_by_account?: SimpleAccount
- created_by_end_user?: SimpleEndUser
+ created_by_account?: SimpleAccount | null
+ created_by_end_user?: SimpleEndUser | null
created_by_role?: string | null
created_from?: string | null
- details?: unknown
+ details?:
+ | {
+ [key: string]: unknown
+ }
+ | Array
+ | string
+ | number
+ | number
+ | boolean
+ | null
id: string
- workflow_run?: WorkflowRunForLogResponse
+ workflow_run?: WorkflowRunForLogResponse | null
}
export type WorkflowLogQuery = {
@@ -980,7 +989,7 @@ export type WorkflowLogQuery = {
export type WorkflowRunForLogResponse = {
created_at?: number | null
- elapsed_time?: unknown
+ elapsed_time?: number | number | null
error?: string | null
exceptions_count?: number | null
finished_at?: number | null
@@ -1005,11 +1014,20 @@ export type WorkflowRunPayload = {
export type WorkflowRunResponse = {
created_at?: number | null
- elapsed_time?: unknown
+ elapsed_time?: number | number | null
error?: string | null
finished_at?: number | null
id: string
- inputs?: unknown
+ inputs?:
+ | {
+ [key: string]: unknown
+ }
+ | Array
+ | string
+ | number
+ | number
+ | boolean
+ | null
outputs?: {
[key: string]: unknown
}
@@ -1205,9 +1223,7 @@ export type DeleteAppsAnnotationsByAnnotationIdError
= DeleteAppsAnnotationsByAnnotationIdErrors[keyof DeleteAppsAnnotationsByAnnotationIdErrors]
export type DeleteAppsAnnotationsByAnnotationIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteAppsAnnotationsByAnnotationIdResponse
@@ -1456,9 +1472,7 @@ export type DeleteConversationsByCIdError
= DeleteConversationsByCIdErrors[keyof DeleteConversationsByCIdErrors]
export type DeleteConversationsByCIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteConversationsByCIdResponse
@@ -1662,9 +1676,7 @@ export type DeleteDatasetsTagsErrors = {
export type DeleteDatasetsTagsError = DeleteDatasetsTagsErrors[keyof DeleteDatasetsTagsErrors]
export type DeleteDatasetsTagsResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsTagsResponse
@@ -1759,9 +1771,7 @@ export type PostDatasetsTagsBindingError
= PostDatasetsTagsBindingErrors[keyof PostDatasetsTagsBindingErrors]
export type PostDatasetsTagsBindingResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PostDatasetsTagsBindingResponse
@@ -1787,9 +1797,7 @@ export type PostDatasetsTagsUnbindingError
= PostDatasetsTagsUnbindingErrors[keyof PostDatasetsTagsUnbindingErrors]
export type PostDatasetsTagsUnbindingResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type PostDatasetsTagsUnbindingResponse
@@ -1820,9 +1828,7 @@ export type DeleteDatasetsByDatasetIdError
= DeleteDatasetsByDatasetIdErrors[keyof DeleteDatasetsByDatasetIdErrors]
export type DeleteDatasetsByDatasetIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdResponse
@@ -2192,9 +2198,7 @@ export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdError
= DeleteDatasetsByDatasetIdDocumentsByDocumentIdErrors[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdErrors]
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse
@@ -2388,9 +2392,7 @@ export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErr
= DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors]
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
@@ -2548,9 +2550,7 @@ export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChi
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses
= {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
@@ -2873,9 +2873,7 @@ export type DeleteDatasetsByDatasetIdMetadataByMetadataIdError
= DeleteDatasetsByDatasetIdMetadataByMetadataIdErrors[keyof DeleteDatasetsByDatasetIdMetadataByMetadataIdErrors]
export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponse
diff --git a/packages/contracts/generated/api/service/zod.gen.ts b/packages/contracts/generated/api/service/zod.gen.ts
index b664eec6f27..4575e95b718 100644
--- a/packages/contracts/generated/api/service/zod.gen.ts
+++ b/packages/contracts/generated/api/service/zod.gen.ts
@@ -170,7 +170,7 @@ export const zCondition = z.object({
'≥',
]),
name: z.string(),
- value: z.unknown().optional(),
+ value: z.union([z.string(), z.array(z.string()), z.int(), z.number()]).nullish(),
})
/**
@@ -408,7 +408,7 @@ export const zDatasetRetrievalModelResponse = z.object({
score_threshold_enabled: z.boolean(),
search_method: z.string(),
top_k: z.int(),
- weights: zDatasetWeightedScoreResponse.optional(),
+ weights: zDatasetWeightedScoreResponse.nullish(),
})
/**
@@ -431,7 +431,7 @@ export const zDatasetDetailResponse = z.object({
embedding_model_provider: z.string().nullable(),
enable_api: z.boolean(),
external_knowledge_info: zDatasetExternalKnowledgeInfoResponse.optional(),
- external_retrieval_model: zDatasetExternalRetrievalModelResponse,
+ external_retrieval_model: zDatasetExternalRetrievalModelResponse.nullable(),
icon_info: zDatasetIconInfoResponse.optional(),
id: z.string(),
indexing_technique: z.string().nullable(),
@@ -472,7 +472,7 @@ export const zDatasetDetailWithPartialMembersResponse = z.object({
embedding_model_provider: z.string().nullable(),
enable_api: z.boolean(),
external_knowledge_info: zDatasetExternalKnowledgeInfoResponse.optional(),
- external_retrieval_model: zDatasetExternalRetrievalModelResponse,
+ external_retrieval_model: zDatasetExternalRetrievalModelResponse.nullable(),
icon_info: zDatasetIconInfoResponse.optional(),
id: z.string(),
indexing_technique: z.string().nullable(),
@@ -541,7 +541,7 @@ export const zDocumentMetadataResponse = z.object({
id: z.string(),
name: z.string(),
type: z.string(),
- value: z.unknown().optional(),
+ value: z.union([z.string(), z.int(), z.number(), z.boolean()]).nullish(),
})
/**
@@ -691,7 +691,7 @@ export const zHitTestingChildChunk = z.object({
*/
export const zHitTestingDocument = z.object({
data_source_type: z.string(),
- doc_metadata: z.unknown(),
+ doc_metadata: z.unknown().nullable(),
doc_type: z.string().nullable(),
id: z.string(),
name: z.string(),
@@ -754,7 +754,7 @@ export const zHitTestingRecord = z.object({
score: z.number().nullable(),
segment: zHitTestingSegment,
summary: z.string().nullable(),
- tsne_position: z.unknown(),
+ tsne_position: z.unknown().nullable(),
})
/**
@@ -830,7 +830,7 @@ export const zMetadataArgs = z.object({
export const zMetadataDetail = z.object({
id: z.string(),
name: z.string(),
- value: z.unknown().optional(),
+ value: z.union([z.string(), z.int(), z.number()]).nullish(),
})
/**
@@ -1062,8 +1062,8 @@ export const zSegmentation = z.object({
export const zRule = z.object({
parent_mode: z.enum(['full-doc', 'paragraph']).nullish(),
pre_processing_rules: z.array(zPreProcessingRule).nullish(),
- segmentation: zSegmentation.optional(),
- subchunk_segmentation: zSegmentation.optional(),
+ segmentation: zSegmentation.nullish(),
+ subchunk_segmentation: zSegmentation.nullish(),
})
/**
@@ -1071,7 +1071,7 @@ export const zRule = z.object({
*/
export const zProcessRule = z.object({
mode: zProcessRuleMode,
- rules: zRule.optional(),
+ rules: zRule.nullish(),
})
/**
@@ -1121,7 +1121,7 @@ export const zSite = z.object({
icon: z.string().nullish(),
icon_background: z.string().nullish(),
icon_type: z.string().nullish(),
- icon_url: z.string().readonly().nullable(),
+ icon_url: z.string().nullable(),
privacy_policy: z.string().nullish(),
show_workflow_steps: z.boolean(),
title: z.string(),
@@ -1206,8 +1206,8 @@ export const zWeightVectorSetting = z.object({
* WeightModel
*/
export const zWeightModel = z.object({
- keyword_setting: zWeightKeywordSetting.optional(),
- vector_setting: zWeightVectorSetting.optional(),
+ keyword_setting: zWeightKeywordSetting.nullish(),
+ vector_setting: zWeightVectorSetting.nullish(),
weight_type: z.enum(['customized', 'keyword_first', 'semantic_first']).nullish(),
})
@@ -1215,15 +1215,15 @@ export const zWeightModel = z.object({
* RetrievalModel
*/
export const zRetrievalModel = z.object({
- metadata_filtering_conditions: zMetadataFilteringCondition.optional(),
+ metadata_filtering_conditions: zMetadataFilteringCondition.nullish(),
reranking_enable: z.boolean(),
reranking_mode: z.string().nullish(),
- reranking_model: zRerankingModel.optional(),
+ reranking_model: zRerankingModel.nullish(),
score_threshold: z.number().nullish(),
score_threshold_enabled: z.boolean(),
search_method: zRetrievalMethod,
top_k: z.int(),
- weights: zWeightModel.optional(),
+ weights: zWeightModel.nullish(),
})
/**
@@ -1237,9 +1237,9 @@ export const zDatasetCreatePayload = z.object({
external_knowledge_id: z.string().nullish(),
indexing_technique: z.enum(['economy', 'high_quality']).nullish(),
name: z.string().min(1).max(40),
- permission: zPermissionEnum.optional(),
+ permission: zPermissionEnum.nullish().default('only_me'),
provider: z.string().optional().default('vendor'),
- retrieval_model: zRetrievalModel.optional(),
+ retrieval_model: zRetrievalModel.nullish(),
summary_index_setting: z.record(z.string(), z.unknown()).nullish(),
})
@@ -1256,8 +1256,8 @@ export const zDatasetUpdatePayload = z.object({
indexing_technique: z.enum(['economy', 'high_quality']).nullish(),
name: z.string().min(1).max(40).nullish(),
partial_member_list: z.array(z.record(z.string(), z.string())).nullish(),
- permission: zPermissionEnum.optional(),
- retrieval_model: zRetrievalModel.optional(),
+ permission: zPermissionEnum.nullish(),
+ retrieval_model: zRetrievalModel.nullish(),
})
/**
@@ -1271,8 +1271,8 @@ export const zDocumentTextCreatePayload = z.object({
indexing_technique: z.string().nullish(),
name: z.string(),
original_document_id: z.string().nullish(),
- process_rule: zProcessRule.optional(),
- retrieval_model: zRetrievalModel.optional(),
+ process_rule: zProcessRule.nullish(),
+ retrieval_model: zRetrievalModel.nullish(),
text: z.string(),
})
@@ -1283,8 +1283,8 @@ export const zDocumentTextUpdate = z.object({
doc_form: z.string().optional().default('text_model'),
doc_language: z.string().optional().default('English'),
name: z.string().nullish(),
- process_rule: zProcessRule.optional(),
- retrieval_model: zRetrievalModel.optional(),
+ process_rule: zProcessRule.nullish(),
+ retrieval_model: zRetrievalModel.nullish(),
text: z.string().nullish(),
})
@@ -1295,7 +1295,7 @@ export const zHitTestingPayload = z.object({
attachment_ids: z.array(z.string()).nullish(),
external_retrieval_model: z.record(z.string(), z.unknown()).nullish(),
query: z.string().max(250),
- retrieval_model: zRetrievalModel.optional(),
+ retrieval_model: zRetrievalModel.nullish(),
})
/**
@@ -1317,7 +1317,7 @@ export const zWorkflowLogQuery = z.object({
*/
export const zWorkflowRunForLogResponse = z.object({
created_at: z.int().nullish(),
- elapsed_time: z.unknown().optional(),
+ elapsed_time: z.union([z.number(), z.int()]).nullish(),
error: z.string().nullish(),
exceptions_count: z.int().nullish(),
finished_at: z.int().nullish(),
@@ -1334,13 +1334,22 @@ export const zWorkflowRunForLogResponse = z.object({
*/
export const zWorkflowAppLogPartialResponse = z.object({
created_at: z.int().nullish(),
- created_by_account: zSimpleAccount.optional(),
- created_by_end_user: zSimpleEndUser.optional(),
+ created_by_account: zSimpleAccount.nullish(),
+ created_by_end_user: zSimpleEndUser.nullish(),
created_by_role: z.string().nullish(),
created_from: z.string().nullish(),
- details: z.unknown().optional(),
+ details: z
+ .union([
+ z.record(z.string(), z.unknown()),
+ z.array(z.unknown()),
+ z.string(),
+ z.int(),
+ z.number(),
+ z.boolean(),
+ ])
+ .nullish(),
id: z.string(),
- workflow_run: zWorkflowRunForLogResponse.optional(),
+ workflow_run: zWorkflowRunForLogResponse.nullish(),
})
/**
@@ -1369,11 +1378,20 @@ export const zWorkflowRunPayload = z.object({
*/
export const zWorkflowRunResponse = z.object({
created_at: z.int().nullish(),
- elapsed_time: z.unknown().optional(),
+ elapsed_time: z.union([z.number(), z.int()]).nullish(),
error: z.string().nullish(),
finished_at: z.int().nullish(),
id: z.string(),
- inputs: z.unknown().optional(),
+ inputs: z
+ .union([
+ z.record(z.string(), z.unknown()),
+ z.array(z.unknown()),
+ z.string(),
+ z.int(),
+ z.number(),
+ z.boolean(),
+ ])
+ .nullish(),
outputs: z.record(z.string(), z.unknown()).optional(),
status: z.string(),
total_steps: z.int().nullish(),
@@ -1464,7 +1482,7 @@ export const zDeleteAppsAnnotationsByAnnotationIdPath = z.object({
/**
* Annotation deleted successfully
*/
-export const zDeleteAppsAnnotationsByAnnotationIdResponse = z.record(z.string(), z.never())
+export const zDeleteAppsAnnotationsByAnnotationIdResponse = z.void()
export const zPutAppsAnnotationsByAnnotationIdBody = zAnnotationCreatePayload
@@ -1535,7 +1553,7 @@ export const zDeleteConversationsByCIdPath = z.object({
/**
* Conversation deleted successfully
*/
-export const zDeleteConversationsByCIdResponse = z.record(z.string(), z.never())
+export const zDeleteConversationsByCIdResponse = z.void()
export const zPostConversationsByCIdNameBody = zConversationRenamePayload
@@ -1606,7 +1624,7 @@ export const zDeleteDatasetsTagsBody = zTagDeletePayload
/**
* Tag deleted successfully
*/
-export const zDeleteDatasetsTagsResponse = z.record(z.string(), z.never())
+export const zDeleteDatasetsTagsResponse = z.void()
/**
* Tags retrieved successfully
@@ -1632,14 +1650,14 @@ export const zPostDatasetsTagsBindingBody = zTagBindingPayload
/**
* Tags bound successfully
*/
-export const zPostDatasetsTagsBindingResponse = z.record(z.string(), z.never())
+export const zPostDatasetsTagsBindingResponse = z.void()
export const zPostDatasetsTagsUnbindingBody = zTagUnbindingPayload
/**
* Tags unbound successfully
*/
-export const zPostDatasetsTagsUnbindingResponse = z.record(z.string(), z.never())
+export const zPostDatasetsTagsUnbindingResponse = z.void()
export const zDeleteDatasetsByDatasetIdPath = z.object({
dataset_id: z.string(),
@@ -1648,7 +1666,7 @@ export const zDeleteDatasetsByDatasetIdPath = z.object({
/**
* Dataset deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdResponse = z.record(z.string(), z.never())
+export const zDeleteDatasetsByDatasetIdResponse = z.void()
export const zGetDatasetsByDatasetIdPath = z.object({
dataset_id: z.string(),
@@ -1790,10 +1808,7 @@ export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdPath = z.object({
/**
* Document deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse = z.void()
export const zGetDatasetsByDatasetIdDocumentsByDocumentIdPath = z.object({
dataset_id: z.string(),
@@ -1872,10 +1887,7 @@ export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdP
/**
* Segment deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse = z.void()
export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath = z.object({
dataset_id: z.string(),
@@ -1952,7 +1964,7 @@ export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdC
* Child chunk deleted successfully
*/
export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
- = z.record(z.string(), z.never())
+ = z.void()
export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdBody
= zChildChunkUpdatePayload
@@ -2088,10 +2100,7 @@ export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdPath = z.object({
/**
* Metadata deleted successfully
*/
-export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse = z.record(
- z.string(),
- z.never(),
-)
+export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse = z.void()
export const zPatchDatasetsByDatasetIdMetadataByMetadataIdBody = zMetadataUpdatePayload
diff --git a/packages/contracts/generated/api/web/types.gen.ts b/packages/contracts/generated/api/web/types.gen.ts
index d6adf720558..39c32702192 100644
--- a/packages/contracts/generated/api/web/types.gen.ts
+++ b/packages/contracts/generated/api/web/types.gen.ts
@@ -539,9 +539,7 @@ export type DeleteConversationsByCIdError
= DeleteConversationsByCIdErrors[keyof DeleteConversationsByCIdErrors]
export type DeleteConversationsByCIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteConversationsByCIdResponse
@@ -1378,9 +1376,7 @@ export type DeleteSavedMessagesByMessageIdError
= DeleteSavedMessagesByMessageIdErrors[keyof DeleteSavedMessagesByMessageIdErrors]
export type DeleteSavedMessagesByMessageIdResponses = {
- 204: {
- [key: string]: never
- }
+ 204: void
}
export type DeleteSavedMessagesByMessageIdResponse
diff --git a/packages/contracts/generated/api/web/zod.gen.ts b/packages/contracts/generated/api/web/zod.gen.ts
index baf367eb7ae..777237f5f58 100644
--- a/packages/contracts/generated/api/web/zod.gen.ts
+++ b/packages/contracts/generated/api/web/zod.gen.ts
@@ -213,8 +213,12 @@ export const zLicenseStatus = z.enum(['active', 'expired', 'expiring', 'inactive
*/
export const zLicenseModel = z.object({
expired_at: z.string().default(''),
- status: zLicenseStatus,
- workspaces: zLicenseLimitationModel,
+ status: zLicenseStatus.default('none'),
+ workspaces: zLicenseLimitationModel.default({
+ enabled: false,
+ limit: 0,
+ size: 0,
+ }),
})
/**
@@ -271,7 +275,7 @@ export const zPluginInstallationScope = z.enum([
* PluginInstallationPermissionModel
*/
export const zPluginInstallationPermissionModel = z.object({
- plugin_installation_scope: zPluginInstallationScope,
+ plugin_installation_scope: zPluginInstallationScope.default('all'),
restrict_to_marketplace_only: z.boolean().default(false),
})
@@ -375,14 +379,20 @@ export const zWebAppAuthModel = z.object({
allow_email_password_login: z.boolean().default(false),
allow_sso: z.boolean().default(false),
enabled: z.boolean().default(false),
- sso_config: zWebAppAuthSsoModel,
+ sso_config: zWebAppAuthSsoModel.default({ protocol: '' }),
})
/**
* SystemFeatureModel
*/
export const zSystemFeatureModel = z.object({
- branding: zBrandingModel,
+ branding: zBrandingModel.default({
+ application_title: '',
+ enabled: false,
+ favicon: '',
+ login_page_logo: '',
+ workspace_logo: '',
+ }),
enable_change_email: z.boolean().default(true),
enable_collaboration_mode: z.boolean().default(true),
enable_creators_platform: z.boolean().default(false),
@@ -395,13 +405,30 @@ export const zSystemFeatureModel = z.object({
is_allow_create_workspace: z.boolean().default(false),
is_allow_register: z.boolean().default(false),
is_email_setup: z.boolean().default(false),
- license: zLicenseModel,
+ license: zLicenseModel.default({
+ expired_at: '',
+ status: 'none',
+ workspaces: {
+ enabled: false,
+ limit: 0,
+ size: 0,
+ },
+ }),
max_plugin_package_size: z.int().default(15728640),
- plugin_installation_permission: zPluginInstallationPermissionModel,
- plugin_manager: zPluginManagerModel,
+ plugin_installation_permission: zPluginInstallationPermissionModel.default({
+ plugin_installation_scope: 'all',
+ restrict_to_marketplace_only: false,
+ }),
+ plugin_manager: zPluginManagerModel.default({ enabled: false }),
sso_enforced_for_signin: z.boolean().default(false),
sso_enforced_for_signin_protocol: z.string().default(''),
- webapp_auth: zWebAppAuthModel,
+ webapp_auth: zWebAppAuthModel.default({
+ allow_email_code_login: false,
+ allow_email_password_login: false,
+ allow_sso: false,
+ enabled: false,
+ sso_config: { protocol: '' },
+ }),
})
/**
@@ -471,7 +498,7 @@ export const zDeleteConversationsByCIdPath = z.object({
/**
* Conversation deleted successfully
*/
-export const zDeleteConversationsByCIdResponse = z.record(z.string(), z.never())
+export const zDeleteConversationsByCIdResponse = z.void()
export const zPostConversationsByCIdNamePath = z.object({
c_id: z.string(),
@@ -696,7 +723,7 @@ export const zDeleteSavedMessagesByMessageIdPath = z.object({
/**
* Message removed successfully
*/
-export const zDeleteSavedMessagesByMessageIdResponse = z.record(z.string(), z.never())
+export const zDeleteSavedMessagesByMessageIdResponse = z.void()
/**
* Success
diff --git a/packages/contracts/openapi-ts.api.config.ts b/packages/contracts/openapi-ts.api.config.ts
index 445be5f06ed..fc6ff748111 100644
--- a/packages/contracts/openapi-ts.api.config.ts
+++ b/packages/contracts/openapi-ts.api.config.ts
@@ -7,23 +7,31 @@ import { $, defineConfig } from '@hey-api/openapi-ts'
type JsonObject = Record
type SwaggerSchema = JsonObject & {
- '$defs'?: Record
- '$ref'?: string
- 'x-nullable'?: boolean
- 'additionalProperties'?: unknown
- 'allOf'?: SwaggerSchema[]
- 'anyOf'?: SwaggerSchema[]
- 'const'?: unknown
- 'default'?: unknown
- 'definitions'?: Record
- 'description'?: string
- 'enum'?: unknown[]
- 'format'?: string
- 'items'?: SwaggerSchema
- 'oneOf'?: SwaggerSchema[]
- 'properties'?: Record
- 'required'?: string[]
- 'type'?: string
+ $ref?: string
+ additionalProperties?: unknown
+ allOf?: SwaggerSchema[]
+ anyOf?: SwaggerSchema[]
+ description?: string
+ enum?: unknown[]
+ items?: SwaggerSchema
+ oneOf?: SwaggerSchema[]
+ properties?: Record
+ required?: string[]
+ type?: string
+}
+
+type OpenApiMediaType = JsonObject & {
+ schema?: SwaggerSchema
+}
+
+type OpenApiRequestBody = JsonObject & {
+ content?: Record
+ description?: string
+ required?: boolean
+}
+
+type OpenApiComponents = JsonObject & {
+ schemas?: Record
}
type SwaggerParameter = JsonObject & {
@@ -31,12 +39,11 @@ type SwaggerParameter = JsonObject & {
name?: string
required?: boolean
schema?: SwaggerSchema
- type?: string
}
type SwaggerResponse = JsonObject & {
+ content?: Record
description?: string
- schema?: SwaggerSchema
}
type SwaggerOperation = JsonObject & {
@@ -44,11 +51,13 @@ type SwaggerOperation = JsonObject & {
description?: string
operationId?: string
parameters?: SwaggerParameter[]
+ requestBody?: OpenApiRequestBody | null
responses?: Record
}
type SwaggerDocument = JsonObject & {
- definitions?: Record
+ components?: OpenApiComponents
+ openapi?: string
paths?: Record>
}
@@ -97,10 +106,10 @@ const requestBodyMethods = new Set(['delete', 'patch', 'post', 'put'])
const noBodyResponseStatuses = new Set(['204', '205', '304'])
const apiSpecs: ApiSpec[] = [
- { filename: 'console-swagger.json', name: 'console' },
- { filename: 'web-swagger.json', name: 'web' },
- { filename: 'service-swagger.json', name: 'service' },
- { filename: 'openapi-swagger.json', name: 'openapi' },
+ { filename: 'console-openapi.json', name: 'console' },
+ { filename: 'web-openapi.json', name: 'web' },
+ { filename: 'service-openapi.json', name: 'service' },
+ { filename: 'openapi-openapi.json', name: 'openapi' },
]
const inaccurateGeneratedContractDescription = 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.'
@@ -115,13 +124,6 @@ const unknownObjectSchema = (): SwaggerSchema => ({
type: 'object',
})
-const noContentSchema = (): SwaggerSchema => ({
- // Hey API's Swagger 2.0 pipeline currently needs a response schema symbol even for no-content responses.
- additionalProperties: false,
- properties: {},
- type: 'object',
-})
-
const toWords = (value: string) => {
return value
.replace(/[{}]/g, '')
@@ -190,6 +192,48 @@ const clone = (value: T): T => {
return JSON.parse(JSON.stringify(value)) as T
}
+const componentSchemaRefPrefix = '#/components/schemas/'
+
+const schemaNameFromRef = (ref: string) => {
+ if (ref.startsWith(componentSchemaRefPrefix))
+ return ref.slice(componentSchemaRefPrefix.length)
+ return undefined
+}
+
+const getDocumentSchemas = (document: SwaggerDocument) => {
+ const components = document.components ??= {}
+ return components.schemas ??= {}
+}
+
+const firstContentSchema = (
+ content: Record | undefined,
+ preferredMediaTypes: string[],
+) => {
+ if (!isObject(content))
+ return undefined
+
+ for (const mediaType of preferredMediaTypes) {
+ const media = content[mediaType]
+ if (isObject(media?.schema))
+ return media.schema
+ }
+
+ for (const media of Object.values(content)) {
+ if (isObject(media?.schema))
+ return media.schema
+ }
+
+ return undefined
+}
+
+const getRequestBodySchema = (operation: SwaggerOperation) => {
+ return firstContentSchema(operation.requestBody?.content, ['application/json'])
+}
+
+const getResponseSchema = (response: SwaggerResponse) => {
+ return firstContentSchema(response.content, ['application/json'])
+}
+
const apiOperationKey = (surface: string, method: string, routePath: string) => {
return `${surface}:${method.toLowerCase()}:${routePath}`
}
@@ -358,7 +402,7 @@ const collectRuntimeBodyOperationKeys = () => {
const runtimeBodyOperationKeys = collectRuntimeBodyOperationKeys()
-const collectDefinitionRefs = (value: unknown, refs: Set, visited = new WeakSet