Files
dify-docs/ja/api-reference/openapi_workflow.json
盐粒 Yanli b7f1aab7b4 docs(api): add end-user lookup (#684)
* docs(api): add end-user lookup

* update zh and ja docs

---------

Co-authored-by: RiskeyL <7a8y@163.com>
2026-03-01 19:53:17 +08:00

448 lines
40 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"openapi": "3.0.1",
"info": {
"title": "ワークフローアプリAPI",
"description": "ワークフローアプリケーションは、セッションをサポートせず、翻訳、記事作成、要約AIなどに最適です。",
"version": "1.0.0"
},
"servers": [
{
"url": "{api_base_url}",
"description": "APIのベースURL。{api_base_url}を実際のAPIベースURLに置き換えてください。",
"variables": {
"api_base_url": {
"default": "https://api.dify.ai/v1",
"description": "実際のAPIベースURL"
}
}
}
],
"security": [
{
"ApiKeyAuth": []
}
],
"paths": {
"/workflows/run": {
"post": {
"summary": "ワークフローを実行",
"description": "ワークフローを実行します。公開されたワークフローがないと実行できません。",
"operationId": "executeWorkflowJp",
"tags": ["ワークフロー実行"],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowExecutionRequestJp"
},
"examples": {
"basic_execution_jp": {
"summary": "基本的なワークフロー実行の例",
"value": {
"inputs": {
"query": "このテキストを要約してください:..."
},
"response_mode": "streaming",
"user": "workflow_user_jp_001"
}
},
"with_file_array_variable_jp":{
"summary": "ファイルリスト変数を含む入力の例",
"value": {
"inputs": {
"my_documents": [
{
"type": "document",
"transfer_method": "local_file",
"upload_file_id": "アップロードされたファイルID_xyz"
},
{
"type": "image",
"transfer_method": "remote_url",
"url": "https://example.com/image.jpg"
}
]
},
"response_mode": "blocking",
"user": "workflow_user_jp_002"
}
}
}
}
}
},
"responses": {
"200": {
"description": "ワークフローの実行に成功しました。応答の構造は`response_mode`によって異なります。\n- `blocking`: `application/json`形式で、`WorkflowCompletionResponseJp`オブジェクトが含まれます。\n- `streaming`: `text/event-stream`形式で、`ChunkWorkflowEventJp`イベントストリームが含まれます。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowCompletionResponseJp"
}
},
"text/event-stream": {
"schema": {
"type": "string",
"description": "SSEイベントストリーム。各イベントは'data: 'で始まり、'\\n\\n'で終わります。具体的な構造は`ChunkWorkflowEventJp`を参照してください。"
}
}
}
},
"400": { "$ref": "#/components/responses/BadRequestWorkflowJp" },
"500": { "$ref": "#/components/responses/InternalServerErrorJp" }
}
}
},
"/workflows/run/{workflow_run_id}": {
"get": {
"summary": "ワークフロー実行詳細を取得",
"description": "ワークフロー実行IDに基づいて、ワークフロータスクの現在の実行結果を取得します。",
"operationId": "getWorkflowRunDetailJp",
"tags": ["ワークフロー実行"],
"parameters": [
{
"name": "workflow_run_id",
"in": "path",
"required": true,
"description": "ワークフロー実行ID。ワークフロー実行の応答またはストリーミングイベントから取得できます。",
"schema": { "type": "string", "format": "uuid" }
}
],
"responses": {
"200": {
"description": "ワークフロー実行詳細の取得に成功しました。",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/WorkflowRunDetailResponseJp" }
}
}
},
"404": {"description": "ワークフロー実行記録が見つかりません。"}
}
}
},
"/workflows/tasks/{task_id}/stop": {
"post": {
"summary": "生成を停止 (ワークフロータスク)",
"description": "ワークフロータスクの生成を停止します。ストリーミングモードでのみサポートされています。",
"operationId": "stopWorkflowTaskGenerationJp",
"tags": ["ワークフロー実行"],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"description": "タスクID。ストリーミングチャンクの返り値から取得可能。",
"schema": { "type": "string", "format": "uuid" }
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["user"],
"properties": {
"user": { "type": "string", "description": "ユーザー識別子。実行ワークフローAPIに渡されたユーザーと一致する必要があります。" }
}
}
}
}
},
"responses": {
"200": { "$ref": "#/components/responses/SuccessResultJp" }
}
}
},
"/files/upload": {
"post": {
"summary": "ファイルアップロード (ワークフロー用)",
"description": "ワークフローで使用するファイルをアップロードします。ワークフローでサポートされている任意の形式をサポートします。アップロードされたファイルは、現在のエンドユーザーのみが使用できます。",
"operationId": "uploadWorkflowFileJp",
"tags": ["ファイル操作 (ワークフロー)"],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": ["file", "user"],
"properties": {
"file": { "type": "string", "format": "binary", "description": "アップロードするファイル。" },
"user": { "type": "string", "description": "ユーザー識別子。" }
}
}
}
}
},
"responses": {
"200": { "description": "ファイルのアップロードに成功しました。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileUploadResponseJp" } } } },
"201": { "description": "ファイルの作成に成功しました。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileUploadResponseJp" } } } },
"400": { "$ref": "#/components/responses/BadRequestFileJp" },
"413": { "$ref": "#/components/responses/FileTooLargeJp" },
"415": { "$ref": "#/components/responses/UnsupportedFileTypeFileJp" },
"503": { "$ref": "#/components/responses/S3ErrorFileJp" },
"500": { "$ref": "#/components/responses/InternalServerErrorJp" }
}
}
},
"/end-users/{end_user_id}": {
"get": {
"summary": "エンドユーザー取得",
"description": "IDでエンドユーザーを取得します。\n\n他のAPIがエンドユーザーIDファイルアップロードの `created_by`)を返す場合に利用できます。",
"operationId": "getEndUserWorkflowJp",
"tags": ["エンドユーザー"],
"parameters": [
{
"name": "end_user_id",
"in": "path",
"required": true,
"description": "エンドユーザーID。",
"schema": { "type": "string", "format": "uuid" }
}
],
"responses": {
"200": {
"description": "エンドユーザーの取得に成功しました。",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/EndUserDetailJp" }
}
}
},
"404": { "$ref": "#/components/responses/EndUserNotFoundJp" },
"500": { "$ref": "#/components/responses/InternalServerErrorJp" }
}
}
},
"/workflows/logs": {
"get": {
"summary": "ワークフローログを取得",
"description": "ワークフローログを返します。最初のページは最新の`{limit}`メッセージを返します。つまり、逆順です。",
"operationId": "getWorkflowLogsJp",
"tags": ["ワークフロー実行"],
"parameters": [
{ "name": "keyword", "in": "query", "description": "(オプション)検索するキーワード。", "schema": { "type": "string" } },
{ "name": "status", "in": "query", "description": "オプション実行ステータスsucceeded, failed, stopped, running。", "schema": { "type": "string", "enum": ["succeeded", "failed", "stopped", "running"] } },
{ "name": "page", "in": "query", "description": "オプション現在のページ、デフォルトは1。", "schema": { "type": "integer", "default": 1 } },
{ "name": "limit", "in": "query", "description": "オプション1回のリクエストで返すアイテムの数、デフォルトは20。", "schema": { "type": "integer", "default": 20 } }
],
"responses": {
"200": { "description": "ワークフローログの取得に成功しました。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowLogsResponseJp" } } } }
}
}
},
"/info": {
"get": {
"summary": "アプリケーションの基本情報を取得 (ワークフロー)",
"operationId": "getWorkflowAppInfoJp",
"tags": ["アプリケーション設定 (ワークフロー)"],
"responses": { "200": { "description": "アプリケーションの基本情報。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppInfoResponseJp" } } } } }
}
},
"/parameters": {
"get": {
"summary": "アプリケーションのパラメータ情報を取得 (ワークフロー)",
"operationId": "getWorkflowAppParametersJp",
"tags": ["アプリケーション設定 (ワークフロー)"],
"responses": { "200": { "description": "アプリケーションのパラメータ情報。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowAppParametersResponseJp" } } } } }
}
},
"/site": {
"get": {
"summary": "アプリのWebApp設定を取得 (ワークフロー)",
"operationId": "getWorkflowWebAppSettingsJp",
"tags": ["アプリケーション設定 (ワークフロー)"],
"responses": { "200": { "description": "WebApp設定情報。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowWebAppSettingsResponseJp" } } } } }
}
}
},
"components": {
"securitySchemes": {
"ApiKeyAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "API_KEY", "description": "API-Key認証。すべてのAPIリクエストにおいて、Authorization HTTPヘッダーにAPIキーを含めてくださいBearer {API_KEY}。APIキーの漏洩を防ぐため、サーバー側で保存することを強くお勧めします。" }
},
"responses": {
"BadRequestWorkflowJp": { "description": "リクエストパラメータエラーまたはワークフロー実行失敗。考えられるエラーコードinvalid_param, app_unavailable, provider_not_initialize, provider_quota_exceeded, model_currently_not_support, workflow_request_error。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseJp" } } } },
"BadRequestFileJp": { "description": "ファイル操作リクエストエラー。考えられるエラーコードno_file_uploaded, too_many_files, unsupported_preview, unsupported_estimate。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseJp" } } } },
"FileTooLargeJp": { "description": "ファイルが大きすぎます (file_too_large)。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseJp" } } } },
"UnsupportedFileTypeFileJp": { "description": "サポートされていないファイルタイプです (unsupported_file_type)。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseJp" } } } },
"S3ErrorFileJp": { "description": "S3ストレージサービスエラー。考えられるエラーコードs3_connection_failed, s3_permission_denied, s3_file_too_large。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseJp" } } } },
"InternalServerErrorJp": { "description": "内部サーバーエラー。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseJp" } } } },
"SuccessResultJp": { "description": "操作に成功しました。", "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "success" } } } } } },
"EndUserNotFoundJp": { "description": "エンドユーザーが見つかりません。エラーコード:`end_user_not_found`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseJp" } } } }
},
"schemas": {
"WorkflowExecutionRequestJp": {
"type": "object",
"required": ["inputs", "response_mode", "user"],
"properties": {
"inputs": {
"type": "object",
"description": "アプリで定義されたさまざまな変数値の入力を許可します。変数がファイルリストの場合、その値はInputFileObjectWorkflowJpオブジェクトのリストである必要があります。",
"additionalProperties": {
"oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object" }, { "type": "array", "items": { "$ref": "#/components/schemas/InputFileObjectWorkflowJp" } } ]
},
"example": { "user_query": "これを翻訳してください。", "target_language": "フランス語" }
},
"response_mode": { "type": "string", "enum": ["streaming", "blocking"], "description": "応答の返却モード。streaming (推奨) はSSEに基づきます。blocking は実行完了後に結果を返します (Cloudflareの100秒タイムアウト制限あり)。" },
"user": { "type": "string", "description": "ユーザー識別子。アプリケーション内で一意である必要があります。" },
"files": { "type": "array", "items": {"$ref": "#/components/schemas/InputFileObjectWorkflowJp"}, "description": "オプションこのフィールドはinputs内のファイル型変数に置き換えられました。下位互換性のために残されていますが、inputsを使用することを推奨します。"}
}
},
"InputFileObjectWorkflowJp": {
"type": "object",
"required": ["type", "transfer_method"],
"properties": {
"type": { "type": "string", "enum": ["document", "image", "audio", "video", "custom"], "description": "ファイルタイプ。document: TXT,MD,PDF等; image: JPG,PNG等; audio: MP3,WAV等; video: MP4,MOV等; custom: その他。" },
"transfer_method": { "type": "string", "enum": ["remote_url", "local_file"], "description": "転送方法。remote_url は画像URL / local_file はファイルアップロード用" },
"url": { "type": "string", "format": "url", "description": "画像URL転送方法が remote_url の場合)" },
"upload_file_id": { "type": "string", "format": "uuid", "description": "アップロードされたファイルID、事前にファイルアップロードAPIで取得する必要があります転送方法が local_file の場合)" }
},
"anyOf": [
{
"properties": {
"transfer_method": { "enum": ["remote_url"] },
"url": { "type": "string", "format": "url" }
},
"required": ["url"],
"not": { "required": ["upload_file_id"] }
},
{
"properties": {
"transfer_method": { "enum": ["local_file"] },
"upload_file_id": { "type": "string", "format": "uuid" }
},
"required": ["upload_file_id"],
"not": { "required": ["url"] }
}
]
},
"WorkflowCompletionResponseJp": {
"type": "object", "description": "ブロッキングモードでのワークフロー実行結果。",
"properties": {
"workflow_run_id": { "type": "string", "format": "uuid", "description": "ワークフロー実行の一意のID。" },
"task_id": { "type": "string", "format": "uuid", "description": "タスクID。" },
"data": { "$ref": "#/components/schemas/WorkflowFinishedDataJp" }
}
},
"ChunkWorkflowEventJp": {
"type": "object", "required": ["event"],
"properties": { "event": { "type": "string", "enum": ["workflow_started", "node_started", "text_chunk", "node_finished", "workflow_finished", "tts_message", "tts_message_end", "ping"], "description": "イベントタイプ。" } },
"discriminator": { "propertyName": "event", "mapping": {
"workflow_started": "#/components/schemas/StreamEventWfWorkflowStartedJp", "node_started": "#/components/schemas/StreamEventWfNodeStartedJp",
"text_chunk": "#/components/schemas/StreamEventWfTextChunkJp", "node_finished": "#/components/schemas/StreamEventWfNodeFinishedJp",
"workflow_finished": "#/components/schemas/StreamEventWfWorkflowFinishedJp", "tts_message": "#/components/schemas/StreamEventWfTtsMessageJp",
"tts_message_end": "#/components/schemas/StreamEventWfTtsMessageEndJp", "ping": "#/components/schemas/StreamEventWfPingJp"
}}
},
"StreamEventBaseWfJp": {
"type": "object", "properties": { "task_id": { "type": "string", "format": "uuid", "description": "タスクID。" }, "workflow_run_id": { "type": "string", "format": "uuid", "description": "ワークフロー実行ID。" } }
},
"StreamEventWfWorkflowStartedJp": { "allOf": [ { "$ref": "#/components/schemas/ChunkWorkflowEventJp" }, { "$ref": "#/components/schemas/StreamEventBaseWfJp" }, { "type": "object", "required": ["data"], "properties": { "data": { "$ref": "#/components/schemas/WorkflowStartedDataJp" } } } ] },
"WorkflowStartedDataJp": { "type": "object", "description": "ワークフロー開始イベントの詳細。", "required": ["id", "workflow_id", "sequence_number", "created_at"], "properties": { "id": { "type": "string", "format": "uuid", "description": "ワークフロー実行の一意のID。" }, "workflow_id": { "type": "string", "format": "uuid", "description": "関連するワークフローのID。" }, "sequence_number": { "type": "integer", "description": "自己増加シリアル番号、1から始まります。" }, "created_at": { "type": "integer", "format": "int64", "description": "開始時間。" } } },
"StreamEventWfNodeStartedJp": { "allOf": [ { "$ref": "#/components/schemas/ChunkWorkflowEventJp" }, { "$ref": "#/components/schemas/StreamEventBaseWfJp" }, { "type": "object", "required": ["data"], "properties": { "data": { "$ref": "#/components/schemas/NodeStartedDataJp" } } } ] },
"NodeStartedDataJp": { "type": "object", "description": "ノード開始イベントの詳細。", "required": ["id", "node_id", "node_type", "title", "index", "created_at"], "properties": { "id": { "type": "string", "format": "uuid", "description": "ワークフロー実行の一意のID文脈上、ード実行IDであるべき。" }, "node_id": { "type": "string", "format": "uuid", "description": "ードのID。" }, "node_type": { "type": "string", "description": "ノードのタイプ。" }, "title": { "type": "string", "description": "ノードの名前。" }, "index": { "type": "integer", "description": "実行シーケンス番号。" }, "predecessor_node_id": { "type": "string", "format": "uuid", "nullable": true, "description": "オプション前のードID。" }, "inputs": { "type": "object", "additionalProperties": true, "description": "ノードで使用されるすべての前のノード変数の内容。" }, "created_at": { "type": "integer", "format": "int64", "description": "開始のタイムスタンプ。" } } },
"StreamEventWfTextChunkJp": { "allOf": [ { "$ref": "#/components/schemas/ChunkWorkflowEventJp" }, { "$ref": "#/components/schemas/StreamEventBaseWfJp" }, { "type": "object", "required": ["data"], "properties": { "data": { "$ref": "#/components/schemas/TextChunkDataJp" } } } ] },
"TextChunkDataJp": { "type": "object", "description": "テキストフラグメントイベントの詳細。", "required": ["text", "from_variable_selector"], "properties": { "text": { "type": "string", "description": "テキスト内容。" }, "from_variable_selector": { "type": "array", "items": { "type": "string" }, "description": "テキスト生成元パス。" } } },
"StreamEventWfNodeFinishedJp": { "allOf": [ { "$ref": "#/components/schemas/ChunkWorkflowEventJp" }, { "$ref": "#/components/schemas/StreamEventBaseWfJp" }, { "type": "object", "required": ["data"], "properties": { "data": { "$ref": "#/components/schemas/NodeFinishedDataJp" } } } ] },
"NodeFinishedDataJp": { "type": "object", "description": "ノード終了イベントの詳細。", "required": ["id", "node_id", "index", "status", "created_at"], "properties": { "id": { "type": "string", "format": "uuid", "description": "ード実行ID。" }, "node_id": { "type": "string", "format": "uuid", "description": "ードのID。" }, "index": { "type": "integer", "description": "実行シーケンス番号。" }, "predecessor_node_id": { "type": "string", "format": "uuid", "nullable": true, "description": "オプション前のードID。" }, "inputs": { "type": "object", "additionalProperties": true, "nullable": true, "description": "ノードで使用されるすべての前のノード変数の内容。" }, "process_data": { "type": "object", "additionalProperties": true, "nullable": true, "description": "(オプション)ノードプロセスデータ (JSON)。" }, "outputs": { "type": "object", "additionalProperties": true, "nullable": true, "description": "(オプション)出力内容 (JSON)。" }, "status": { "type": "string", "enum": ["running", "succeeded", "failed", "stopped"], "description": "実行のステータス。" }, "error": { "type": "string", "nullable": true, "description": "(オプション)エラー理由。" }, "elapsed_time": { "type": "number", "format": "float", "nullable": true, "description": "(オプション)使用時間(秒)。" }, "execution_metadata": { "$ref": "#/components/schemas/NodeExecutionMetadataJp" , "nullable": true, "description":"メタデータ"}, "created_at": { "type": "integer", "format": "int64", "description": "開始のタイムスタンプ。" } } },
"NodeExecutionMetadataJp": { "type": "object", "description": "ノード実行メタデータ。", "properties": { "total_tokens": { "type": "integer", "nullable": true, "description": "(オプション)使用トークン数。" }, "total_price": { "type": "number", "format": "float", "nullable": true, "description": "(オプション)総コスト (floatでdecimalを表現)。" }, "currency": { "type": "string", "nullable": true, "example": "USD", "description": "オプション通貨、例USD / RMB。" } } },
"StreamEventWfWorkflowFinishedJp": { "allOf": [ { "$ref": "#/components/schemas/ChunkWorkflowEventJp" }, { "$ref": "#/components/schemas/StreamEventBaseWfJp" }, { "type": "object", "required": ["data"], "properties": { "data": { "$ref": "#/components/schemas/WorkflowFinishedDataJp" } } } ] },
"WorkflowFinishedDataJp": { "type": "object", "description": "ワークフロー終了イベントの詳細。", "required": ["id", "workflow_id", "status", "created_at", "finished_at"], "properties": { "id": { "type": "string", "format": "uuid", "description": "ワークフロー実行のID。" }, "workflow_id": { "type": "string", "format": "uuid", "description": "関連するワークフローのID。" }, "status": { "type": "string", "enum": ["running", "succeeded", "failed", "stopped"], "description": "実行のステータス。" }, "outputs": { "type": "object", "additionalProperties": true, "nullable": true, "description": "(オプション)出力内容 (JSON)。" }, "error": { "type": "string", "nullable": true, "description": "(オプション)エラー理由。" }, "elapsed_time": { "type": "number", "format": "float", "nullable": true, "description": "(オプション)使用時間(秒)。" }, "total_tokens": { "type": "integer", "nullable": true, "description": "(オプション)使用トークン数。" }, "total_steps": { "type": "integer", "default": 0, "description": "総ステップ数、デフォルト0。" }, "created_at": { "type": "integer", "format": "int64", "description": "開始時間。" }, "finished_at": { "type": "integer", "format": "int64", "description": "終了時間。" } } },
"StreamEventWfTtsMessageJp": { "allOf": [ { "$ref": "#/components/schemas/ChunkWorkflowEventJp" }, { "$ref": "#/components/schemas/StreamEventBaseWfJp" }, { "type": "object", "required": ["audio", "message_id", "created_at"], "properties": { "audio": { "type": "string", "format": "byte", "description": "音声合成後のオーディオ、base64テキストコンテンツ。" }, "message_id": { "type": "string", "format": "uuid", "description": "一意のメッセージID。" }, "created_at": { "type": "integer", "format": "int64", "description": "作成タイムスタンプ。" } } } ] },
"StreamEventWfTtsMessageEndJp": { "allOf": [ { "$ref": "#/components/schemas/ChunkWorkflowEventJp" }, { "$ref": "#/components/schemas/StreamEventBaseWfJp" }, { "type": "object", "required": ["audio", "message_id", "created_at"], "properties": { "audio": { "type": "string", "description": "終了イベントにはオーディオがないため、これは空の文字列です。" }, "message_id": { "type": "string", "format": "uuid", "description": "一意のメッセージID。" }, "created_at": { "type": "integer", "format": "int64", "description": "作成タイムスタンプ。" } } } ] },
"StreamEventWfPingJp": { "allOf": [ { "$ref": "#/components/schemas/ChunkWorkflowEventJp" }, { "type": "object", "description": "接続を維持するために10秒ごとに送信されるPingイベント。" } ] },
"WorkflowRunDetailResponseJp": {
"type": "object", "description": "ワークフロー実行詳細。",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "ワークフロー実行のID。" },
"workflow_id": { "type": "string", "format": "uuid", "description": "関連するワークフローのID。" },
"status": { "type": "string", "enum": ["running", "succeeded", "failed", "stopped"], "description": "実行のステータス。" },
"inputs": { "type": "string", "description": "入力内容のJSON文字列。" },
"outputs": { "type": "object", "additionalProperties": true, "nullable": true, "description": "出力内容のJSONオブジェクト。" },
"error": { "type": "string", "nullable": true, "description": "エラー理由。" },
"total_steps": { "type": "integer", "description": "タスクの総ステップ数。" },
"total_tokens": { "type": "integer", "description": "使用されるトークンの総数。" },
"created_at": { "type": "integer", "format": "int64", "description": "タスク開始時間。" },
"finished_at": { "type": "integer", "format": "int64", "nullable": true, "description": "タスク終了時間。" },
"elapsed_time": { "type": "number", "format": "float", "nullable": true, "description": "使用される総秒数。" }
}
},
"FileUploadResponseJp": { "type": "object", "description": "ファイルアップロード成功時の応答。", "properties": { "id": { "type": "string", "format": "uuid", "description": "ID。" }, "name": { "type": "string", "description": "ファイル名。" }, "size": { "type": "integer", "description": "ファイルサイズ(バイト)。" }, "extension": { "type": "string", "description": "ファイル拡張子。" }, "mime_type": { "type": "string", "description": "ファイルのMIMEタイプ。" }, "created_by": { "type": "string", "format": "uuid", "description": "エンドユーザーID。" }, "created_at": { "type": "integer", "format": "int64", "description": "作成タイムスタンプ。" } } },
"EndUserDetailJp": {
"type": "object",
"properties": {
"id": { "type": "string", "format": "uuid" },
"tenant_id": { "type": "string", "format": "uuid" },
"app_id": { "type": "string", "format": "uuid", "nullable": true },
"type": { "type": "string", "example": "service_api" },
"external_user_id": { "type": "string", "nullable": true },
"name": { "type": "string", "nullable": true },
"is_anonymous": { "type": "boolean" },
"session_id": { "type": "string" },
"created_at": { "type": "string", "format": "date-time" },
"updated_at": { "type": "string", "format": "date-time" }
}
},
"WorkflowLogsResponseJp": {
"type": "object", "description": "ワークフローログリストの応答。",
"properties": {
"page": { "type": "integer", "description": "現在のページ。" }, "limit": { "type": "integer", "description": "1ページあたりのアイテム数。" },
"total": { "type": "integer", "description": "合計アイテム数。" }, "has_more": { "type": "boolean", "description": "さらにデータがあるかどうか。" },
"data": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowLogItemJp" }, "description": "現在のページのデータ。" }
}
},
"WorkflowLogItemJp": {
"type": "object", "description": "単一のワークフローログアイテム。",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "ID。" },
"workflow_run": { "$ref": "#/components/schemas/WorkflowRunSummaryJp", "description": "ワークフロー実行ログ。" },
"created_from": { "type": "string", "description": "作成元。" },
"created_by_role": { "type": "string", "description": "作成者の役割。" },
"created_by_account": { "type": "string", "format": "uuid", "nullable": true, "description": "(オプション)作成者アカウント。" },
"created_by_end_user": { "$ref": "#/components/schemas/EndUserSummaryJp", "description": "作成者ユーザー。" },
"created_at": { "type": "integer", "format": "int64", "description": "作成時間。" }
}
},
"WorkflowRunSummaryJp": {
"type": "object", "description": "ワークフロー実行概要情報。",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "ID。" }, "version": { "type": "string", "description": "バージョン。" },
"status": { "type": "string", "enum": ["running", "succeeded", "failed", "stopped"], "description": "実行ステータス。" },
"error": { "type": "string", "nullable": true, "description": "(オプション)エラー。" },
"elapsed_time": { "type": "number", "format": "float", "description": "使用時間(秒)。" },
"total_tokens": { "type": "integer", "description": "消費トークン数。" },
"total_steps": { "type": "integer", "description": "実行ステップ長。" },
"created_at": { "type": "integer", "format": "int64", "description": "開始時間。" },
"finished_at": { "type": "integer", "format": "int64", "nullable": true, "description": "終了時間。" }
}
},
"EndUserSummaryJp": {
"type": "object", "description": "エンドユーザー概要情報。",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "ID。" }, "type": { "type": "string", "description": "タイプ。" },
"is_anonymous": { "type": "boolean", "description": "匿名かどうか。" }, "session_id": { "type": "string", "description": "セッションID。" }
}
},
"AppInfoResponseJp": { "type": "object", "description": "アプリケーションの基本情報。", "properties": { "name": { "type": "string", "description": "アプリケーションの名前。" }, "description": { "type": "string", "description": "アプリケーションの説明。" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "アプリケーションのタグ。" } } },
"WorkflowAppParametersResponseJp": { "type": "object", "description": "ワークフローアプリのパラメータ情報。", "properties": { "user_input_form": { "type": "array", "items": { "$ref": "#/components/schemas/UserInputFormItemJp" }, "description": "ユーザー入力フォームの設定。" }, "file_upload": { "type": "object", "properties": { "image": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "number_limits": { "type": "integer" }, "detail": { "type": "string" }, "transfer_methods": { "type": "array", "items": { "type": "string", "enum": ["remote_url", "local_file"] } } }, "description": "画像設定。現在サポートされている画像タイプのみpng, jpg, jpeg, webp, gif。" } }, "description": "ファイルアップロード設定。" }, "system_parameters": { "type": "object", "properties": { "file_size_limit": { "type": "integer", "description": "ドキュメントアップロードサイズ制限MB。" }, "image_file_size_limit": { "type": "integer", "description": "画像ファイルアップロードサイズ制限MB。" }, "audio_file_size_limit": { "type": "integer", "description": "オーディオファイルアップロードサイズ制限MB。" }, "video_file_size_limit": { "type": "integer", "description": "ビデオファイルアップロードサイズ制限MB。" } }, "description": "システムパラメータ。" } } },
"UserInputFormItemJp": { "type": "object", "description": "ユーザー入力フォーム内のコントロールアイテム。", "oneOf": [ { "$ref": "#/components/schemas/TextInputControlWrapperJp" }, { "$ref": "#/components/schemas/ParagraphControlWrapperJp" }, { "$ref": "#/components/schemas/SelectControlWrapperJp" } ] },
"TextInputControlWrapperJp": { "type": "object", "properties": { "text-input": { "$ref": "#/components/schemas/TextInputControlJp" } }, "required":["text-input"] },
"ParagraphControlWrapperJp": { "type": "object", "properties": { "paragraph": { "$ref": "#/components/schemas/ParagraphControlJp" } }, "required":["paragraph"] },
"SelectControlWrapperJp": { "type": "object", "properties": { "select": { "$ref": "#/components/schemas/SelectControlJp" } }, "required":["select"] },
"TextInputControlJp": { "type": "object", "description": "テキスト入力コントロール。", "required": ["label", "variable", "required"], "properties": { "label": { "type": "string", "description": "変数表示ラベル名。" }, "variable": { "type": "string", "description": "変数ID。" }, "required": { "type": "boolean", "description": "必須かどうか。" }, "default": { "type": "string", "nullable": true, "description": "デフォルト値。" } } },
"ParagraphControlJp": { "type": "object", "description": "段落テキスト入力コントロール。", "required": ["label", "variable", "required"], "properties": { "label": { "type": "string", "description": "変数表示ラベル名。" }, "variable": { "type": "string", "description": "変数ID。" }, "required": { "type": "boolean", "description": "必須かどうか。" }, "default": { "type": "string", "nullable": true, "description": "デフォルト値。" } } },
"SelectControlJp": { "type": "object", "description": "ドロップダウンコントロール。", "required": ["label", "variable", "required", "options"], "properties": { "label": { "type": "string", "description": "変数表示ラベル名。" }, "variable": { "type": "string", "description": "変数ID。" }, "required": { "type": "boolean", "description": "必須かどうか。" }, "default": { "type": "string", "nullable": true, "description": "デフォルト値。" }, "options": { "type": "array", "items": { "type": "string" }, "description": "オプション値。" } } },
"WorkflowWebAppSettingsResponseJp": { "type": "object", "description": "ワークフローアプリのWebApp設定。", "properties": { "title": { "type": "string", "description": "WebApp名。" }, "icon_type": { "type": "string", "enum": ["emoji", "image"], "description": "アイコンタイプ。" }, "icon": { "type": "string", "description": "アイコン内容 (emojiまたは画像URL)。" }, "icon_background": { "type": "string", "description": "16進数形式の背景色。" }, "icon_url": { "type": "string", "format": "url", "nullable": true, "description": "アイコンのURL。" }, "description": { "type": "string", "description": "説明。" }, "copyright": { "type": "string", "description": "著作権情報。" }, "privacy_policy": { "type": "string", "description": "プライバシーポリシーのリンク。" }, "custom_disclaimer": { "type": "string", "description": "カスタム免責事項。" }, "default_language": { "type": "string", "description": "デフォルト言語。" }, "show_workflow_steps": { "type": "boolean", "description": "ワークフローの詳細を表示するかどうか。" } } },
"ErrorResponseJp": { "type": "object", "description": "エラー応答。", "properties": { "status": { "type": "integer", "nullable": true, "description": "HTTPステータスコード。" }, "code": { "type": "string", "nullable": true, "description": "エラーコード。" }, "message": { "type": "string", "description": "エラーメッセージ。" } } }
}
},
"tags": [
{ "name": "ワークフロー実行", "description": "ワークフローの実行と管理に関連する操作。" },
{ "name": "ファイル操作 (ワークフロー)", "description": "ワークフロー固有のファイルアップロードとプレビュー操作。" },
{ "name": "エンドユーザー", "description": "エンドユーザー情報に関連する操作。" },
{ "name": "アプリケーション設定 (ワークフロー)", "description": "ワークフローアプリのアプリケーション設定と情報。" }
]
}